File tree Expand file tree Collapse file tree 7 files changed +58
-16
lines changed Expand file tree Collapse file tree 7 files changed +58
-16
lines changed Original file line number Diff line number Diff line change 11* .js
22* .mjs
3- dist
3+ dist
Original file line number Diff line number Diff line change 11{
22 "name" : " @pipedream/serveravatar" ,
3- "version" : " 0.0.4 " ,
3+ "version" : " 0.0.5 " ,
44 "description" : " Pipedream Server Avatar Components" ,
55 "main" : " dist/app/serveravatar.app.mjs" ,
66 "types" : " dist/app/serveravatar.app.d.ts" ,
1818 "access" : " public"
1919 },
2020 "devDependencies" : {
21- "@types/node" : " ^17.0.36"
21+ "@types/node" : " ^17.0.36" ,
22+ "@pipedream/types" : " ^0.3.2"
2223 },
2324 "dependencies" : {
2425 "@pipedream/helpers" : " ^1.3.9" ,
25- "@pipedream/platform" : " ^0.10 .0"
26+ "@pipedream/platform" : " ^3.1 .0"
2627 }
2728}
Original file line number Diff line number Diff line change 1+ * .js
2+ * .mjs
3+ dist
Original file line number Diff line number Diff line change 1+ import { defineApp } from "@pipedream/types" ;
2+ import { axios } from "@pipedream/platform" ;
3+
4+ export default defineApp ( {
5+ type : "app" ,
6+ app : "tolstoy" ,
7+ propDefinitions : { } ,
8+ methods : {
9+ _apiKey ( ) {
10+ return this . $auth . api_key ;
11+ } ,
12+ _apiUrl ( ) {
13+ return "https://api.gotolstoy.com" ;
14+ } ,
15+ async _makeRequest ( {
16+ $ = this , path, ...args
17+ } ) {
18+ return axios ( $ , {
19+ url : `${ this . _apiUrl ( ) } ${ path } ` ,
20+ headers : {
21+ Authorization : `Bearer ${ this . _apiKey ( ) } ` ,
22+ } ,
23+ ...args ,
24+ } ) ;
25+ } ,
26+ async createWebhook ( { ...args } ) {
27+ return this . _makeRequest ( {
28+ path : "/webhooks/" ,
29+ method : "post" ,
30+ ...args ,
31+ } ) ;
32+ } ,
33+ async removeWebhook ( webhookId ) {
34+ return this . _makeRequest ( {
35+ path : `/webhooks/${ webhookId } ` ,
36+ method : "delete" ,
37+ } ) ;
38+ } ,
39+ } ,
40+ } ) ;
Original file line number Diff line number Diff line change 22 "name" : " @pipedream/tolstoy" ,
33 "version" : " 0.0.4" ,
44 "description" : " Pipedream Tolstoy Components" ,
5- "main" : " tolstoy.app.mjs" ,
5+ "main" : " dist/app/ tolstoy.app.mjs" ,
66 "keywords" : [
77 " pipedream" ,
88 " tolstoy"
99 ],
10+ "files" : [
11+ " dist"
12+ ],
1013 "homepage" : " https://pipedream.com/apps/tolstoy" ,
1114 "author" :
" Pipedream <[email protected] > (https://pipedream.com/)" ,
1215 "publishConfig" : {
1316 "access" : " public"
1417 },
1518 "dependencies" : {
1619 "@pipedream/platform" : " ^1.1.0"
20+ },
21+ "devDependencies" : {
22+ "@pipedream/types" : " ^0.3.2"
1723 }
1824}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ../../tsconfig.components.json"
3+ }
You can’t perform that action at this time.
0 commit comments