glitch-javascript-sdk 0.8.5 → 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.
package/dist/cjs/index.js CHANGED
@@ -20062,6 +20062,8 @@ var UserRoutes = /** @class */ (function () {
20062
20062
  aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
20063
20063
  getYoutubeChannels: { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
20064
20064
  getFacebookGroups: { url: '/users/getFacebookGroups', method: HTTP_METHODS.GET },
20065
+ addGenre: { url: '/users/addGenre', method: HTTP_METHODS.POST },
20066
+ removeGenre: { url: '/users/removeGenre/{genre_id}', method: HTTP_METHODS.DELETE },
20065
20067
  };
20066
20068
  return UserRoutes;
20067
20069
  }());
@@ -20341,6 +20343,30 @@ var Users = /** @class */ (function () {
20341
20343
  Users.getFacebookGroups = function (params) {
20342
20344
  return Requests.processRoute(UserRoutes.routes.getFacebookGroups, undefined, undefined, params);
20343
20345
  };
20346
+ /**
20347
+ * Add a genre to a user.
20348
+ *
20349
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
20350
+ *
20351
+ * @param data The genre information to be passed to update the genre information.
20352
+ *
20353
+ * @returns Promise
20354
+ */
20355
+ Users.addGenre = function (data, params) {
20356
+ return Requests.processRoute(UserRoutes.routes.addGenre, data, undefined, params);
20357
+ };
20358
+ /**
20359
+ * Remove a genre from a user.
20360
+ *
20361
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
20362
+ *
20363
+ * @param genre_id The id of the genre to remove.
20364
+ *
20365
+ * @returns Promise
20366
+ */
20367
+ Users.removeGenre = function (genre_id, params) {
20368
+ return Requests.processRoute(UserRoutes.routes.removeGenre, undefined, { genre_id: genre_id }, params);
20369
+ };
20344
20370
  return Users;
20345
20371
  }());
20346
20372
 
@@ -21544,6 +21570,10 @@ var UtilityRoutes = /** @class */ (function () {
21544
21570
  }
21545
21571
  UtilityRoutes.routes = {
21546
21572
  social_interactions: { url: '/util/socialinteractions', method: HTTP_METHODS.GET },
21573
+ genres: { url: '/util/genres', method: HTTP_METHODS.GET },
21574
+ countries: { url: '/util/countries', method: HTTP_METHODS.GET },
21575
+ genders: { url: '/util/genders', method: HTTP_METHODS.GET },
21576
+ ethnicities: { url: '/util/ethnicities', method: HTTP_METHODS.GET },
21547
21577
  };
21548
21578
  return UtilityRoutes;
21549
21579
  }());
@@ -21561,6 +21591,46 @@ var Utility = /** @class */ (function () {
21561
21591
  Utility.listSocialInteractions = function (params) {
21562
21592
  return Requests.processRoute(UtilityRoutes.routes.social_interactions, undefined, undefined, params);
21563
21593
  };
21594
+ /**
21595
+ * Get all the genres available on the platform.
21596
+ *
21597
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
21598
+ *
21599
+ * @returns promise
21600
+ */
21601
+ Utility.listGenres = function (params) {
21602
+ return Requests.processRoute(UtilityRoutes.routes.genres, undefined, undefined, params);
21603
+ };
21604
+ /**
21605
+ * Get all the genders available on the platform.
21606
+ *
21607
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenders
21608
+ *
21609
+ * @returns promise
21610
+ */
21611
+ Utility.listGenders = function (params) {
21612
+ return Requests.processRoute(UtilityRoutes.routes.genders, undefined, undefined, params);
21613
+ };
21614
+ /**
21615
+ * Get all the countries available on the platform.
21616
+ *
21617
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
21618
+ *
21619
+ * @returns promise
21620
+ */
21621
+ Utility.listCountries = function (params) {
21622
+ return Requests.processRoute(UtilityRoutes.routes.countries, undefined, undefined, params);
21623
+ };
21624
+ /**
21625
+ * Get all the ethnicities available on the platform.
21626
+ *
21627
+ * @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
21628
+ *
21629
+ * @returns promise
21630
+ */
21631
+ Utility.listEthnicities = function (params) {
21632
+ return Requests.processRoute(UtilityRoutes.routes.ethnicities, undefined, undefined, params);
21633
+ };
21564
21634
  return Utility;
21565
21635
  }());
