glitch-javascript-sdk 1.0.3 → 1.0.4

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
@@ -973,6 +973,17 @@ declare class Users {
973
973
  * @returns promise
974
974
  */
975
975
  static syncInfluencer<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
976
+ /**
977
+ * Create profile data for an influencer based on their synced information and social media posts.
978
+ *
979
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/generateUserInfluencerProfile
980
+ *
981
+ * @param user_id The id of the user to update.
982
+ * @param data The data to update.
983
+ *
984
+ * @returns promise
985
+ */
986
+ static generateInfluencerProfile<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
976
987
  /**
977
988
  * Will follow and unfollow a user. If the user is not being following, it will follow the user. If they are following, it will unfollow the user. The current JWT is used for the follower.
978
989
  *
@@ -2966,6 +2977,14 @@ declare class Influencers {
2966
2977
  * @returns promise
2967
2978
  */
2968
2979
  static viewInfluencer<T>(influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2980
+ /**
2981
+ * Generate a profile for an influencer based on their data.
2982
+ *
2983
+ * @see https://api.glitch.fun/api/documentation#/Influencers/generateInfluencerProfile
2984
+ *
2985
+ * @returns promise
2986
+ */
2987
+ static generateProfile<T>(influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2969
2988
  }
2970
2989
 
2971
2990
  declare class Games {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -27,6 +27,17 @@ class Influencers {
27
27
  return Requests.processRoute(InfluencerRoutes.routes.viewInfluencer, undefined, {influencer_id : influencer_id}, params);
28
28
  }
29
29
 
30
+ /**
31
+ * Generate a profile for an influencer based on their data.
32
+ *
33
+ * @see https://api.glitch.fun/api/documentation#/Influencers/generateInfluencerProfile
34
+ *
35
+ * @returns promise
36
+ */
37
+ public static generateProfile<T>(influencer_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>> {
38
+ return Requests.processRoute(InfluencerRoutes.routes.generateProfile, undefined, {influencer_id : influencer_id}, params);
39
+ }
40
+
30
41
  }
31
42
 
32
43
  export default Influencers;
package/src/api/Users.ts CHANGED
@@ -91,6 +91,22 @@ class Users {
91
91
  return Requests.processRoute(UserRoutes.routes.syncInfluencer, {}, undefined, params);
92
92
  }
93
93
 
94
+ /**
95
+ * Create profile data for an influencer based on their synced information and social media posts.
96
+ *
97
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/generateUserInfluencerProfile
98
+ *
99
+ * @param user_id The id of the user to update.
100
+ * @param data The data to update.
101
+ *
102
+ * @returns promise
103
+ */
104
+ public static generateInfluencerProfile<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
105
+
106
+ return Requests.processRoute(UserRoutes.routes.generateInfluencerProfile, {}, undefined, params);
107
+ }
108
+
109
+
94
110
  /**
95
111
  * Will follow and unfollow a user. If the user is not being following, it will follow the user. If they are following, it will unfollow the user. The current JWT is used for the follower.
96
112
  *
@@ -6,6 +6,8 @@ class InfluencerRoutes {
6
6
  public static routes: { [key: string]: Route } = {
7
7
  listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
8
8
  viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
9
+ generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
10
+
9
11
  };
10
12
 
11
13
  }
@@ -10,6 +10,7 @@ class UserRoutes {
10
10
  profile :{ url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
11
11
  me : { url: '/users/me', method: HTTP_METHODS.GET },
12
12
  syncInfluencer : { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
13
+ generateInfluencerProfile : { url: '/users/generateInfluencerProfile', method: HTTP_METHODS.POST },
13
14
  oneTimeToken : { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
14
15
  uploadAvatar : { url: '/users/uploadAvatarImage', method: HTTP_METHODS.POST },
15
16
  uploadBanner : { url: '/users/uploadBannerImage', method: HTTP_METHODS.POST },