-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SnoozeNextAd, GetAdSchedule, ad related scopes (#372)
* SnoozeNextAd, GetAdSchedule, ad related scopes
- Loading branch information
1 parent
849a297
commit 7bc2c9d
Showing
7 changed files
with
197 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
TwitchLib.Api.Helix.Models/Channels/GetAdSchedule/AdSchedule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace TwitchLib.Api.Helix.Models.Channels.GetAdSchedule | ||
{ | ||
/// <summary> | ||
/// <para>Contains information related to the channel’s ad schedule.</para> | ||
/// </summary> | ||
public class AdSchedule | ||
{ | ||
/// <summary> | ||
/// <para>The number of snoozes available for the broadcaster.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "snooze_count")] | ||
public int SnoozeCount { get; protected set; } | ||
/// <summary> | ||
/// <para>The UTC timestamp when the broadcaster will gain an additional snooze, in RFC3339 format.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "snooze_refresh_at")] | ||
public string SnoozeRefreshAt { get; protected set; } | ||
/// <summary> | ||
/// <para>The UTC timestamp of the broadcaster’s next scheduled ad, in RFC3339 format. Empty if the channel has no ad scheduled or is not live.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "next_ad_at")] | ||
public string NextAdAt { get; protected set; } | ||
/// <summary> | ||
/// <para>The length in seconds of the scheduled upcoming ad break.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "lengths_seconds")] | ||
public int LengthsSeconds { get;protected set; } | ||
/// <summary> | ||
/// <para>The UTC timestamp of the broadcaster’s last ad-break, in RFC3339 format. Empty if the channel has not run an ad or is not live.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "last_ad_at")] | ||
public string LastAdAt { get; protected set; } | ||
/// <summary> | ||
/// <para>The amount of pre-roll free time remaining for the channel in seconds. Returns 0 if they are currently not pre-roll free.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "preroll_free_time_seconds")] | ||
public int PrerollFreeTimeSeconds { get; protected set; } | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
TwitchLib.Api.Helix.Models/Channels/GetAdSchedule/GetAdScheduleResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace TwitchLib.Api.Helix.Models.Channels.GetAdSchedule | ||
{ | ||
/// <summary> | ||
/// <para>Response to getting ad schedule</para> | ||
/// </summary> | ||
public class GetAdScheduleResponse | ||
{ | ||
/// <summary> | ||
/// <para>A list that contains information related to the channel’s ad schedule.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "data")] | ||
public AdSchedule[] Data { get; protected set; } | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
TwitchLib.Api.Helix.Models/Channels/SnoozeNextAd/SnoozeNextAd.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace TwitchLib.Api.Helix.Models.Channels.SnoozeNextAd | ||
{ | ||
/// <summary> | ||
/// <para>Contains information about the channel’s snoozes and next upcoming ad after successfully snoozing.</para> | ||
/// </summary> | ||
public class SnoozeNextAd | ||
{ | ||
/// <summary> | ||
/// <para>The number of snoozes available for the broadcaster.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "snooze_count")] | ||
public int SnoozeCount { get; protected set; } | ||
/// <summary> | ||
/// The UTC timestamp when the broadcaster will gain an additional snooze, in RFC3339 format. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "snooze_refresh_at")] | ||
public string SnoozeRefreshAt { get; protected set; } | ||
/// <summary> | ||
/// The UTC timestamp of the broadcaster’s next scheduled ad, in RFC3339 format. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "next_ad_at")] | ||
public string NextAdAt { get; protected set; } | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
TwitchLib.Api.Helix.Models/Channels/SnoozeNextAd/SnoozeNextAdResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace TwitchLib.Api.Helix.Models.Channels.SnoozeNextAd | ||
{ | ||
/// <summary> | ||
/// <para>Response to attempting to snooze an ad.</para> | ||
/// </summary> | ||
public class SnoozeNextAdResponse | ||
{ | ||
/// <summary> | ||
/// <para>A list that contains information about the channel’s snoozes and next upcoming ad after successfully snoozing.</para> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "data")] | ||
public SnoozeNextAd[] Data { get; protected set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters