TwitchLib 3.5.3
Loading...
Searching...
No Matches
TwitchLib.Api.Helix.Analytics Class Reference

Analytics related APIs More...

Inheritance diagram for TwitchLib.Api.Helix.Analytics:
TwitchLib.Api.Core.ApiBase

Public Member Functions

 Analytics (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< GetGameAnalyticsResponseGetGameAnalyticsAsync (string gameId=null, DateTime? startedAt=null, DateTime? endedAt=null, int first=20, string after=null, string type=null, string accessToken=null)
 Gets a URL that game developers can use to download analytics reports (CSV files) for their games. The URL is valid for 5 minutes. More...
 
Task< GetExtensionAnalyticsResponseGetExtensionAnalyticsAsync (string extensionId, DateTime? startedAt=null, DateTime? endedAt=null, int first=20, string after=null, string type=null, string accessToken=null)
 Gets a URL that Extension developers can use to download analytics reports (CSV files) for their Extensions. The URL is valid for 5 minutes. More...
 
- Public Member Functions inherited from TwitchLib.Api.Core.ApiBase
 ApiBase (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
async ValueTask< string > GetAccessTokenAsync (string accessToken=null)
 

Additional Inherited Members

- Protected Member Functions inherited from TwitchLib.Api.Core.ApiBase
async Task< string > TwitchGetAsync (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< T > TwitchGetGenericAsync< T > (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< T > TwitchPatchGenericAsync< T > (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< string > TwitchPatchAsync (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< KeyValuePair< int, string > > TwitchDeleteAsync (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< T > TwitchPostGenericAsync< T > (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< T > TwitchPostGenericModelAsync< T > (string resource, ApiVersion api, RequestModel model, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< T > TwitchDeleteGenericAsync< T > (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< T > TwitchPutGenericAsync< T > (string resource, ApiVersion api, string payload=null, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< string > TwitchPutAsync (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
async Task< KeyValuePair< int, string > > TwitchPostAsync (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null)
 
Task PutBytesAsync (string url, byte[] payload)
 
async Task< T > GetGenericAsync< T > (string url, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, ApiVersion api=ApiVersion.Helix, string clientId=null)
 
- Protected Attributes inherited from TwitchLib.Api.Core.ApiBase
readonly IApiSettings Settings
 

Detailed Description

Analytics related APIs

Constructor & Destructor Documentation

◆ Analytics()

TwitchLib.Api.Helix.Analytics.Analytics ( IApiSettings  settings,
IRateLimiter  rateLimiter,
IHttpCallHandler  http 
)

Member Function Documentation

◆ GetExtensionAnalyticsAsync()

Task< GetExtensionAnalyticsResponse > TwitchLib.Api.Helix.Analytics.GetExtensionAnalyticsAsync ( string  extensionId,
DateTime?  startedAt = null,
DateTime?  endedAt = null,
int  first = 20,
string  after = null,
string  type = null,
string  accessToken = null 
)

Gets a URL that Extension developers can use to download analytics reports (CSV files) for their Extensions. The URL is valid for 5 minutes.

!! the Token used to call this API has to be from a member of the Org the Extension is registered to, or if not part of an Org, the Extension Developer !!

Required scope: analytics:read:extensions

Parameters
extensionIdClient ID value assigned to the extension when it is created. If this is specified, the returned URL points to an analytics report for just the specified extension.

If this is not specified, the response includes multiple URLs (paginated), pointing to separate analytics reports for each of the authenticated user’s Extensions.

Parameters
startedAtStarting date/time for returned reports, in RFC3339 format with the hours, minutes, and seconds zeroed out and the UTC timezone: YYYY-MM-DDT00:00:00Z.

If this is provided, endedAt also must be specified.

If startedAt is earlier than the default start date, the default date is used.

Default: 365 days before the report was issued. The file contains one row of data per day.

Parameters
endedAtEnding date/time for returned reports, in RFC3339 format with the hours, minutes, and seconds zeroed out and the UTC timezone: YYYY-MM-DDT00:00:00Z.

The report covers the entire ending date; e.g., if 2018-05-01T00:00:00Z is specified, the report covers up to 2018-05-01T23:59:59Z.

If this is provided, startedAt also must be specified.

If endedAt is later than the default end date, the default date is used.

Default: 1-2 days before the request was issued (depending on report availability).

Parameters
firstMaximum number of objects to return. Maximum: 100. Default: 20.
afterCursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response.

This applies only to queries without gameId.

Parameters
typeType of analytics report that is returned.

Currently, this field has no affect on the response as there is only one report type.

If additional types were added, using this field would return only the URL for the specified report.

Valid values: "overview_v2".

Parameters
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ GetGameAnalyticsAsync()

Task< GetGameAnalyticsResponse > TwitchLib.Api.Helix.Analytics.GetGameAnalyticsAsync ( string  gameId = null,
DateTime?  startedAt = null,
DateTime?  endedAt = null,
int  first = 20,
string  after = null,
string  type = null,
string  accessToken = null 
)

Gets a URL that game developers can use to download analytics reports (CSV files) for their games. The URL is valid for 5 minutes.

!! the Token used to call this API has to be from a member of the Org the Game is registered to !!

Required scope: analytics:read:games

Parameters
gameIdGame ID. If this is specified, the returned URL points to an analytics report for just the specified game.

If this is not specified, the response includes multiple URLs (paginated), pointing to separate analytics reports for each of the authenticated user’s games.

Parameters
startedAtStarting date/time for returned reports, in RFC3339 format with the hours, minutes, and seconds zeroed out and the UTC timezone: YYYY-MM-DDT00:00:00Z.

If this is provided, endedAt also must be specified.

If startedAt is earlier than the default start date, the default date is used.

Default: 365 days before the report was issued. The file contains one row of data per day.

Parameters
endedAtEnding date/time for returned reports, in RFC3339 format with the hours, minutes, and seconds zeroed out and the UTC timezone: YYYY-MM-DDT00:00:00Z.

The report covers the entire ending date; e.g., if 2018-05-01T00:00:00Z is specified, the report covers up to 2018-05-01T23:59:59Z.

If this is provided, startedAt also must be specified.

If endedAt is later than the default end date, the default date is used.

Default: 1-2 days before the request was issued (depending on report availability).

Parameters
firstMaximum number of objects to return. Maximum: 100. Default: 20.
afterCursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response.

This applies only to queries without gameId.

Parameters
typeType of analytics report that is returned.

Currently, this field has no affect on the response as there is only one report type.

If additional types were added, using this field would return only the URL for the specified report.

Valid values: "overview_v2".

Parameters
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

The documentation for this class was generated from the following file: