glitch-javascript-sdk 3.0.7 → 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 +34 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +13 -0
- package/dist/esm/index.js +34 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +13 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +49 -14
- package/src/routes/TitlesRoute.ts +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -4607,6 +4607,19 @@ declare class Titles {
|
|
|
4607
4607
|
* - per_page?: number
|
|
4608
4608
|
*/
|
|
4609
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>>;
|
|
4610
4623
|
}
|
|
4611
4624
|
|
|
4612
4625
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -1254,23 +1254,58 @@ class Titles {
|
|
|
1254
1254
|
return Requests.processRoute(TitlesRoute.routes.discoveryQueue, {}, {}, params);
|
|
1255
1255
|
}
|
|
1256
1256
|
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
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
1271
|
public static swipeFeed<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
1272
1272
|
return Requests.processRoute(TitlesRoute.routes.swipeFeed, {}, undefined, params);
|
|
1273
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
|
+
}
|
|
1274
1309
|
}
|
|
1275
1310
|
|
|
1276
1311
|
export default Titles;
|
|
@@ -288,6 +288,17 @@ class TitlesRoute {
|
|
|
288
288
|
*/
|
|
289
289
|
swipeFeed: { url: '/titles/discovery/swipe', method: HTTP_METHODS.GET },
|
|
290
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
|
+
|
|
291
302
|
};
|
|
292
303
|
|
|
293
304
|
}
|