glitch-javascript-sdk 0.9.0 → 0.9.2

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.
@@ -0,0 +1,21 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class Influencers {
4
+ /**
5
+ * Get a list of influencers available on he platform.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencers
8
+ *
9
+ * @returns promise
10
+ */
11
+ static listInfluencers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
12
+ /**
13
+ * Retrieve information on a single influencer.
14
+ *
15
+ * @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencerById
16
+ *
17
+ * @returns promise
18
+ */
19
+ static viewInfluencer<T>(influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
20
+ }
21
+ export default Influencers;
@@ -19,6 +19,7 @@ import Campaigns from "./Campaigns";
19
19
  import Subscriptions from "./Subscriptions";
20
20
  import Messages from "./Messages";
21
21
  import Feedback from "./Feedback";
22
+ import Influencers from "./Influencers";
22
23
  export { Auth };
23
24
  export { Competitions };
24
25
  export { Communities };
@@ -40,3 +41,4 @@ export { Campaigns };
40
41
  export { Subscriptions };
41
42
  export { Messages };
42
43
  export { Feedback };
44
+ export { Influencers };
@@ -19,6 +19,7 @@ import { Campaigns } from "./api";
19
19
  import { Subscriptions } from "./api";
20
20
  import { Messages } from "./api";
21
21
  import { Feedback } from "./api";
22
+ import { Influencers } from "./api";
22
23
  import Requests from "./util/Requests";
23
24
  import Parser from "./util/Parser";
24
25
  import Session from "./util/Session";
@@ -45,6 +46,7 @@ declare class Glitch {
45
46
  Users: typeof Users;
46
47
  Events: typeof Events;
47
48
  Feedback: typeof Feedback;
49
+ Influencers: typeof Influencers;
48
50
  Teams: typeof Teams;
49
51
  Posts: typeof Posts;
50
52
  Messages: typeof Messages;
package/dist/esm/index.js CHANGED
@@ -9580,6 +9580,42 @@ var Feedback = /** @class */ (function () {
9580
9580
  return Feedback;
9581
9581
  }());
9582
9582
 
9583
+ var InfluencerRoutes = /** @class */ (function () {
9584
+ function InfluencerRoutes() {
9585
+ }
9586
+ InfluencerRoutes.routes = {
9587
+ listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
9588
+ viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
9589
+ };
9590
+ return InfluencerRoutes;
9591
+ }());
9592
+
9593
+ var Influencers = /** @class */ (function () {
9594
+ function Influencers() {
9595
+ }
9596
+ /**
9597
+ * Get a list of influencers available on he platform.
9598
+ *
9599
+ * @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencers
9600
+ *
9601
+ * @returns promise
9602
+ */
9603
+ Influencers.listInfluencers = function (params) {
9604
+ return Requests.processRoute(InfluencerRoutes.routes.listInfluencers, undefined, undefined, params);
9605
+ };
9606
+ /**
9607
+ * Retrieve information on a single influencer.
9608
+ *
9609
+ * @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencerById
9610
+ *
9611
+ * @returns promise
9612
+ */
9613
+ Influencers.viewInfluencer = function (influencer_id, params) {
9614
+ return Requests.processRoute(InfluencerRoutes.routes.viewInfluencer, undefined, { influencer_id: influencer_id }, params);
9615
+ };
9616
+ return Influencers;
9617
+ }());
9618
+
9583
9619
  var Parser = /** @class */ (function () {
9584
9620
  function Parser() {
9585
9621
  }
@@ -9984,6 +10020,7 @@ var Glitch = /** @class */ (function () {
9984
10020
  Users: Users,
9985
10021
  Events: Events,
9986
10022
  Feedback: Feedback,
10023
+ Influencers: Influencers,
9987
10024
  Teams: Teams,
9988
10025
  Posts: Posts,
9989
10026
  Messages: Messages,