glitch-javascript-sdk 1.1.5 → 1.1.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/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/SocialPosts.d.ts +10 -0
- package/dist/esm/api/Users.d.ts +18 -0
- package/dist/esm/index.js +37 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +28 -0
- package/package.json +1 -1
- package/src/api/SocialPosts.ts +14 -0
- package/src/api/Users.ts +26 -0
- package/src/routes/SocialPostsRoute.ts +1 -0
- package/src/routes/UserRoutes.ts +2 -0
package/dist/cjs/index.js
CHANGED
|
@@ -20126,6 +20126,8 @@ var UserRoutes = /** @class */ (function () {
|
|
|
20126
20126
|
removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
|
|
20127
20127
|
getCampaignInvites: { url: '/users/getCampaignInvites', method: HTTP_METHODS.GET },
|
|
20128
20128
|
getPayouts: { url: '/users/payouts', method: HTTP_METHODS.GET },
|
|
20129
|
+
verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
|
|
20130
|
+
getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
|
|
20129
20131
|
};
|
|
20130
20132
|
return UserRoutes;
|
|
20131
20133
|
}());
|
|
@@ -20505,6 +20507,28 @@ var Users = /** @class */ (function () {
|
|
|
20505
20507
|
Users.removeType = function (type_id, params) {
|
|
20506
20508
|
return Requests.processRoute(UserRoutes.routes.removeType, undefined, { type_id: type_id }, params);
|
|
20507
20509
|
};
|
|
20510
|
+
/**
|
|
20511
|
+
* Verify a user's account to complete their sign-up process.
|
|
20512
|
+
*
|
|
20513
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/verifyAccount
|
|
20514
|
+
*
|
|
20515
|
+
* @param data The genre information to be passed to update the type information.
|
|
20516
|
+
*
|
|
20517
|
+
* @returns Promise
|
|
20518
|
+
*/
|
|
20519
|
+
Users.verifyAccount = function (data, params) {
|
|
20520
|
+
return Requests.processRoute(UserRoutes.routes.verifyAccount, data, undefined, params);
|
|
20521
|
+
};
|
|
20522
|
+
/**
|
|
20523
|
+
* Gets the instagram accounts associated with the user.
|
|
20524
|
+
*
|
|
20525
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getInstagramAccounts
|
|
20526
|
+
*
|
|
20527
|
+
* @returns promise
|
|
20528
|
+
*/
|
|
20529
|
+
Users.getInstagramAccounts = function (params) {
|
|
20530
|
+
return Requests.processRoute(UserRoutes.routes.getInstagramAccounts, undefined, undefined, params);
|
|
20531
|
+
};
|
|
20508
20532
|
return Users;
|
|
20509
20533
|
}());
|
|
20510
20534
|
|
|
@@ -22039,6 +22063,7 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
22039
22063
|
createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
|
|
22040
22064
|
retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
|
|
22041
22065
|
dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
|
|
22066
|
+
history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
|
|
22042
22067
|
};
|
|
22043
22068
|
return SocialPostsRoute;
|
|
22044
22069
|
}());
|
|
@@ -22090,6 +22115,18 @@ var SocialPosts = /** @class */ (function () {
|
|
|
22090
22115
|
SocialPosts.dispute = function (post_id, data, params) {
|
|
22091
22116
|
return Requests.processRoute(SocialPostsRoute.routes.dispute, data, { post_id: post_id }, params);
|
|
22092
22117
|
};
|
|
22118
|
+
/**
|
|
22119
|
+
* Get the change of the post metrics over a period of time.
|
|
22120
|
+
*
|
|
22121
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
|
|
22122
|
+
*
|
|
22123
|
+
* @param post_id The id fo the post to retrieve.
|
|
22124
|
+
*
|
|
22125
|
+
* @returns promise
|
|
22126
|
+
*/
|
|
22127
|
+
SocialPosts.history = function (post_id, params) {
|
|
22128
|
+
return Requests.processRoute(SocialPostsRoute.routes.history, {}, { post_id: post_id }, params);
|
|
22129
|
+
};
|
|
22093
22130
|
return SocialPosts;
|
|
22094
22131
|
}());
|
|
22095
22132
|
|