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/esm/api/Titles.d.ts
CHANGED
|
@@ -670,5 +670,33 @@ declare class Titles {
|
|
|
670
670
|
limit?: number;
|
|
671
671
|
device_id?: string;
|
|
672
672
|
}): AxiosPromise<Response<T>>;
|
|
673
|
+
/**
|
|
674
|
+
* Get a curated, playable feed for the Swipe interface.
|
|
675
|
+
* This route ensures games have builds and images, and supports seeded randomization.
|
|
676
|
+
*
|
|
677
|
+
* @see https://api.glitch.fun/api/documentation#/Discovery/getSwipeFeed
|
|
678
|
+
*
|
|
679
|
+
* @param params Object of query params:
|
|
680
|
+
* - seed?: number (For consistent randomization)
|
|
681
|
+
* - genres?: string[] (Filter by genre names)
|
|
682
|
+
* - models?: string[] (premium, rental, subscription, free)
|
|
683
|
+
* - excluded_ids?: string[] (UUIDs to skip)
|
|
684
|
+
* - page?: number
|
|
685
|
+
* - per_page?: number
|
|
686
|
+
*/
|
|
687
|
+
static swipeFeed<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
688
|
+
/**
|
|
689
|
+
* Get a consolidated report of all earnings for a title, including
|
|
690
|
+
* playtime payouts, direct premium purchases, and rentals (minus refunds).
|
|
691
|
+
*
|
|
692
|
+
* @param title_id The UUID of the title.
|
|
693
|
+
* @returns AxiosPromise containing the consolidated financial data.
|
|
694
|
+
*/
|
|
695
|
+
static getDeveloperPayoutConsolidatedSummary<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
696
|
+
static wishlistHistory<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
697
|
+
static wishlistInfluencers<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
698
|
+
static wishlistAds<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
699
|
+
static wishlistUtms<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
700
|
+
static wishlistConversions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
673
701
|
}
|
|
674
702
|
export default Titles;
|
package/dist/esm/index.js
CHANGED
|
@@ -11981,6 +11981,20 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11981
11981
|
communityActivity: { url: '/titles/activity/trending', method: HTTP_METHODS.GET },
|
|
11982
11982
|
socialTrending: { url: '/titles/activity/social', method: HTTP_METHODS.GET },
|
|
11983
11983
|
discoveryQueue: { url: '/titles/discovery/queue', method: HTTP_METHODS.GET },
|
|
11984
|
+
/**
|
|
11985
|
+
* Curated, playable feed for the Swipe interface.
|
|
11986
|
+
* GET /titles/discovery/swipe
|
|
11987
|
+
*/
|
|
11988
|
+
swipeFeed: { url: '/titles/discovery/swipe', method: HTTP_METHODS.GET },
|
|
11989
|
+
developerPayoutConsolidatedSummary: {
|
|
11990
|
+
url: '/titles/{title_id}/payouts/consolidated-summary',
|
|
11991
|
+
method: HTTP_METHODS.GET
|
|
11992
|
+
},
|
|
11993
|
+
wishlistHistory: { url: '/titles/{title_id}/wishlist/history', method: HTTP_METHODS.GET },
|
|
11994
|
+
wishlistInfluencers: { url: '/titles/{title_id}/wishlist/influencers', method: HTTP_METHODS.GET },
|
|
11995
|
+
wishlistAds: { url: '/titles/{title_id}/wishlist/ads', method: HTTP_METHODS.GET },
|
|
11996
|
+
wishlistUtms: { url: '/titles/{title_id}/wishlist/utms', method: HTTP_METHODS.GET },
|
|
11997
|
+
wishlistConversions: { url: '/titles/{title_id}/wishlist/conversions', method: HTTP_METHODS.GET },
|
|
11984
11998
|
};
|
|
11985
11999
|
return TitlesRoute;
|
|
11986
12000
|
}());
|
|
@@ -12863,6 +12877,48 @@ var Titles = /** @class */ (function () {
|
|
|
12863
12877
|
Titles.getDiscoveryQueue = function (params) {
|
|
12864
12878
|
return Requests.processRoute(TitlesRoute.routes.discoveryQueue, {}, {}, params);
|
|
12865
12879
|
};
|
|
12880
|
+
/**
|
|
12881
|
+
* Get a curated, playable feed for the Swipe interface.
|
|
12882
|
+
* This route ensures games have builds and images, and supports seeded randomization.
|
|
12883
|
+
*
|
|
12884
|
+
* @see https://api.glitch.fun/api/documentation#/Discovery/getSwipeFeed
|
|
12885
|
+
*
|
|
12886
|
+
* @param params Object of query params:
|
|
12887
|
+
* - seed?: number (For consistent randomization)
|
|
12888
|
+
* - genres?: string[] (Filter by genre names)
|
|
12889
|
+
* - models?: string[] (premium, rental, subscription, free)
|
|
12890
|
+
* - excluded_ids?: string[] (UUIDs to skip)
|
|
12891
|
+
* - page?: number
|
|
12892
|
+
* - per_page?: number
|
|
12893
|
+
*/
|
|
12894
|
+
Titles.swipeFeed = function (params) {
|
|
12895
|
+
return Requests.processRoute(TitlesRoute.routes.swipeFeed, {}, undefined, params);
|
|
12896
|
+
};
|
|
12897
|
+
/**
|
|
12898
|
+
* Get a consolidated report of all earnings for a title, including
|
|
12899
|
+
* playtime payouts, direct premium purchases, and rentals (minus refunds).
|
|
12900
|
+
*
|
|
12901
|
+
* @param title_id The UUID of the title.
|
|
12902
|
+
* @returns AxiosPromise containing the consolidated financial data.
|
|
12903
|
+
*/
|
|
12904
|
+
Titles.getDeveloperPayoutConsolidatedSummary = function (title_id) {
|
|
12905
|
+
return Requests.processRoute(TitlesRoute.routes.developerPayoutConsolidatedSummary, {}, { title_id: title_id });
|
|
12906
|
+
};
|
|
12907
|
+
Titles.wishlistHistory = function (title_id, params) {
|
|
12908
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistHistory, undefined, { title_id: title_id }, params);
|
|
12909
|
+
};
|
|
12910
|
+
Titles.wishlistInfluencers = function (title_id, params) {
|
|
12911
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistInfluencers, undefined, { title_id: title_id }, params);
|
|
12912
|
+
};
|
|
12913
|
+
Titles.wishlistAds = function (title_id, params) {
|
|
12914
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistAds, undefined, { title_id: title_id }, params);
|
|
12915
|
+
};
|
|
12916
|
+
Titles.wishlistUtms = function (title_id, params) {
|
|
12917
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistUtms, undefined, { title_id: title_id }, params);
|
|
12918
|
+
};
|
|
12919
|
+
Titles.wishlistConversions = function (title_id, params) {
|
|
12920
|
+
return Requests.processRoute(TitlesRoute.routes.wishlistConversions, undefined, { title_id: title_id }, params);
|
|
12921
|
+
};
|
|
12866
12922
|
return Titles;
|
|
12867
12923
|
}());
|
|
12868
12924
|
|