glitch-javascript-sdk 1.1.4 → 1.1.5
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 +55 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Influencers.d.ts +40 -0
- package/dist/esm/index.js +55 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +40 -0
- package/package.json +1 -1
- package/src/api/Influencers.ts +56 -0
- package/src/routes/InfluencerRoutes.ts +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -3091,6 +3091,46 @@ declare class Influencers {
|
|
|
3091
3091
|
* @returns promise
|
|
3092
3092
|
*/
|
|
3093
3093
|
static generateProfile<T>(influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3094
|
+
/**
|
|
3095
|
+
* List all the notes left about an influencer.
|
|
3096
|
+
*
|
|
3097
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencersNotes
|
|
3098
|
+
*
|
|
3099
|
+
* @returns promise
|
|
3100
|
+
*/
|
|
3101
|
+
static listNotes<T>(influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3102
|
+
/**
|
|
3103
|
+
* View a note left about an influencer.
|
|
3104
|
+
*
|
|
3105
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencersNote
|
|
3106
|
+
*
|
|
3107
|
+
* @returns promise
|
|
3108
|
+
*/
|
|
3109
|
+
static viewNote<T>(influencer_id: string, note_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3110
|
+
/**
|
|
3111
|
+
* Create a new note about an influencer.
|
|
3112
|
+
*
|
|
3113
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
|
|
3114
|
+
*
|
|
3115
|
+
* @returns promise
|
|
3116
|
+
*/
|
|
3117
|
+
static createNote<T>(influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3118
|
+
/**
|
|
3119
|
+
* Update a note about an influencer.
|
|
3120
|
+
*
|
|
3121
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/updateInfluencersNote
|
|
3122
|
+
*
|
|
3123
|
+
* @returns promise
|
|
3124
|
+
*/
|
|
3125
|
+
static updateNote<T>(influencer_id: string, note_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3126
|
+
/**
|
|
3127
|
+
* Delete a note about an influencer.
|
|
3128
|
+
*
|
|
3129
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/deleteInfluencersNote
|
|
3130
|
+
*
|
|
3131
|
+
* @returns promise
|
|
3132
|
+
*/
|
|
3133
|
+
static deleteNote<T>(influencer_id: string, note_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3094
3134
|
}
|
|
3095
3135
|
|
|
3096
3136
|
declare class Games {
|
package/package.json
CHANGED
package/src/api/Influencers.ts
CHANGED
|
@@ -38,6 +38,62 @@ class Influencers {
|
|
|
38
38
|
return Requests.processRoute(InfluencerRoutes.routes.generateProfile, undefined, {influencer_id : influencer_id}, params);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* List all the notes left about an influencer.
|
|
43
|
+
*
|
|
44
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencersNotes
|
|
45
|
+
*
|
|
46
|
+
* @returns promise
|
|
47
|
+
*/
|
|
48
|
+
public static listNotes<T>(influencer_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
49
|
+
return Requests.processRoute(InfluencerRoutes.routes.listNotes, undefined, {influencer_id : influencer_id}, params);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* View a note left about an influencer.
|
|
54
|
+
*
|
|
55
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencersNote
|
|
56
|
+
*
|
|
57
|
+
* @returns promise
|
|
58
|
+
*/
|
|
59
|
+
public static viewNote<T>(influencer_id : string, note_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
60
|
+
return Requests.processRoute(InfluencerRoutes.routes.viewNote, undefined, {influencer_id : influencer_id, note_id : note_id}, params);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Create a new note about an influencer.
|
|
65
|
+
*
|
|
66
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
|
|
67
|
+
*
|
|
68
|
+
* @returns promise
|
|
69
|
+
*/
|
|
70
|
+
public static createNote<T>(influencer_id : string, data?: object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
71
|
+
return Requests.processRoute(InfluencerRoutes.routes.createNote, data, {influencer_id : influencer_id}, params);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Update a note about an influencer.
|
|
76
|
+
*
|
|
77
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/updateInfluencersNote
|
|
78
|
+
*
|
|
79
|
+
* @returns promise
|
|
80
|
+
*/
|
|
81
|
+
public static updateNote<T>(influencer_id : string, note_id : string, data?: object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
82
|
+
return Requests.processRoute(InfluencerRoutes.routes.updateNote, data, {influencer_id : influencer_id, note_id : note_id}, params);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Delete a note about an influencer.
|
|
87
|
+
*
|
|
88
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/deleteInfluencersNote
|
|
89
|
+
*
|
|
90
|
+
* @returns promise
|
|
91
|
+
*/
|
|
92
|
+
public static deleteNote<T>(influencer_id : string, note_id : string, data?: object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
93
|
+
return Requests.processRoute(InfluencerRoutes.routes.deleteNote, data, {influencer_id : influencer_id, note_id : note_id}, params);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
41
97
|
}
|
|
42
98
|
|
|
43
99
|
export default Influencers;
|
|
@@ -7,7 +7,11 @@ class InfluencerRoutes {
|
|
|
7
7
|
listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
|
|
8
8
|
viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
|
|
9
9
|
generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
|
|
10
|
-
|
|
10
|
+
listNotes: { url: '/influencers/{influencer_id}/notes', method: HTTP_METHODS.GET },
|
|
11
|
+
viewNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.GET },
|
|
12
|
+
createNote: { url: '/influencers/{influencer_id}/notes', method: HTTP_METHODS.POST },
|
|
13
|
+
updateNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.PUT },
|
|
14
|
+
deleteNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.DELETE },
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
}
|