glitch-javascript-sdk 1.6.7 → 1.6.9

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/index.d.ts CHANGED
@@ -2975,6 +2975,28 @@ declare class Titles {
2975
2975
  * - page?: number, per_page?: number
2976
2976
  */
2977
2977
  static search<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
2978
+ /**
2979
+ * List game installs for a specific title.
2980
+ */
2981
+ static listInstalls<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2982
+ /**
2983
+ * View a single game install record.
2984
+ */
2985
+ static viewInstall<T>(title_id: string, install_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2986
+ /**
2987
+ * Create a new game install record.
2988
+ */
2989
+ static createInstall<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
2990
+ /**
2991
+ * List retention events for a specific title.
2992
+ */
2993
+ static listRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2994
+ /**
2995
+ * Get a summary report of retention events for a specific title.
2996
+ */
2997
+ static retentionSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2998
+ static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2999
+ static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2978
3000
  }
2979
3001
 
2980
3002
  declare class Campaigns {
@@ -4530,14 +4552,14 @@ declare class Hashtags {
4530
4552
  *
4531
4553
  * @returns A promise
4532
4554
  */
4533
- static list<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
4555
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
4534
4556
  /**
4535
4557
  * Get the top hashtags for a title, campaign, or schedule.
4536
4558
  *
4537
4559
  * @param params - e.g. { title_id: '...', limit: 10, sort: 'sum_views', start_date: 'YYYY-MM-DD', end_date: 'YYYY-MM-DD' }
4538
4560
  * @returns AxiosPromise of an array of aggregated hashtags
4539
4561
  */
4540
- static top<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
4562
+ static top<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
4541
4563
  }
4542
4564
 
4543
4565
  interface Route {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -12,8 +12,8 @@ class Hashtags {
12
12
  *
13
13
  * @returns A promise
14
14
  */
15
- public static list<T>(data? : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
16
- return Requests.processRoute(HashtagRoute.routes.list, data, {}, params);
15
+ public static list<T>(params?: Record<string, any>) : AxiosPromise<Response<T>> {
16
+ return Requests.processRoute(HashtagRoute.routes.list, {}, {}, params);
17
17
  }
18
18
 
19
19
  /**
@@ -22,8 +22,8 @@ class Hashtags {
22
22
  * @param params - e.g. { title_id: '...', limit: 10, sort: 'sum_views', start_date: 'YYYY-MM-DD', end_date: 'YYYY-MM-DD' }
23
23
  * @returns AxiosPromise of an array of aggregated hashtags
24
24
  */
25
- public static top<T>(data? : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
26
- return Requests.processRoute(HashtagRoute.routes.top, data, {}, params);
25
+ public static top<T>(params?: Record<string, any>) : AxiosPromise<Response<T>> {
26
+ return Requests.processRoute(HashtagRoute.routes.top, {}, {}, params);
27
27
  }
28
28
 
29
29
  }
package/src/api/Titles.ts CHANGED
@@ -318,6 +318,49 @@ class Titles {
318
318
  return Requests.processRoute(TitlesRoute.routes.search, {}, undefined, params);
319
319
  }
320
320
 
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
+ return Requests.processRoute(TitlesRoute.routes.listInstalls, {}, { title_id: title_id }, params);
326
+ }
327
+
328
+ /**
329
+ * View a single game install record.
330
+ */
331
+ public static viewInstall<T>(title_id: string, install_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
332
+ return Requests.processRoute(TitlesRoute.routes.viewInstall, {}, { title_id: title_id, install_id: install_id }, params);
333
+ }
334
+
335
+ /**
336
+ * Create a new game install record.
337
+ */
338
+ public static createInstall<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
339
+ return Requests.processRoute(TitlesRoute.routes.createInstall, data, { title_id: title_id }, params);
340
+ }
341
+
342
+ /**
343
+ * List retention events for a specific title.
344
+ */
345
+ public static listRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
346
+ return Requests.processRoute(TitlesRoute.routes.listRetentions, {}, { title_id: title_id }, params);
347
+ }
348
+
349
+ /**
350
+ * Get a summary report of retention events for a specific title.
351
+ */
352
+ public static retentionSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
353
+ return Requests.processRoute(TitlesRoute.routes.retentionSummary, {}, { title_id: title_id }, params);
354
+ }
355
+
356
+ public static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
357
+ return Requests.processRoute(TitlesRoute.routes.activeRetentions, {}, { title_id }, params);
358
+ }
359
+
360
+ public static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
361
+ return Requests.processRoute(TitlesRoute.routes.retentionAnalysis, {}, { title_id }, params);
362
+ }
363
+
321
364
  }
322
365
 
323
366
  export default Titles;
@@ -24,6 +24,13 @@ class TitlesRoute {
24
24
  listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
25
25
  revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
26
26
  search: { url: '/titles/search', method: HTTP_METHODS.GET },
27
+ listInstalls: { url: '/titles/{title_id}/installs', method: HTTP_METHODS.GET },
28
+ viewInstall: { url: '/titles/{title_id}/installs/{install_id}', method: HTTP_METHODS.GET },
29
+ createInstall: { url: '/titles/{title_id}/installs', method: HTTP_METHODS.POST },
30
+ listRetentions: { url: '/titles/{title_id}/retentions', method: HTTP_METHODS.GET },
31
+ retentionSummary: { url: '/titles/{title_id}/retentions/summary', method: HTTP_METHODS.GET },
32
+ activeRetentions: { url: '/titles/{title_id}/retentions/active', method: HTTP_METHODS.GET },
33
+ retentionAnalysis: { url: '/titles/{title_id}/retentions/analysis', method: HTTP_METHODS.GET },
27
34
  };
28
35
 
29
36
  }