glitch-javascript-sdk 0.8.6 → 0.8.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.
@@ -204,5 +204,65 @@ declare class Campaigns {
204
204
  * @returns promise
205
205
  */
206
206
  static deleteCampaignMention<T>(campaign_id: string, mention_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
207
+ /**
208
+ * Associate a country with the campaign.
209
+ *
210
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addCountryToCampaign
211
+ *
212
+ * @param data The country information to be passed to update the country campaigns information.
213
+ *
214
+ * @returns Promise
215
+ */
216
+ static addCountry<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
217
+ /**
218
+ * Remove a country
219
+ *
220
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeCountry
221
+ *
222
+ * @param country_id The id of the country to remove.
223
+ *
224
+ * @returns Promise
225
+ */
226
+ static removeCountry<T>(country_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
227
+ /**
228
+ * Associate a gender with the campaign.
229
+ *
230
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
231
+ *
232
+ * @param data The gener information to be passed to update the gender information.
233
+ *
234
+ * @returns Promise
235
+ */
236
+ static addGender<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
237
+ /**
238
+ * Remove a gender
239
+ *
240
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
241
+ *
242
+ * @param gender_id The id of the gender to remove.
243
+ *
244
+ * @returns Promise
245
+ */
246
+ static removeGender<T>(gender_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
247
+ /**
248
+ * Associate an ethnicity with the campaign.
249
+ *
250
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
251
+ *
252
+ * @param data The ethnicity information to be passed to update the campaign information.
253
+ *
254
+ * @returns Promise
255
+ */
256
+ static addEthnicity<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
257
+ /**
258
+ * Remove an ethnicity
259
+ *
260
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
261
+ *
262
+ * @param gender_id The id of the ethnicity to remove.
263
+ *
264
+ * @returns Promise
265
+ */
266
+ static removeEthnicity<T>(ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
207
267
  }
208
268
  export default Campaigns;
@@ -17,5 +17,29 @@ declare class Utility {
17
17
  * @returns promise
18
18
  */
19
19
  static listGenres<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
20
+ /**
21
+ * Get all the genders available on the platform.
22
+ *
23
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenders
24
+ *
25
+ * @returns promise
26
+ */
27
+ static listGenders<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
28
+ /**
29
+ * Get all the countries available on the platform.
30
+ *
31
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
32
+ *
33
+ * @returns promise
34
+ */
35
+ static listCountries<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
36
+ /**
37
+ * Get all the ethnicities available on the platform.
38
+ *
39
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
40
+ *
41
+ * @returns promise
42
+ */
43
+ static listEthnicities<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
20
44
  }
21
45
  export default Utility;
package/dist/esm/index.js CHANGED
@@ -8387,6 +8387,9 @@ var UtilityRoutes = /** @class */ (function () {
8387
8387
  UtilityRoutes.routes = {
8388
8388
  social_interactions: { url: '/util/socialinteractions', method: HTTP_METHODS.GET },
8389
8389
  genres: { url: '/util/genres', method: HTTP_METHODS.GET },
8390
+ countries: { url: '/util/countries', method: HTTP_METHODS.GET },
8391
+ genders: { url: '/util/genders', method: HTTP_METHODS.GET },
8392
+ ethnicities: { url: '/util/ethnicities', method: HTTP_METHODS.GET },
8390
8393
  };
8391
8394
  return UtilityRoutes;
8392
8395
  }());
@@ -8414,6 +8417,36 @@ var Utility = /** @class */ (function () {
8414
8417
  Utility.listGenres = function (params) {
8415
8418
  return Requests.processRoute(UtilityRoutes.routes.genres, undefined, undefined, params);
8416
8419
  };
8420
+ /**
8421
+ * Get all the genders available on the platform.
8422
+ *
8423
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenders
8424
+ *
8425
+ * @returns promise
8426
+ */
8427
+ Utility.listGenders = function (params) {
8428
+ return Requests.processRoute(UtilityRoutes.routes.genders, undefined, undefined, params);
8429
+ };
8430
+ /**
8431
+ * Get all the countries available on the platform.
8432
+ *
8433
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
8434
+ *
8435
+ * @returns promise
8436
+ */
8437
+ Utility.listCountries = function (params) {
8438
+ return Requests.processRoute(UtilityRoutes.routes.countries, undefined, undefined, params);
8439
+ };
8440
+ /**
8441
+ * Get all the ethnicities available on the platform.
8442
+ *
8443
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
8444
+ *
8445
+ * @returns promise
8446
+ */
8447
+ Utility.listEthnicities = function (params) {
8448
+ return Requests.processRoute(UtilityRoutes.routes.ethnicities, undefined, undefined, params);
8449
+ };
8417
8450
  return Utility;
8418
8451
  }());
8419
8452
 
@@ -8904,6 +8937,12 @@ var CampaignsRoute = /** @class */ (function () {
8904
8937
  getCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.GET },
8905
8938
  updateCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.PUT },
8906
8939
  deleteCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.DELETE },
8940
+ addCountry: { url: '/users/addCountry', method: HTTP_METHODS.POST },
8941
+ removeCountry: { url: '/users/removeCountry/{country_id}', method: HTTP_METHODS.DELETE },
8942
+ addGender: { url: '/users/addGender', method: HTTP_METHODS.POST },
8943
+ removeGender: { url: '/users/removeGender/{gender_id}', method: HTTP_METHODS.DELETE },
8944
+ addEthnicity: { url: '/users/addEthnicity', method: HTTP_METHODS.POST },
8945
+ removeEthnicity: { url: '/users/removeEthnicity/{ethnicity_id}', method: HTTP_METHODS.DELETE },
8907
8946
  };
8908
8947
  return CampaignsRoute;
8909
8948
  }());
