14
14
"name" : " Request key" ,
15
15
"responseHandling" : {
16
16
"failureOutput" : " simple" ,
17
- "id" : " e7e3bc62-4e79-4864-a301-9a3552dcb77a" ,
18
17
"successMessage" : " API key was saved." ,
19
18
"successOutput" : " message" ,
20
19
"uiType" : " toast"
21
20
},
22
- "url" : " {{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/request_new_permissions?name\u003d Phone\u0026 basic_permissions\u003d [0]"
21
+ "retryPolicy" : " wait_for_internet" ,
22
+ "url" : " {{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/request_new_permissions?name\u003d Phone\u0026 basic_permissions\u003d [0,1]"
23
23
},
24
24
{
25
25
"bodyContent" : " {\n \" url\" : \" {{4d098304-464a-4c2a-9e5e-e43b68c13814}}\" ,\n \" destination_page_name\" : \" phone url import\"\n }" ,
26
- "codeOnSuccess" : " var toast \u003d \" API key is valid.\\ n\"\n if ( JSON.parse(response.body).basic_permissions.includes(0)) {\n toast +\u003d \" URL permission granted. \" ;\n } else {\n toast +\u003d \" URL permission missing!\" ;\n }\n showToast(toast);" ,
26
+ "codeOnSuccess" : " var toast \u003d \" API key is valid.\\ n\"\n var url \u003d JSON.parse(response.body).basic_permissions.includes(0)\n var file \u003d JSON.parse(response.body).basic_permissions.includes(1) \n\n if (!url \u0026\u0026 !file) {\n toast +\u003d \" All permissions missing! \" ; \n } else if (!url) { \n toast + \u003d \" URL permission missing! \" ;\n } else if (!file) {\n toast +\u003d \" File permission missing!\" ;\n }\n \n showToast(toast);" ,
27
27
"contentType" : " application/json" ,
28
28
"description" : " Verifies API key with Hydrus" ,
29
29
"headers" : [
30
30
{
31
- "id" : " 08e815f3-0211-417c-ac30-dad66d3b4656 " ,
31
+ "id" : " d1eb5ba6-051a-4b44-91cb-dacda569be9d " ,
32
32
"key" : " Hydrus-Client-API-Access-Key" ,
33
33
"value" : " {{2c7bf1c2-dabd-41fd-b572-8a67575f07c7}}"
34
34
}
38
38
"name" : " Verify key" ,
39
39
"responseHandling" : {
40
40
"failureOutput" : " simple" ,
41
- "id" : " e6438001-2f6a-4275-958f-53cf3b521b74" ,
42
41
"successOutput" : " none" ,
43
42
"uiType" : " toast"
44
43
},
44
+ "retryPolicy" : " wait_for_internet" ,
45
45
"url" : " {{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/verify_access_key"
46
46
},
47
+ {
48
+ "codeOnSuccess" : " var toast \u003d \" File \"\n var status \u003d JSON.parse(response.body).status\n\n switch (status) {\n case 1:\n toast +\u003d \" was successfully imported.\" ;\n break;\n case 2:\n toast +\u003d \" already in database.\" ;\n break;\n case 3:\n toast +\u003d \" previously deleted.\" ;\n break;\n case 4:\n toast +\u003d \" failed to import.\" ;\n break;\n case 7:\n toast +\u003d \" vetoed.\" ;\n break;\n }\n\n showToast(toast);" ,
49
+ "contentType" : " application/octet-stream" ,
50
+ "description" : " Sends a file to Hydrus" ,
51
+ "headers" : [
52
+ {
53
+ "id" : " ea2f7272-29a1-4608-b0db-cfe804ff08f7" ,
54
+ "key" : " Hydrus-Client-API-Access-Key" ,
55
+ "value" : " {{2c7bf1c2-dabd-41fd-b572-8a67575f07c7}}"
56
+ }
57
+ ],
58
+ "iconName" : " custom-icon_04e0e038-6af2-4bce-91fd-bece7728a1d3.png" ,
59
+ "id" : " 22484fb3-bff9-470c-a699-38aaf825331f" ,
60
+ "method" : " POST" ,
61
+ "name" : " Send file" ,
62
+ "requestBodyType" : " file" ,
63
+ "responseHandling" : {
64
+ "failureOutput" : " simple" ,
65
+ "successMessage" : " File was sent to Hydrus." ,
66
+ "successOutput" : " none" ,
67
+ "uiType" : " toast"
68
+ },
69
+ "retryPolicy" : " wait_for_internet" ,
70
+ "url" : " {{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/add_files/add_file"
71
+ },
47
72
{
48
73
"bodyContent" : " {\n \" url\" : \" {{4d098304-464a-4c2a-9e5e-e43b68c13814}}\" ,\n \" destination_page_name\" : \" phone url import\"\n }" ,
49
74
"contentType" : " application/json" ,
50
75
"description" : " Sends a URL to Hydrus" ,
51
76
"headers" : [
52
77
{
53
- "id" : " 5ddf5c91-4ddb-42a9-baf2-f37ed05abd0a " ,
78
+ "id" : " ea7dead9-05ee-4494-9ab3-67d0606428be " ,
54
79
"key" : " Hydrus-Client-API-Access-Key" ,
55
80
"value" : " {{2c7bf1c2-dabd-41fd-b572-8a67575f07c7}}"
56
81
}
61
86
"name" : " Send URL" ,
62
87
"responseHandling" : {
63
88
"failureOutput" : " simple" ,
64
- "id" : " 5ccff8f8-1f3b-4292-a865-0fb833f29c68" ,
65
89
"successMessage" : " {{4d098304-464a-4c2a-9e5e-e43b68c13814}} was sent to Hydrus." ,
66
90
"successOutput" : " message" ,
67
91
"uiType" : " toast"
68
92
},
93
+ "retryPolicy" : " wait_for_internet" ,
69
94
"url" : " {{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/add_urls/add_url"
70
95
}
71
96
]
88
113
"value" : " \u003c Enter your client api url here\u003e "
89
114
}
90
115
],
91
- "version" : 45
116
+ "version" : 56
92
117
}
0 commit comments