Skip to content
This repository has been archived by the owner on Aug 8, 2021. It is now read-only.

More stuff i added #11

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1572e35
my stuff
Bluscream Apr 26, 2019
3fe99a2
update repo
Bluscream Apr 27, 2019
ca8a66b
update repo
Bluscream Apr 28, 2019
32bdc42
update repo
Bluscream Apr 28, 2019
eafdfe7
update repo
Bluscream Apr 29, 2019
868e89a
update repo
Bluscream May 2, 2019
cc6141b
update repo
Bluscream May 25, 2019
9f92962
update repo
Bluscream Jun 10, 2019
b45e1cc
update repo
Bluscream Jun 15, 2019
60fbbc5
update repo
Bluscream Jul 11, 2019
9184eb8
update repo
Bluscream Jul 11, 2019
7a0e380
update repo
Bluscream Jul 25, 2019
6433ff7
update repo
Bluscream Aug 10, 2019
c8b3608
update repo
Bluscream Aug 10, 2019
166b8f0
Add renovate.json
renovate[bot] Nov 1, 2023
7a85192
Merge pull request #4 from Bluscream/renovate/configure
Bluscream Nov 3, 2023
0efe18a
Update dependency FluentAssertions to v5.10.3
renovate[bot] Nov 3, 2023
5e63a35
Merge pull request #6 from Bluscream/renovate/fluentassertions-5.x
Bluscream Nov 3, 2023
9f47995
Update dependency Microsoft.CSharp to v4.7.0
renovate[bot] Nov 3, 2023
7b757dc
Update dependency Microsoft.NET.Test.Sdk to v15.9.2
renovate[bot] Nov 3, 2023
daf08e2
Merge pull request #8 from Bluscream/renovate/vstest-monorepo
Bluscream Nov 3, 2023
0ddca39
Merge pull request #7 from Bluscream/renovate/microsoft.csharp-4.x
Bluscream Nov 3, 2023
73a4fa1
Update dependency Moq to v4.20.69
renovate[bot] Nov 3, 2023
bdf6f6b
Merge pull request #9 from Bluscream/renovate/moq-4.x
Bluscream Nov 3, 2023
830039b
Update xunit-dotnet monorepo
renovate[bot] Nov 3, 2023
8961099
Merge pull request #10 from Bluscream/renovate/xunit-dotnet-monorepo
Bluscream Nov 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,5 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs

push.bat
6 changes: 6 additions & 0 deletions VRChatApi/TestClient/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
36 changes: 36 additions & 0 deletions VRChatApi/TestClient/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TestClient")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestClient")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("51e73a81-edc2-4790-90ca-38de49ff20c9")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
10 changes: 5 additions & 5 deletions VRChatApi/VRChatApi.Tests/VRChatApi.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.4.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0">
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
36 changes: 30 additions & 6 deletions VRChatApi/VRChatApi/Classes/AvatarResponse.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

#pragma warning disable IDE1006

namespace VRChatApi.Classes
{
public class AvatarResponse
public class AssetUrlObject
{
}

public class UnityPackage
{
public string id { get; set; }
public string assetUrl { get; set; }
public AssetUrlObject assetUrlObject { get; set; }
public string unityVersion { get; set; }
public long unitySortNumber { get; set; }
public int assetVersion { get; set; }
public string platform { get; set; }
public DateTime created_at { get; set; }
}

public class UnityPackageUrlObject
{
public string unityPackageUrl { get; set; }
}

public class AvatarResponse : Response
{
public string id { get; set; }
public string name { get; set; }
Expand All @@ -15,6 +36,7 @@ public class AvatarResponse
public string authorName { get; set; }
public List<string> tags { get; set; }
public string assetUrl { get; set; }
public AssetUrlObject assetUrlObject { get; set; }
public string imageUrl { get; set; }
public string thumbnailImageUrl { get; set; }
public string releaseStatus { get; set; }
Expand All @@ -23,6 +45,8 @@ public class AvatarResponse
public List<UnityPackage> unityPackages { get; set; }
public bool unityPackageUpdated { get; set; }
public string unityPackageUrl { get; set; }

public UnityPackageUrlObject unityPackageUrlObject { get; set; }
public DateTime created_at { get; set; }
public DateTime updated_at { get; set; }
}
}
49 changes: 46 additions & 3 deletions VRChatApi/VRChatApi/Classes/ConfigResponse.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Collections.Generic;

#pragma warning disable IDE1006