@@ -9156,6 +9195,78 @@ var Campaigns = /** @class */ (function () {
9156
9195
  Campaigns.deleteCampaignMention = function (campaign_id, mention_id, params) {
9157
9196
  return Requests.processRoute(CampaignsRoute.routes.deleteCampaignMention, {}, { campaign_id: campaign_id, mention_id: mention_id }, params);
9158
9197
  };
9198
+ /**
9199
+ * Associate a country with the campaign.
9200
+ *
9201
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addCountryToCampaign
9202
+ *
9203
+ * @param data The country information to be passed to update the country campaigns information.
9204
+ *
9205
+ * @returns Promise
9206
+ */
9207
+ Campaigns.addCountry = function (data, params) {
9208
+ return Requests.processRoute(CampaignsRoute.routes.addCountry, data, undefined, params);
9209
+ };
9210
+ /**
9211
+ * Remove a country
9212
+ *
9213
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeCountry
9214
+ *
9215
+ * @param country_id The id of the country to remove.
9216
+ *
9217
+ * @returns Promise
9218
+ */
9219
+ Campaigns.removeCountry = function (country_id, params) {
9220
+ return Requests.processRoute(CampaignsRoute.routes.removeCountry, undefined, { country_id: country_id }, params);
9221
+ };
9222
+ /**
9223
+ * Associate a gender with the campaign.
9224
+ *
9225
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
9226
+ *
9227
+ * @param data The gener information to be passed to update the gender information.
9228
+ *
9229
+ * @returns Promise
9230
+ */
9231
+ Campaigns.addGender = function (data, params) {
9232
+ return Requests.processRoute(CampaignsRoute.routes.addGender, data, undefined, params);
9233
+ };
9234
+ /**
9235
+ * Remove a gender
9236
+ *
9237
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
9238
+ *
9239
+ * @param gender_id The id of the gender to remove.
9240
+ *
9241
+ * @returns Promise
9242
+ */
9243
+ Campaigns.removeGender = function (gender_id, params) {
9244
+ return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { gender_id: gender_id }, params);
9245
+ };
9246
+ /**
9247
+ * Associate an ethnicity with the campaign.
9248
+ *
9249
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
9250
+ *
9251
+ * @param data The ethnicity information to be passed to update the campaign information.
9252
+ *
9253
+ * @returns Promise
9254
+ */
9255
+ Campaigns.addEthnicity = function (data, params) {
9256
+ return Requests.processRoute(CampaignsRoute.routes.addGender, data, undefined, params);
9257
+ };
9258
+ /**
9259
+ * Remove an ethnicity
9260
+ *
9261
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
9262
+ *
9263
+ * @param gender_id The id of the ethnicity to remove.
9264
+ *
9265
+ * @returns Promise
9266
+ */
9267
+ Campaigns.removeEthnicity = function (ethnicity_id, params) {
9268
+ return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { ethnicity_id: ethnicity_id }, params);
9269
+ };
9159
9270
  return Campaigns;
9160
9271
  }());
9161
9272