Remove RPC from main distribution (#925)

This commit is contained in:
Christopher F
2018-01-05 20:23:19 -05:00
committed by GitHub
parent 5f46aef3a7
commit b30af57b7f
81 changed files with 1 additions and 20 deletions

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class AuthenticateParams
{
[JsonProperty("access_token")]
public string AccessToken { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
using System;
namespace Discord.API.Rpc
{
internal class AuthenticateResponse
{
[JsonProperty("application")]
public Application Application { get; set; }
[JsonProperty("expires")]
public DateTimeOffset Expires { get; set; }
[JsonProperty("user")]
public User User { get; set; }
[JsonProperty("scopes")]
public string[] Scopes { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Discord.API.Rpc
{
internal class AuthorizeParams
{
[JsonProperty("client_id")]
public string ClientId { get; set; }
[JsonProperty("scopes")]
public IReadOnlyCollection<string> Scopes { get; set; }
[JsonProperty("rpc_token")]
public Optional<string> RpcToken { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class AuthorizeResponse
{
[JsonProperty("code")]
public string Code { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class Channel
{
//Shared
[JsonProperty("id")]
public ulong Id { get; set; }
[JsonProperty("type")]
public ChannelType Type { get; set; }
//GuildChannel
[JsonProperty("guild_id")]
public Optional<ulong> GuildId { get; set; }
[JsonProperty("name")]
public Optional<string> Name { get; set; }
[JsonProperty("position")]
public Optional<int> Position { get; set; }
//IMessageChannel
[JsonProperty("messages")]
public Message[] Messages { get; set; }
//VoiceChannel
[JsonProperty("bitrate")]
public Optional<int> Bitrate { get; set; }
[JsonProperty("user_limit")]
public Optional<int> UserLimit { get; set; }
[JsonProperty("voice_states")]
public ExtendedVoiceState[] VoiceStates { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class ChannelSubscriptionParams
{
[JsonProperty("channel_id")]
public ulong ChannelId { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class ChannelSummary
{
[JsonProperty("id")]
public ulong Id { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("type")]
public ChannelType Type { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class ErrorEvent
{
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("message")]
public string Message { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class ExtendedVoiceState
{
[JsonProperty("user")]
public User User { get; set; }
[JsonProperty("voice_state")]
public Optional<VoiceState> VoiceState { get; set; }
[JsonProperty("nick")]
public Optional<string> Nickname { get; set; }
[JsonProperty("volume")]
public Optional<int> Volume { get; set; }
[JsonProperty("mute")]
public Optional<bool> Mute { get; set; }
[JsonProperty("pan")]
public Optional<Pan> Pan { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GetChannelParams
{
[JsonProperty("channel_id")]
public ulong ChannelId { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GetChannelsParams
{
[JsonProperty("guild_id")]
public ulong GuildId { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Discord.API.Rpc
{
internal class GetChannelsResponse
{
[JsonProperty("channels")]
public IReadOnlyCollection<ChannelSummary> Channels { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GetGuildParams
{
[JsonProperty("guild_id")]
public ulong GuildId { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
#pragma warning disable CS1591
namespace Discord.API.Rpc
{
internal class GetGuildsParams
{
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GetGuildsResponse
{
[JsonProperty("guilds")]
public GuildSummary[] Guilds { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Discord.API.Rpc
{
internal class Guild
{
[JsonProperty("id")]
public ulong Id { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("icon_url")]
public string IconUrl { get; set; }
[JsonProperty("members")]
public IEnumerable<GuildMember> Members { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GuildMember
{
[JsonProperty("user")]
public User User { get; set; }
[JsonProperty("status")]
public UserStatus Status { get; set; }
/*[JsonProperty("activity")]
public object Activity { get; set; }*/
}
}

View File

@@ -0,0 +1,13 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GuildStatusEvent
{
[JsonProperty("guild")]
public Guild Guild { get; set; }
[JsonProperty("online")]
public int Online { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GuildSubscriptionParams
{
[JsonProperty("guild_id")]
public ulong GuildId { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class GuildSummary
{
[JsonProperty("id")]
public ulong Id { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class Message : Discord.API.Message
{
[JsonProperty("blocked")]
public Optional<bool> IsBlocked { get; }
[JsonProperty("content_parsed")]
public Optional<object[]> ContentParsed { get; }
[JsonProperty("author_color")]
public Optional<string> AuthorColor { get; } //#Hex
[JsonProperty("mentions")]
public new Optional<ulong[]> UserMentions { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class MessageEvent
{
[JsonProperty("channel_id")]
public ulong ChannelId { get; set; }
[JsonProperty("message")]
public Message Message { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class Pan
{
[JsonProperty("left")]
public float Left { get; set; }
[JsonProperty("right")]
public float Right { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class ReadyEvent
{
[JsonProperty("v")]
public int Version { get; set; }
[JsonProperty("config")]
public RpcConfig Config { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class RpcConfig
{
[JsonProperty("cdn_host")]
public string CdnHost { get; set; }
[JsonProperty("api_endpoint")]
public string ApiEndpoint { get; set; }
[JsonProperty("environment")]
public string Environment { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class SelectChannelParams
{
[JsonProperty("channel_id")]
public ulong? ChannelId { get; set; }
[JsonProperty("force")]
public Optional<bool> Force { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class SetLocalVolumeParams
{
[JsonProperty("volume")]
public int Volume { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class SetLocalVolumeResponse
{
[JsonProperty("user_id")]
public ulong UserId { get; set; }
[JsonProperty("volume")]
public int Volume { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class SpeakingEvent
{
[JsonProperty("user_id")]
public ulong UserId { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class SubscriptionResponse
{
[JsonProperty("evt")]
public string Event { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class UserVoiceSettings
{
[JsonProperty("userId")]
internal ulong UserId { get; set; }
[JsonProperty("pan")]
public Optional<Pan> Pan { get; set; }
[JsonProperty("volume")]
public Optional<int> Volume { get; set; }
[JsonProperty("mute")]
public Optional<bool> Mute { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class VoiceDevice
{
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class VoiceDeviceSettings
{
[JsonProperty("device_id")]
public Optional<string> DeviceId { get; set; }
[JsonProperty("volume")]
public Optional<float> Volume { get; set; }
[JsonProperty("available_devices")]
public Optional<VoiceDevice[]> AvailableDevices { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class VoiceMode
{
[JsonProperty("type")]
public Optional<string> Type { get; set; }
[JsonProperty("auto_threshold")]
public Optional<bool> AutoThreshold { get; set; }
[JsonProperty("threshold")]
public Optional<float> Threshold { get; set; }
[JsonProperty("shortcut")]
public Optional<VoiceShortcut[]> Shortcut { get; set; }
[JsonProperty("delay")]
public Optional<float> Delay { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class VoiceSettings
{
[JsonProperty("input")]
public VoiceDeviceSettings Input { get; set; }
[JsonProperty("output")]
public VoiceDeviceSettings Output { get; set; }
[JsonProperty("mode")]
public VoiceMode Mode { get; set; }
[JsonProperty("automatic_gain_control")]
public Optional<bool> AutomaticGainControl { get; set; }
[JsonProperty("echo_cancellation")]
public Optional<bool> EchoCancellation { get; set; }
[JsonProperty("noise_suppression")]
public Optional<bool> NoiseSuppression { get; set; }
[JsonProperty("qos")]
public Optional<bool> QualityOfService { get; set; }
[JsonProperty("silence_warning")]
public Optional<bool> SilenceWarning { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using Discord.Rpc;
using Newtonsoft.Json;
namespace Discord.API.Rpc
{
internal class VoiceShortcut
{
[JsonProperty("type")]
public Optional<VoiceShortcutType> Type { get; set; }
[JsonProperty("code")]
public Optional<int> Code { get; set; }
[JsonProperty("name")]
public Optional<string> Name { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
#pragma warning disable CS1591
using Newtonsoft.Json;
using System;
namespace Discord.API.Rpc
{
internal class RpcFrame
{
[JsonProperty("cmd")]
public string Cmd { get; set; }
[JsonProperty("nonce")]
public Optional<Guid?> Nonce { get; set; }
[JsonProperty("evt")]
public Optional<string> Event { get; set; }
[JsonProperty("data")]
public Optional<object> Data { get; set; }
[JsonProperty("args")]
public object Args { get; set; }
}
}