glitch-javascript-sdk 2.9.6 → 2.9.7

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
@@ -4470,6 +4470,41 @@ declare class Titles {
4470
4470
  */
4471
4471
  static getProgressionLeaderboard<T>(title_id: string, api_key: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4472
4472
  static getTechnicalEventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4473
+ /**
4474
+ * Get games ranked by community activity (active players).
4475
+ *
4476
+ * @param params
4477
+ * - window: number (hours, default 24)
4478
+ * - limit: number (default 10)
4479
+ */
4480
+ static getCommunityActivity<T>(params?: {
4481
+ window?: number;
4482
+ limit?: number;
4483
+ }): AxiosPromise<Response<T>>;
4484
+ /**
4485
+ * Get games trending on social media.
4486
+ *
4487
+ * @param params
4488
+ * - type: 'influencer' (campaigns) or 'organic' (non-paid)
4489
+ * - window: number (hours, default 168)
4490
+ * - limit: number (default 10)
4491
+ */
4492
+ static getSocialTrending<T>(params: {
4493
+ type: 'influencer' | 'organic';
4494
+ window?: number;
4495
+ limit?: number;
4496
+ }): AxiosPromise<Response<T>>;
4497
+ /**
4498
+ * Get a personalized discovery queue of games.
4499
+ *
4500
+ * @param params
4501
+ * - limit: number (default 12)
4502
+ * - device_id: string (highly recommended for guest tracking)
4503
+ */
4504
+ static getDiscoveryQueue<T>(params?: {
4505
+ limit?: number;
4506
+ device_id?: string;
4507
+ }): AxiosPromise<Response<T>>;
4473
4508
  }
4474
4509
 
4475
4510
  declare class Campaigns {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.9.6",
3
+ "version": "2.9.7",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Titles.ts CHANGED
@@ -1219,6 +1219,40 @@ class Titles {
1219
1219
  public static getTechnicalEventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
1220
1220
  return Requests.processRoute(TitlesRoute.routes.getTechnicalEventSummary, {}, { title_id }, params);
1221
1221
  }
1222
+
1223
+ /**
1224
+ * Get games ranked by community activity (active players).
1225
+ *
1226
+ * @param params
1227
+ * - window: number (hours, default 24)
1228
+ * - limit: number (default 10)
1229
+ */
1230
+ public static getCommunityActivity<T>(params?: { window?: number, limit?: number }): AxiosPromise<Response<T>> {
1231
+ return Requests.processRoute(TitlesRoute.routes.communityActivity, {}, {}, params);
1232
+ }
1233
+
1234
+ /**
1235
+ * Get games trending on social media.
1236
+ *
1237
+ * @param params
1238
+ * - type: 'influencer' (campaigns) or 'organic' (non-paid)
1239
+ * - window: number (hours, default 168)
1240
+ * - limit: number (default 10)
1241
+ */
1242
+ public static getSocialTrending<T>(params: { type: 'influencer' | 'organic', window?: number, limit?: number }): AxiosPromise<Response<T>> {
1243
+ return Requests.processRoute(TitlesRoute.routes.socialTrending, {}, {}, params);
1244
+ }
1245
+
1246
+ /**
1247
+ * Get a personalized discovery queue of games.
1248
+ *
1249
+ * @param params
1250
+ * - limit: number (default 12)
1251
+ * - device_id: string (highly recommended for guest tracking)
1252
+ */
1253
+ public static getDiscoveryQueue<T>(params?: { limit?: number, device_id?: string }): AxiosPromise<Response<T>> {
1254
+ return Requests.processRoute(TitlesRoute.routes.discoveryQueue, {}, {}, params);
1255
+ }
1222
1256
  }
1223
1257
 
1224
1258
  export default Titles;
@@ -278,6 +278,9 @@ class TitlesRoute {
278
278
  progressionPlayerAchievements: { url: '/titles/{title_id}/installs/{install_id}/achievements', method: HTTP_METHODS.GET },
279
279
  progressionLeaderboardView: { url: '/titles/{title_id}/leaderboards/{api_key}', method: HTTP_METHODS.GET },
280
280
 
281
+ communityActivity: { url: '/titles/activity/trending', method: HTTP_METHODS.GET },
282
+ socialTrending: { url: '/titles/activity/social', method: HTTP_METHODS.GET },
283
+
281
284
 
282
285
  };
283
286