n8n-nodes-shortio 0.1.0
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/LICENSE.md +19 -0
- package/README.md +78 -0
- package/dist/credentials/ShortioApi.credentials.d.ts +8 -0
- package/dist/credentials/ShortioApi.credentials.js +38 -0
- package/dist/credentials/ShortioApi.credentials.js.map +1 -0
- package/dist/nodes/Shortio/Descriptions/LinkDescription.d.ts +3 -0
- package/dist/nodes/Shortio/Descriptions/LinkDescription.js +651 -0
- package/dist/nodes/Shortio/Descriptions/LinkDescription.js.map +1 -0
- package/dist/nodes/Shortio/GenericFunctions.d.ts +4 -0
- package/dist/nodes/Shortio/GenericFunctions.js +40 -0
- package/dist/nodes/Shortio/GenericFunctions.js.map +1 -0
- package/dist/nodes/Shortio/Interfaces.d.ts +96 -0
- package/dist/nodes/Shortio/Interfaces.js +3 -0
- package/dist/nodes/Shortio/Interfaces.js.map +1 -0
- package/dist/nodes/Shortio/NotBuiltYetNotice.d.ts +2 -0
- package/dist/nodes/Shortio/NotBuiltYetNotice.js +91 -0
- package/dist/nodes/Shortio/NotBuiltYetNotice.js.map +1 -0
- package/dist/nodes/Shortio/Resources.d.ts +4 -0
- package/dist/nodes/Shortio/Resources.js +18 -0
- package/dist/nodes/Shortio/Resources.js.map +1 -0
- package/dist/nodes/Shortio/Shortio.node.d.ts +5 -0
- package/dist/nodes/Shortio/Shortio.node.js +323 -0
- package/dist/nodes/Shortio/Shortio.node.js.map +1 -0
- package/dist/nodes/Shortio/Shortio.node.json +18 -0
- package/dist/nodes/Shortio/shortio_logo.png +0 -0
- package/dist/package.json +54 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +54 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Table of Contents
|
|
2
|
+
- [Table of Contents](#table-of-contents)
|
|
3
|
+
- [Overview of Community Short.io n8n Node](#overview-of-community-shortio-n8n-node)
|
|
4
|
+
- [If you want a custom node](#if-you-want-a-custom-node)
|
|
5
|
+
- [Bugs/Contributing/Feature Request](#bugscontributingfeature-request)
|
|
6
|
+
- [Documentation](#documentation)
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Credentials](#credentials)
|
|
9
|
+
- [Links](#links)
|
|
10
|
+
- [List Links](#list-links)
|
|
11
|
+
- [Get Link Info](#get-link-info)
|
|
12
|
+
- [Create Link](#create-link)
|
|
13
|
+
- [Update Existing Link](#update-existing-link)
|
|
14
|
+
- [Delete Link](#delete-link)
|
|
15
|
+
|
|
16
|
+
# Overview of Community Short.io n8n Node
|
|
17
|
+
I have no affiliation with short.io beyond being a user.
|
|
18
|
+
|
|
19
|
+
I created this node for use within my company as well as for our clients. I left out a few features, but I included the options for them so people can see what is possible. Feel free to submit a PR with the updated functionality, or get in touch to discuss us completing it.
|
|
20
|
+
|
|
21
|
+
# If you want a custom node
|
|
22
|
+
Please reach out to me using the info on [my GitHub page](https://github.com/liamdmcgarrigle). \
|
|
23
|
+
Nodes can be built for the community as well as privately just for one organization.
|
|
24
|
+
|
|
25
|
+
# Bugs/Contributing/Feature Request
|
|
26
|
+
|
|
27
|
+
If you have a bug to report or a feature request, please [submit a GitHub issue](https://github.com/liamdmcgarrigle/n8n-nodes-shortio/issues/new) with as much detail as you're able to give.
|
|
28
|
+
|
|
29
|
+
Feel free to submit PRs, but please get in touch with me first to make sure I am willing to add the feature before you spend the time on it.
|
|
30
|
+
|
|
31
|
+
# Documentation
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
This can only be installed if you are self-hosting n8n.
|
|
36
|
+
|
|
37
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
38
|
+
|
|
39
|
+
## Credentials
|
|
40
|
+
|
|
41
|
+
To use this node you will need to set up short.io credentials with a key from short.io. You also will need an account and may need a paid account.
|
|
42
|
+
|
|
43
|
+
1. Go to https://app.short.io/settings/integrations/api-key and click on "Create API Key"
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
2. Add a description, pick the domain to use, and press "Create"
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
3. Copy your new token. It will only be shown once
|
|
50
|
+
|
|
51
|
+
4. Go to the credential page in n8n, in add credentials add "Short.io API", then paste in your token. Then add the domain you chose in the previous step and press save
|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
## Links
|
|
55
|
+
|
|
56
|
+
### List Links
|
|
57
|
+
Get a list of your short links. These will only be links from the domain in your credential.
|
|
58
|
+
|
|
59
|
+
You will need to choose how many results are returned. Anything over 150 is automatically paginationed.
|
|
60
|
+
|
|
61
|
+
You can filter the results by adding:
|
|
62
|
+
Before date: returns links before the listed date
|
|
63
|
+
After date: returns links after the listed date
|
|
64
|
+
Date Sort Order: changes the order the links are in based on the date
|
|
65
|
+
|
|
66
|
+
### Get Link Info
|
|
67
|
+
Get link details from the domain in your credential and the path.
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Create Link
|
|
71
|
+
Create a link. There are many options. Please see the descriptions I added to n8n's interface.
|
|
72
|
+
|
|
73
|
+
### Update Existing Link
|
|
74
|
+
You can update an existing short link by using the path or the link `idString`.
|
|
75
|
+
You can change anything about the link including the full long URL.
|
|
76
|
+
|
|
77
|
+
### Delete Link
|
|
78
|
+
You can delete an existing short link by using the path or the link `idString`.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class ShortioApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
genericAuth: boolean;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShortioApi = void 0;
|
|
4
|
+
class ShortioApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'shortioApi';
|
|
7
|
+
this.displayName = 'Short.io API';
|
|
8
|
+
this.genericAuth = true;
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Token',
|
|
12
|
+
name: 'value',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: {
|
|
15
|
+
password: true,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Domain',
|
|
21
|
+
name: 'domain',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: 'urlLikeThis.com',
|
|
24
|
+
description: 'URL without https://, www., or any trailing /'
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
this.authenticate = {
|
|
28
|
+
type: 'generic',
|
|
29
|
+
properties: {
|
|
30
|
+
headers: {
|
|
31
|
+
'Authorization': '={{$credentials.value}}',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.ShortioApi = ShortioApi;
|
|
38
|
+
//# sourceMappingURL=ShortioApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShortioApi.credentials.js","sourceRoot":"","sources":["../../credentials/ShortioApi.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,UAAU;IAAvB;QACC,SAAI,GAAG,YAAY,CAAC;QAEpB,gBAAW,GAAG,cAAc,CAAC;QAE7B,gBAAW,GAAG,IAAI,CAAC;QAEnB,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,+CAA+C;aAC5D;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,eAAe,EAAE,yBAAyB;iBAC1C;aACD;SACD,CAAC;IAEH,CAAC;CAAA;AAnCD,gCAmCC"}
|