glitch-javascript-sdk 3.0.6 → 3.0.8
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 +56 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +28 -0
- package/dist/esm/index.js +56 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +28 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +53 -0
- package/src/routes/TitlesRoute.ts +17 -0
package/dist/index.d.ts
CHANGED
|
@@ -4592,6 +4592,34 @@ declare class Titles {
|
|
|
4592
4592
|
limit?: number;
|
|
4593
4593
|
device_id?: string;
|
|
4594
4594
|
}): AxiosPromise<Response<T>>;
|
|
4595
|
+
/**
|
|
4596
|
+
* Get a curated, playable feed for the Swipe interface.
|
|
4597
|
+
* This route ensures games have builds and images, and supports seeded randomization.
|
|
4598
|
+
*
|
|
4599
|
+
* @see https://api.glitch.fun/api/documentation#/Discovery/getSwipeFeed
|
|
4600
|
+
*
|
|
4601
|
+
* @param params Object of query params:
|
|
4602
|
+
* - seed?: number (For consistent randomization)
|
|
4603
|
+
* - genres?: string[] (Filter by genre names)
|
|
4604
|
+
* - models?: string[] (premium, rental, subscription, free)
|
|
4605
|
+
* - excluded_ids?: string[] (UUIDs to skip)
|
|
4606
|
+
* - page?: number
|
|
4607
|
+
* - per_page?: number
|
|
4608
|
+
*/
|
|
4609
|
+
static swipeFeed<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4610
|
+
/**
|
|
4611
|
+
* Get a consolidated report of all earnings for a title, including
|
|
4612
|
+
* playtime payouts, direct premium purchases, and rentals (minus refunds).
|
|
4613
|
+
*
|
|
4614
|
+
* @param title_id The UUID of the title.
|
|
4615
|
+
* @returns AxiosPromise containing the consolidated financial data.
|
|
4616
|
+
*/
|
|
4617
|
+
static getDeveloperPayoutConsolidatedSummary<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4618
|
+
static wishlistHistory<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4619
|
+
static wishlistInfluencers<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4620
|
+
static wishlistAds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4621
|
+
static wishlistUtms<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4622
|
+
static wishlistConversions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4595
4623
|
}
|
|
4596
4624
|
|
|
4597
4625
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -1253,6 +1253,59 @@ class Titles {
|
|
|
1253
1253
|
public static getDiscoveryQueue<T>(params?: { limit?: number, device_id?: string }): AxiosPromise<Response<T>> {
|
|
1254
1254
|
return Requests.processRoute(TitlesRoute.routes.discoveryQueue, {}, {}, params);
|
|
1255
1255
|
}
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* Get a curated, playable feed for the Swipe interface.
|
|
1259
|
+
* This route ensures games have builds and images, and supports seeded randomization.
|
|
1260
|
+
*
|
|
1261
|
+
* @see https://api.glitch.fun/api/documentation#/Discovery/getSwipeFeed
|
|
1262
|
+
*
|
|
1263
|
+
* @param params Object of query params:
|
|
1264
|
+
* - seed?: number (For consistent randomization)
|
|
1265
|
+
* - genres?: string[] (Filter by genre names)
|
|
1266
|
+
* - models?: string[] (premium, rental, subscription, free)
|
|
1267
|
+
* - excluded_ids?: string[] (UUIDs to skip)
|
|
1268
|
+
* - page?: number
|
|
1269
|
+
* - per_page?: number
|
|
1270
|
+
*/
|
|
1271
|
+
public static swipeFeed<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1272
|
+
return Requests.processRoute(TitlesRoute.routes.swipeFeed, {}, undefined, params);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* Get a consolidated report of all earnings for a title, including
|
|
1277
|
+
* playtime payouts, direct premium purchases, and rentals (minus refunds).
|
|
1278
|
+
*
|
|
1279
|
+
* @param title_id The UUID of the title.
|
|
1280
|
+
* @returns AxiosPromise containing the consolidated financial data.
|
|
1281
|
+
*/
|
|
1282
|
+
public static getDeveloperPayoutConsolidatedSummary<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
1283
|
+
return Requests.processRoute(
|
|
1284
|
+
TitlesRoute.routes.developerPayoutConsolidatedSummary,
|
|
1285
|
+
{},
|
|
1286
|
+
{ title_id }
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
public static wishlistHistory<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1291
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistHistory, undefined, { title_id }, params);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
public static wishlistInfluencers<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1295
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistInfluencers, undefined, { title_id }, params);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
public static wishlistAds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1299
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistAds, undefined, { title_id }, params);
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
public static wishlistUtms<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1303
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistUtms, undefined, { title_id }, params);
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
public static wishlistConversions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1307
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistConversions, undefined, { title_id }, params);
|
|
1308
|
+
}
|
|
1256
1309
|
}
|
|
1257
1310
|
|
|
1258
1311
|
export default Titles;
|
|
@@ -282,6 +282,23 @@ class TitlesRoute {
|
|
|
282
282
|
socialTrending: { url: '/titles/activity/social', method: HTTP_METHODS.GET },
|
|
283
283
|
discoveryQueue: { url: '/titles/discovery/queue', method: HTTP_METHODS.GET },
|
|
284
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Curated, playable feed for the Swipe interface.
|
|
287
|
+
* GET /titles/discovery/swipe
|
|
288
|
+
*/
|
|
289
|
+
swipeFeed: { url: '/titles/discovery/swipe', method: HTTP_METHODS.GET },
|
|
290
|
+
|
|
291
|
+
developerPayoutConsolidatedSummary: {
|
|
292
|
+
url: '/titles/{title_id}/payouts/consolidated-summary',
|
|
293
|
+
method: HTTP_METHODS.GET
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
wishlistHistory: { url: '/titles/{title_id}/wishlist/history', method: HTTP_METHODS.GET },
|
|
297
|
+
wishlistInfluencers: { url: '/titles/{title_id}/wishlist/influencers', method: HTTP_METHODS.GET },
|
|
298
|
+
wishlistAds: { url: '/titles/{title_id}/wishlist/ads', method: HTTP_METHODS.GET },
|
|
299
|
+
wishlistUtms: { url: '/titles/{title_id}/wishlist/utms', method: HTTP_METHODS.GET },
|
|
300
|
+
wishlistConversions: { url: '/titles/{title_id}/wishlist/conversions', method: HTTP_METHODS.GET },
|
|
301
|
+
|
|
285
302
|
};
|
|
286
303
|
|
|
287
304
|
}
|