Add Spotify track support (#970)

* Initial Spotify support

* Remove GameAsset#ToEntity

- appId doesn't seem to be necessary, and Spotify Game doesn't return appId either.

* Implement SpotifyGame details

* Implement song Duration prop

* Add album art CDN

* Fix ActivityType

* Remove payload debug

* Add changes according to review

+ Make `ApplicationId` nullable
+ Move ctor after props
This commit is contained in:
Still Hsu
2018-03-19 04:06:53 +08:00
committed by Christopher F
parent b9be6deb4f
commit 64b9cc7a53
6 changed files with 59 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CS1591
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Runtime.Serialization;
@@ -29,6 +29,10 @@ namespace Discord.API
public Optional<API.GameTimestamps> Timestamps { get; set; }
[JsonProperty("instance")]
public Optional<bool> Instance { get; set; }
[JsonProperty("sync_id")]
public Optional<string> SyncId { get; set; }
[JsonProperty("session_id")]
public Optional<string> SessionId { get; set; }
[OnError]
internal void OnError(StreamingContext context, ErrorContext errorContext)