21566
21636
 
@@ -22051,6 +22121,12 @@ var CampaignsRoute = /** @class */ (function () {
22051
22121
  getCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.GET },
22052
22122
  updateCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.PUT },
22053
22123
  deleteCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.DELETE },
22124
+ addCountry: { url: '/users/addCountry', method: HTTP_METHODS.POST },
22125
+ removeCountry: { url: '/users/removeCountry/{country_id}', method: HTTP_METHODS.DELETE },
22126
+ addGender: { url: '/users/addGender', method: HTTP_METHODS.POST },
22127
+ removeGender: { url: '/users/removeGender/{gender_id}', method: HTTP_METHODS.DELETE },
22128
+ addEthnicity: { url: '/users/addEthnicity', method: HTTP_METHODS.POST },
22129
+ removeEthnicity: { url: '/users/removeEthnicity/{ethnicity_id}', method: HTTP_METHODS.DELETE },
22054
22130
  };
22055
22131
  return CampaignsRoute;
22056
22132
  }());
@@ -22303,6 +22379,78 @@ var Campaigns = /** @class */ (function () {
22303
22379
  Campaigns.deleteCampaignMention = function (campaign_id, mention_id, params) {
22304
22380
  return Requests.processRoute(CampaignsRoute.routes.deleteCampaignMention, {}, { campaign_id: campaign_id, mention_id: mention_id }, params);
22305
22381
  };
22382
+ /**
22383
+ * Associate a country with the campaign.
22384
+ *
22385
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addCountryToCampaign
22386
+ *
22387
+ * @param data The country information to be passed to update the country campaigns information.
22388
+ *
22389
+ * @returns Promise
22390
+ */
22391
+ Campaigns.addCountry = function (data, params) {
22392
+ return Requests.processRoute(CampaignsRoute.routes.addCountry, data, undefined, params);
22393
+ };
22394
+ /**
22395
+ * Remove a country
22396
+ *
22397
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeCountry
22398
+ *
22399
+ * @param country_id The id of the country to remove.
22400
+ *
22401
+ * @returns Promise
22402
+ */
22403
+ Campaigns.removeCountry = function (country_id, params) {
22404
+ return Requests.processRoute(CampaignsRoute.routes.removeCountry, undefined, { country_id: country_id }, params);
22405
+ };
22406
+ /**
22407
+ * Associate a gender with the campaign.
22408
+ *
22409
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
22410
+ *
22411
+ * @param data The gener information to be passed to update the gender information.
22412
+ *
22413
+ * @returns Promise
22414
+ */
22415
+ Campaigns.addGender = function (data, params) {
22416
+ return Requests.processRoute(CampaignsRoute.routes.addGender, data, undefined, params);
22417
+ };
22418
+ /**
22419
+ * Remove a gender
22420
+ *
22421
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
22422
+ *
22423
+ * @param gender_id The id of the gender to remove.
22424
+ *
22425
+ * @returns Promise
22426
+ */
22427
+ Campaigns.removeGender = function (gender_id, params) {
22428
+ return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { gender_id: gender_id }, params);
22429
+ };
22430
+ /**
22431
+ * Associate an ethnicity with the campaign.
22432
+ *
22433
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
22434
+ *
22435
+ * @param data The ethnicity information to be passed to update the campaign information.
22436
+ *
22437
+ * @returns Promise
22438
+ */
22439
+ Campaigns.addEthnicity = function (data, params) {
22440
+ return Requests.processRoute(CampaignsRoute.routes.addGender, data, undefined, params);
22441
+ };
22442
+ /**
22443
+ * Remove an ethnicity
22444
+ *
22445
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
22446
+ *
22447
+ * @param gender_id The id of the ethnicity to remove.
22448
+ *
22449
+ * @returns Promise
22450
+ */
22451
+ Campaigns.removeEthnicity = function (ethnicity_id, params) {
22452
+ return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { ethnicity_id: ethnicity_id }, params);
22453
+ };
22306
22454
  return Campaigns;
22307
22455
  }());
22308
22456