diff --git a/shortcuts.json b/shortcuts.json new file mode 100644 index 0000000..4c7fc3c --- /dev/null +++ b/shortcuts.json @@ -0,0 +1,94 @@ +{ + "categories": [ + { + "id": "2d3ab593-ca66-47f5-9506-c3d211b2657d", + "name": "Shortcuts", + "shortcuts": [ + { + "bodyContent": "{\n \"url\" : \"{{4d098304-464a-4c2a-9e5e-e43b68c13814}}\",\n \"destination_page_name\" : \"phone url import\"\n}", + "codeOnSuccess": "setVariable(/*[variable]*/\"2c7bf1c2-dabd-41fd-b572-8a67575f07c7\"/*[/variable]*/, JSON.parse(response.body).access_key);", + "contentType": "application/json", + "description": "Request an API key from Hydrus", + "iconName": "send-to-hydrus.png", + "id": "b20986e7-40c5-4287-81c9-7a32f7f41913", + "name": "Request key", + "responseHandling": { + "failureOutput": "simple", + "id": "d92f2cc0-c0f3-48d1-ae2b-3a41bf1e4de9", + "successMessage": "API key was saved.", + "successOutput": "message", + "uiType": "toast" + }, + "url": "{{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/request_new_permissions?name\u003dPhone\u0026basic_permissions\u003d[0]" + }, + { + "bodyContent": "{\n \"url\" : \"{{4d098304-464a-4c2a-9e5e-e43b68c13814}}\",\n \"destination_page_name\" : \"phone url import\"\n}", + "codeOnSuccess": "var toast \u003d \"API key is valid.\\n\"\nif (JSON.parse(response.body).basic_permissions.includes(0)) {\n toast +\u003d \"URL permission granted.\";\n} else {\n toast +\u003d \"URL permission missing!\";\n}\nshowToast(toast);", + "contentType": "application/json", + "description": "Verifies API key with Hydrus", + "headers": [ + { + "id": "7cb8e3f9-8c2b-4b56-8e97-48071be762d3", + "key": "Hydrus-Client-API-Access-Key", + "value": "{{2c7bf1c2-dabd-41fd-b572-8a67575f07c7}}" + } + ], + "iconName": "send-to-hydrus.png", + "id": "923939ae-1e9a-4f69-89f2-820d30065d35", + "name": "Verify key", + "responseHandling": { + "failureOutput": "simple", + "id": "c283b69d-058f-448d-a868-06de883566f9", + "successOutput": "none", + "uiType": "toast" + }, + "url": "{{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/verify_access_key" + }, + { + "bodyContent": "{\n \"url\" : \"{{4d098304-464a-4c2a-9e5e-e43b68c13814}}\",\n \"destination_page_name\" : \"phone url import\"\n}", + "contentType": "application/json", + "description": "Sends a URL to Hydrus", + "headers": [ + { + "id": "d60dde89-d0dd-424f-ba6c-e4b0aca1501c", + "key": "Hydrus-Client-API-Access-Key", + "value": "{{2c7bf1c2-dabd-41fd-b572-8a67575f07c7}}" + } + ], + "iconName": "send-to-hydrus.png", + "id": "db09da4e-69ff-4500-8a6d-3b0adfd5cac9", + "method": "POST", + "name": "Send URL", + "responseHandling": { + "failureOutput": "simple", + "id": "71737e13-1818-453a-98e9-2414952368a5", + "successMessage": "{{4d098304-464a-4c2a-9e5e-e43b68c13814}} was sent to Hydrus.", + "successOutput": "message", + "uiType": "toast" + }, + "url": "{{790c08b8-6204-4f7f-8e8e-e6a4806017bc}}/add_urls/add_url" + } + ] + } + ], + "variables": [ + { + "flags": 1, + "id": "4d098304-464a-4c2a-9e5e-e43b68c13814", + "key": "hydrus_add_url", + "type": "text", + "value": "" + }, + { + "id": "2c7bf1c2-dabd-41fd-b572-8a67575f07c7", + "key": "hydrus_api_key", + "value": "" + }, + { + "id": "790c08b8-6204-4f7f-8e8e-e6a4806017bc", + "key": "hydrus_url", + "value": "" + } + ], + "version": 45 +} \ No newline at end of file