-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99ef640
commit d15f989
Showing
33 changed files
with
126 additions
and
129 deletions.
There are no files selected for viewing
9 changes: 6 additions & 3 deletions
9
Assets/Furality/FuralitySDK/Editor/DependencyResolving/DependencyResolver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
Assets/Furality/FuralitySDK/Editor/DependencyResolving/Providers/External/ProjectPackage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
Assets/Furality/FuralitySDK/Editor/DependencyResolving/Providers/IDependencyProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
...lity/FuralitySDK/Editor/DependencyResolving/Providers/Internal/LocalDependencyProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Assets/Furality/FuralitySDK/Editor/External/AssetHandling/FuralityPackage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/AssetHandling/Package.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Assets/Furality/FuralitySDK/Editor/External/AssetHandling/PrivilegeCategory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/Boop/Types/TokenResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
Assets/Furality/FuralitySDK/Editor/External/Boop/Types/UserData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/AttendanceLevel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Assets/Furality/FuralitySDK/Editor/External/FoxApi/Endpoints/FoxUsers.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/FoxResource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/Models/Files/FileResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Assets/Furality/FuralitySDK/Editor/External/FoxApi/Models/Files/FoxFileDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/Models/Files/FoxFilesDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/Models/User/FoxPatreonDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/Models/User/FoxProfileDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/Models/User/FoxUserDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Furality/FuralitySDK/Editor/External/FoxApi/PatreonLevel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Assets/Furality/FuralitySDK/Editor/External/VCC/Models/VccResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Furality.SDK.Editor.External.VCC.Models | ||
{ | ||
public class VccResponse<T> | ||
{ | ||
public bool success; | ||
public T data; | ||
} | ||
} |
48 changes: 21 additions & 27 deletions
48
Assets/Furality/FuralitySDK/Editor/External/VCC/VccComms.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,43 @@ | ||
using System; | ||
using System.Net.Http; | ||
using System.Threading.Tasks; | ||
using Furality.SDK.Editor.External.VCC.Models; | ||
using UnityEngine; | ||
|
||
namespace Furality.SDK.Editor.External.VCC | ||
{ | ||
public static class VccComms | ||
{ | ||
public class VccResponse<T> | ||
{ | ||
public bool success; | ||
public T data; | ||
} | ||
|
||
private const string VccUrl = "http://localhost:5477/api/"; | ||
|
||
public static async Task<VccResponse<T>> Request<T>(string endpoint, string method, dynamic body = null) | ||
{ | ||
// Send an HTTP request to the VCC | ||
using (HttpClient client = new HttpClient()) | ||
{ | ||
client.DefaultRequestHeaders.Add("Origin", "http://localhost:5477/"); | ||
client.DefaultRequestHeaders.Host = "localhost"; | ||
using HttpClient client = new HttpClient(); | ||
|
||
client.DefaultRequestHeaders.Add("Origin", "http://localhost:5477/"); | ||
client.DefaultRequestHeaders.Host = "localhost"; | ||
|
||
client.Timeout = TimeSpan.FromSeconds(1); | ||
client.Timeout = TimeSpan.FromSeconds(1); | ||
|
||
var request = new HttpRequestMessage(new HttpMethod(method), VccUrl+endpoint); | ||
if (body != null) | ||
request.Content = new StringContent(JsonUtility.ToJson(body), System.Text.Encoding.UTF8, "application/json"); | ||
var request = new HttpRequestMessage(new HttpMethod(method), VccUrl+endpoint); | ||
if (body != null) | ||
request.Content = new StringContent(JsonUtility.ToJson(body), System.Text.Encoding.UTF8, "application/json"); | ||
|
||
HttpResponseMessage response; | ||
try | ||
{ | ||
response = await client.SendAsync(request); | ||
} | ||
catch (Exception e) | ||
{ | ||
return null; | ||
} | ||
HttpResponseMessage response; | ||
try | ||
{ | ||
response = await client.SendAsync(request); | ||
} | ||
catch (Exception e) | ||
{ | ||
return null; | ||
} | ||
|
||
string responseBody = await response.Content.ReadAsStringAsync(); | ||
string responseBody = await response.Content.ReadAsStringAsync(); | ||
|
||
// Deserialize the response content into VccResponse<T> and return | ||
return JsonUtility.FromJson<VccResponse<T>>(responseBody); | ||
} | ||
// Deserialize the response content into VccResponse<T> and return | ||
return JsonUtility.FromJson<VccResponse<T>>(responseBody); | ||
} | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
Assets/Furality/FuralitySDK/Editor/Helpers/DependencyManager.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.