glitch-javascript-sdk 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +22 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +10 -0
- package/dist/esm/index.js +22 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +37 -5
- package/src/routes/TitlesRoute.ts +8 -0
package/dist/index.d.ts
CHANGED
|
@@ -2998,6 +2998,16 @@ declare class Titles {
|
|
|
2998
2998
|
static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2999
2999
|
static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3000
3000
|
static distinctDimensions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3001
|
+
/**
|
|
3002
|
+
* List sessions for a specific title, with optional filters and pagination.
|
|
3003
|
+
* Returns a paginated list of sessions with start/end times, session_length, user info, etc.
|
|
3004
|
+
*/
|
|
3005
|
+
static listSessions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3006
|
+
/**
|
|
3007
|
+
* Get aggregated average session length data (daily/weekly/monthly) for a title.
|
|
3008
|
+
* Optionally filter by platform/device_type/OS/version and group by one dimension.
|
|
3009
|
+
*/
|
|
3010
|
+
static sessionsAverage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3001
3011
|
}
|
|
3002
3012
|
|
|
3003
3013
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -318,10 +318,10 @@ class Titles {
|
|
|
318
318
|
return Requests.processRoute(TitlesRoute.routes.search, {}, undefined, params);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
/**
|
|
322
|
+
* List game installs for a specific title.
|
|
323
|
+
*/
|
|
324
|
+
public static listInstalls<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
325
325
|
return Requests.processRoute(TitlesRoute.routes.listInstalls, {}, { title_id: title_id }, params);
|
|
326
326
|
}
|
|
327
327
|
|
|
@@ -363,7 +363,39 @@ class Titles {
|
|
|
363
363
|
|
|
364
364
|
public static distinctDimensions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
365
365
|
return Requests.processRoute(TitlesRoute.routes.distinctDimensions, {}, { title_id }, params);
|
|
366
|
-
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* List sessions for a specific title, with optional filters and pagination.
|
|
370
|
+
* Returns a paginated list of sessions with start/end times, session_length, user info, etc.
|
|
371
|
+
*/
|
|
372
|
+
public static listSessions<T>(
|
|
373
|
+
title_id: string,
|
|
374
|
+
params?: Record<string, any>
|
|
375
|
+
): AxiosPromise<Response<T>> {
|
|
376
|
+
return Requests.processRoute(
|
|
377
|
+
TitlesRoute.routes.listSessions,
|
|
378
|
+
{},
|
|
379
|
+
{ title_id },
|
|
380
|
+
params
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Get aggregated average session length data (daily/weekly/monthly) for a title.
|
|
386
|
+
* Optionally filter by platform/device_type/OS/version and group by one dimension.
|
|
387
|
+
*/
|
|
388
|
+
public static sessionsAverage<T>(
|
|
389
|
+
title_id: string,
|
|
390
|
+
params?: Record<string, any>
|
|
391
|
+
): AxiosPromise<Response<T>> {
|
|
392
|
+
return Requests.processRoute(
|
|
393
|
+
TitlesRoute.routes.sessionsAverage,
|
|
394
|
+
{},
|
|
395
|
+
{ title_id },
|
|
396
|
+
params
|
|
397
|
+
);
|
|
398
|
+
}
|
|
367
399
|
|
|
368
400
|
}
|
|
369
401
|
|
|
@@ -32,6 +32,14 @@ class TitlesRoute {
|
|
|
32
32
|
activeRetentions: { url: '/titles/{title_id}/retentions/active', method: HTTP_METHODS.GET },
|
|
33
33
|
retentionAnalysis: { url: '/titles/{title_id}/retentions/analysis', method: HTTP_METHODS.GET },
|
|
34
34
|
distinctDimensions: { url: '/titles/{title_id}/installs/distinctDimensions', method: HTTP_METHODS.GET },
|
|
35
|
+
listSessions: {
|
|
36
|
+
url: '/titles/{title_id}/installs/sessions',
|
|
37
|
+
method: HTTP_METHODS.GET
|
|
38
|
+
},
|
|
39
|
+
sessionsAverage: {
|
|
40
|
+
url: '/titles/{title_id}/installs/sessions/average',
|
|
41
|
+
method: HTTP_METHODS.GET
|
|
42
|
+
},
|
|
35
43
|
};
|
|
36
44
|
|
|
37
45
|
}
|