File tree Expand file tree Collapse file tree 4 files changed +35
-25
lines changed
src/Nullinside.Api.TwitchBot Expand file tree Collapse file tree 4 files changed +35
-25
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public async Task<ContentResult> TwitchChatMessageCallback(CancellationToken tok
3535 string stuff = await stream . ReadToEndAsync ( token ) ;
3636 _log . Info ( $ "TwitchChatMessageCallback: { stuff } ") ;
3737
38- var hi = JsonConvert . DeserializeObject < TwitchChallange > ( stuff ) ;
38+ var hi = JsonConvert . DeserializeObject < TwitchChallangeResponse > ( stuff ) ;
3939 var resp = new ContentResult ( ) ;
4040 resp . ContentType = "text/plain" ;
4141 resp . StatusCode = ( int ) HttpStatusCode . OK ;
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
3+
4+ namespace Nullinside . Api . TwitchBot . Model ;
5+
6+ public class TwitchChallangeResponse : TwitchWebhookResponse {
7+ [ JsonProperty ( "challenge" ) ]
8+ public Guid ? Challenge { get ; set ; }
9+ }
10+
11+ public partial class Condition
12+ {
13+ [ JsonProperty ( "broadcaster_user_id" ) ]
14+ public string ? BroadcasterUserId { get ; set ; }
15+ }
16+
17+ public partial class Transport
18+ {
19+ [ JsonProperty ( "method" ) ]
20+ public string ? Method { get ; set ; }
21+
22+ [ JsonProperty ( "callback" ) ]
23+ public Uri ? Callback { get ; set ; }
24+ }
Original file line number Diff line number Diff line change 33
44namespace Nullinside . Api . TwitchBot . Model ;
55
6- public class TwitchChallange {
7- [ JsonProperty ( "challenge" ) ]
8- public Guid ? Challenge { get ; set ; }
9-
10- [ JsonProperty ( "subscription" ) ]
11- public Subscription ? Subscription { get ; set ; }
12- }
13-
14- public partial class Subscription
6+ public partial class TwitchSubscriptionResponse
157{
168 [ JsonProperty ( "condition" ) ]
179 public Condition ? Condition { get ; set ; }
@@ -36,19 +28,4 @@ public partial class Subscription
3628
3729 [ JsonProperty ( "status" ) ]
3830 public string ? Status { get ; set ; }
39- }
40-
41- public partial class Condition
42- {
43- [ JsonProperty ( "broadcaster_user_id" ) ]
44- public string ? BroadcasterUserId { get ; set ; }
45- }
46-
47- public partial class Transport
48- {
49- [ JsonProperty ( "method" ) ]
50- public string ? Method { get ; set ; }
51-
52- [ JsonProperty ( "callback" ) ]
53- public Uri ? Callback { get ; set ; }
5431}
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
3+
4+ namespace Nullinside . Api . TwitchBot . Model ;
5+
6+ public class TwitchWebhookResponse {
7+ [ JsonProperty ( "subscription" ) ]
8+ public TwitchSubscriptionResponse ? Subscription { get ; set ; }
9+ }
You can’t perform that action at this time.
0 commit comments