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
35
35
string stuff = await stream . ReadToEndAsync ( token ) ;
36
36
_log . Info ( $ "TwitchChatMessageCallback: { stuff } ") ;
37
37
38
- var hi = JsonConvert . DeserializeObject < TwitchChallange > ( stuff ) ;
38
+ var hi = JsonConvert . DeserializeObject < TwitchChallangeResponse > ( stuff ) ;
39
39
var resp = new ContentResult ( ) ;
40
40
resp . ContentType = "text/plain" ;
41
41
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 3
3
4
4
namespace Nullinside . Api . TwitchBot . Model ;
5
5
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
15
7
{
16
8
[ JsonProperty ( "condition" ) ]
17
9
public Condition ? Condition { get ; set ; }
@@ -36,19 +28,4 @@ public partial class Subscription
36
28
37
29
[ JsonProperty ( "status" ) ]
38
30
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 ; }
54
31
}
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