namespace VRChatApi.Classes
{
public class ConfigResponse
public class DynamicWorldRow
{
public string name { get; set; }
public string sortHeading { get; set; }
public string sortOwnership { get; set; }
public string sortOrder { get; set; }
public string platform { get; set; }
public int index { get; set; }
public string tag { get; set; }
}

public class Announcement
{
public string name { get; set; }
public string text { get; set; }
}

public class ConfigResponse : Response
{
public string messageOfTheDay { get; set; }
public string timeOutWorldId { get; set; }
Expand All @@ -11,6 +31,7 @@ public class ConfigResponse
public string downloadLinkWindows { get; set; }
public string releaseAppVersionStandalone { get; set; }
public string devAppVersionStandalone { get; set; }
public string devServerVersionStandalone { get; set; }
public string devDownloadLinkWindows { get; set; }
public int currentTOSVersion { get; set; }
public string releaseSdkUrl { get; set; }
Expand All @@ -26,14 +47,36 @@ public class ConfigResponse
public string tutorialWorldId { get; set; }
public bool disableEventStream { get; set; }
public bool disableAvatarGating { get; set; }
public List<string> registrationShitList { get; set; }
public bool disableFeedbackGating { get; set; }
public bool disableRegistration { get; set; }
public bool disableUpgradeAccount { get; set; }
public bool disableCommunityLabs { get; set; }
public bool disableCommunityLabsPromotion { get; set; }
public bool disableTwoFactorAuth { get; set; }
public bool disableSteamNetworking { get; set; }
public string plugin { get; set; }
public string sdkNotAllowedToPublishMessage { get; set; }
public string sdkDeveloperFaqUrl { get; set; }
public string sdkDiscordUrl { get; set; }
public string notAllowedToSelectAvatarInPrivateWorldMessage { get; set; }
public int userVerificationTimeout { get; set; }
public int userUpdatePeriod { get; set; }
public int userVerificationDelay { get; set; }
public int userVerificationRetry { get; set; }
public int worldUpdatePeriod { get; set; }
public int moderationQueryPeriod { get; set; }
public int clientDisconnectTimeout { get; set; }
public string defaultAvatar { get; set; }
public List<DynamicWorldRow> dynamicWorldRows { get; set; }
public bool disableAvatarCopying { get; set; }
public List<Announcement> announcements { get; set; }
public string address { get; set; }
public string contactEmail { get; set; }
public string supportEmail { get; set; }
public string jobsEmail { get; set; }
public string copyrightEmail { get; set; }
public string moderationEmail { get; set; }
public bool disableEmail { get; set; }
public string appName { get; set; }
public string serverName { get; set; }
public string deploymentGroup { get; set; }
Expand Down
21 changes: 21 additions & 0 deletions VRChatApi/VRChatApi/Classes/FavoritesResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VRChatApi.Classes
{
public class FavoritesResponse : Response
{
public string id { get; set; }
public string type { get; set; }
public string favoriteId { get; set; }
public string[] tags { get; set; }
}
public enum FavoriteType
{

}
}
14 changes: 14 additions & 0 deletions VRChatApi/VRChatApi/Classes/FavouriteResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Collections.Generic;

#pragma warning disable IDE1006

namespace VRChatApi.Classes
{
public class FavouriteResponse : Response
{
public string id { get; set; }
public string type { get; set; }
public string favoriteId { get; set; }
public List<string> tags { get; set; }
}
}
47 changes: 31 additions & 16 deletions VRChatApi/VRChatApi/Classes/NotificationResponse.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
using System;
using System.ComponentModel;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System;

#pragma warning disable IDE1006

namespace VRChatApi.Classes
{
public class NotificationResponse
public class NotificationDetails
{
public string id { get; set; }
public string type { get; set; }
public string senderUserId { get; set; }
public string receiverUserId { get; set; }
public string message { get; set; }
public JObject details { get; set; } // unknown
public string jobName { get; set; }
public string jobColor { get; set; }

[Obsolete("Typoed property, use receiverUserId instead")]
public string WorldId { get; set; }
[JsonIgnore]
public string recieverUserId { get => receiverUserId; set => receiverUserId = value; }
public bool rsvp { get; set; }
public string WorldName { get; set; }
}

public class NotificationResponse : Response
{
public string Id { get; set; }
public string Type { get; set; }
public string SenderUserId { get; set; }
public string SenderUsername { get; set; }
public string ReceiverUserId { get; set; }
public string Message { get; set; }
[JsonProperty(PropertyName = "created_at")]
public string Created { get; set; }
public DateTime CreatedAt { get { return Convert.ToDateTime(Created); } }
public string JobName { get; set; }
public string JobColor { get; set; }
}
public class NotificationResponseWithDetails : NotificationResponse
{
public NotificationDetails Details { get; set; }
}
public class NotificationResponseWithSeen : NotificationResponse
{
public bool Seen { get; set; }
}
}
6 changes: 4 additions & 2 deletions VRChatApi/VRChatApi/Classes/PlayerModeratedResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
using System.Text;
using System.Threading.Tasks;

#pragma warning disable IDE1006

namespace VRChatApi.Classes
{
public class PlayerModeratedResponse
public class PlayerModeratedResponse : Response
{
public string id { get; set; }
public string type { get; set; }
public string sourceUserId { get; set; }
public string sourceDisplayName { get; set; }
public string targetUserId { get; set; }
public string targetDisplayName { get; set; }
public string created { get; set; }
public DateTime created { get; set; }
}
}
59 changes: 59 additions & 0 deletions VRChatApi/VRChatApi/Classes/Response.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace VRChatApi.Classes
{
public class Response
{

[JsonIgnore]
public HttpResponseMessage Raw { get; set; }
/*public object Content { get; set; }
public object Status { get; set; }
public async Task<Response> FromResponseMessageAsync(HttpResponseMessage response) { // , object content = null
// if (content != null) Content = content;
if (response != null) {
Raw = response;
string json = await response.Content.ReadAsStringAsync();
try { Status = JsonConvert.DeserializeObject<Success>(json);
} catch { Status = JsonConvert.DeserializeObject<Error>(json); }
}
return this;
}*/
}
public class Message
{
[JsonProperty(PropertyName = "message")]
public string _message { get; set; }
[JsonIgnore]
public string Content { get { return _message; } }
public int status_code { get; set; }
[JsonIgnore]
public System.Net.HttpStatusCode StatusCode { get { return (System.Net.HttpStatusCode)status_code; } }
}

public class Success
{
public Message success { get; set; }
}
public class Error
{
public Message error { get; set; }
}
public class BanResponse : Error
{
[JsonIgnore]
public bool Banned { get { return (ExpiresAt < DateTime.Now) ? true : false; } }
public string Target { get; set; }
public string Reason { get; set; }
public string Expires { get; set; }
[JsonIgnore]
public DateTime ExpiresAt { get { return Convert.ToDateTime(Expires); } }
[JsonIgnore]
public TimeSpan ExpiresIn { get { return ExpiresAt - DateTime.Now; } }
}
}
Loading