Skip to content

Commit 5766b63

Browse files
feat: initial n8n community node for worldtimeapi
0 parents  commit 5766b63

21 files changed

Lines changed: 9028 additions & 0 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
node_modules

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
tsconfig.json
3+
.gitignore
4+
openapi.json

.prettierrc.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
module.exports = {
2+
/**
3+
* https://prettier.io/docs/en/options.html#semicolons
4+
*/
5+
semi: true,
6+
7+
/**
8+
* https://prettier.io/docs/en/options.html#trailing-commas
9+
*/
10+
trailingComma: 'all',
11+
12+
/**
13+
* https://prettier.io/docs/en/options.html#bracket-spacing
14+
*/
15+
bracketSpacing: true,
16+
17+
/**
18+
* https://prettier.io/docs/en/options.html#tabs
19+
*/
20+
useTabs: true,
21+
22+
/**
23+
* https://prettier.io/docs/en/options.html#tab-width
24+
*/
25+
tabWidth: 2,
26+
27+
/**
28+
* https://prettier.io/docs/en/options.html#arrow-function-parentheses
29+
*/
30+
arrowParens: 'always',
31+
32+
/**
33+
* https://prettier.io/docs/en/options.html#quotes
34+
*/
35+
singleQuote: true,
36+
37+
/**
38+
* https://prettier.io/docs/en/options.html#quote-props
39+
*/
40+
quoteProps: 'as-needed',
41+
42+
/**
43+
* https://prettier.io/docs/en/options.html#end-of-line
44+
*/
45+
endOfLine: 'lf',
46+
47+
/**
48+
* https://prettier.io/docs/en/options.html#print-width
49+
*/
50+
printWidth: 100,
51+
};

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"EditorConfig.EditorConfig",
5+
"esbenp.prettier-vscode"
6+
]
7+
}

.vscode/launch.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to running n8n",
6+
"processId": "${command:PickProcess}",
7+
"request": "attach",
8+
"skipFiles": [
9+
"<node_internals>/**"
10+
],
11+
"type": "node"
12+
}
13+
]
14+
}

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# @n8n-dev/n8n-nodes-worldtimeapi
2+
3+
![worldtimeapi Banner](banner.svg)
4+
5+
[![npm version](https://img.shields.io/npm/v/@n8n-dev/n8n-nodes-worldtimeapi.svg)](https://www.npmjs.com/package/@n8n-dev/n8n-nodes-worldtimeapi)
6+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7+
8+
---
9+
10+
**Stop writing worldtimeapi API integrations by hand.**
11+
12+
Every time you connect n8n to worldtimeapi, you waste hours mapping endpoints, defining parameters, and debugging schemas. You copy-paste from docs, fix edge cases, and pray nothing breaks.
13+
14+
**What if connecting n8n to worldtimeapi took 5 minutes, not half a day?**
15+
16+
This node gives you **1+ resources** out of the box: **Default**: with full CRUD operations, typed parameters, and zero manual configuration.
17+
18+
---
19+
20+
## What You Get
21+
22+
- **Zero boilerplate**: Resources, operations, and fields are pre-configured and ready to use
23+
- **Full CRUD**: Create, read, update, and delete support where the API allows it
24+
- **Typed parameters**: No more guessing field types
25+
- **Built-in auth**: API key authentication, ready to go
26+
- **Declarative**: Native n8n performance, no custom execute() overhead
27+
28+
---
29+
30+
## Install
31+
32+
```bash
33+
npm install @n8n-dev/n8n-nodes-worldtimeapi
34+
```
35+
36+
**Or in n8n:**
37+
1. **Settings → Community Nodes → Install**
38+
2. Search: `@n8n-dev/n8n-nodes-worldtimeapi`
39+
3. Click **Install**
40+
41+
---
42+
43+
## Quick Start
44+
45+
1. Install the node (above)
46+
2. Add credentials: **worldtimeapi API** → paste your API key
47+
3. Drag the **worldtimeapi** node into your workflow
48+
4. Pick a resource → pick an operation → done.
49+
50+
That's it. No configuration files. No code. It just works.
51+
52+
---
53+
54+
## Resources
55+
56+
| Resource | Operations |
57+
|----------|------------|
58+
| Default | GET request the current time based on the ip of the request. note: this is a "best guess" obtained from open-source data., GET request the current time based on the ip of the request. note: this is a "best guess" obtained from open-source data., GET a listing of all timezones., GET a listing of all timezones. |
59+
60+
---
61+
62+
## Why This Node?
63+
64+
**Without this node:**
65+
- Hours of manual API integration
66+
- Copy-pasting from worldtimeapi docs
67+
- Debugging auth, pagination, error handling
68+
- Maintaining your own client code
69+
70+
**With this node:**
71+
- Install → configure → use. 5 minutes.
72+
- Auto-generated from the official worldtimeapi OpenAPI spec
73+
- Always up to date when the API changes
74+
- Native n8n performance
75+
76+
---
77+
78+
## Auto-Generated
79+
This node was auto-generated from the official **worldtimeapi** OpenAPI specification using
80+
[@n8n-dev/n8n-openapi-node-ultimate](https://github.com/kelvinzer0/n8n-openapi-node-ultimate),
81+
then validated against the live API so you get accurate types and real parameters, not guesswork.
82+
83+
When the worldtimeapi API updates, this node updates too.
84+
85+
---
86+
87+
## Support This Project
88+
89+
If this node saved you hours of work, consider supporting continued development, new APIs, better error handling, and faster updates.
90+
91+
[![Keep It Moving.](https://crypto-donate.insidexofficial.workers.dev/eyJ0aXRsZSI6IktlZXAgSXQgTW92aW5nIiwiZGVzYyI6Ik9uZSBkZXZlbG9wZXIgYnVpbHQgYSB0b29sIHRoYXQgYXV0by1nZW5lcmF0ZXNcbm44biBub2RlcyBmcm9tIGFueSBPcGVuQVBJIHNwZWMuXG5cbllvdXIgZG9uYXRpb24gZnVuZHMgbmV3IGZlYXR1cmVzLCBtb3JlIEFQSSBzdXBwb3J0LFxuYW5kIGJldHRlciB0b29saW5nIGZvciBldmVyeSBkZXZlbG9wZXIgYWZ0ZXIgeW91LiIsInRhcmdldCI6NTAwMCwiYWRkcmVzc2VzIjp7ImV0aGVyZXVtIjoiMHhmMDU1NWQ0MGRiRkI0ZTNCZjA3MDQ0MjgyQjc4RjJmRTFmNTFFZjcyIiwic29sYW5hIjoiNlpEVk5BYmpZZExEcXo4cGt3VUNHYllaNVV3QlFranB0QzU1Wk5vTFcybVUifSwiZGlzY29yZCI6Imh0dHBzOi8vZGlzY29yZC5nZy9wdERaOGU0aDkzIn0/badge)](https://n8n-code.github.io/membership/#/eyJ0aXRsZSI6IktlZXAgSXQgTW92aW5nIiwiZGVzYyI6Ik9uZSBkZXZlbG9wZXIgYnVpbHQgYSB0b29sIHRoYXQgYXV0by1nZW5lcmF0ZXNcbm44biBub2RlcyBmcm9tIGFueSBPcGVuQVBJIHNwZWMuXG5cbllvdXIgZG9uYXRpb24gZnVuZHMgbmV3IGZlYXR1cmVzLCBtb3JlIEFQSSBzdXBwb3J0LFxuYW5kIGJldHRlciB0b29saW5nIGZvciBldmVyeSBkZXZlbG9wZXIgYWZ0ZXIgeW91LiIsInRhcmdldCI6NTAwMCwiYWRkcmVzc2VzIjp7ImV0aGVyZXVtIjoiMHhmMDU1NWQ0MGRiRkI0ZTNCZjA3MDQ0MjgyQjc4RjJmRTFmNTFFZjcyIiwic29sYW5hIjoiNlpEVk5BYmpZZExEcXo4cGt3VUNHYllaNVV3QlFranB0QzU1Wk5vTFcybVUifSwiZGlzY29yZCI6Imh0dHBzOi8vZGlzY29yZC5nZy9wdERaOGU0aDkzIn0)
92+
93+
---
94+
95+
## License
96+
97+
MIT © [kelvinzer0](https://github.com/n8n-code)

banner.svg

Lines changed: 66 additions & 0 deletions
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import type {
2+
IAuthenticateGeneric,
3+
Icon,
4+
ICredentialType,
5+
INodeProperties,
6+
} from 'n8n-workflow';
7+
8+
export class WorldtimeapiApi implements ICredentialType {
9+
name = 'N8nDevWorldtimeapiApi';
10+
11+
displayName = 'worldtimeapi API';
12+
13+
icon: Icon = { light: 'file:../nodes/Worldtimeapi/worldtimeapi.svg', dark: 'file:../nodes/Worldtimeapi/worldtimeapi.dark.svg' };
14+
15+
documentationUrl = '';
16+
17+
properties: INodeProperties[] = [
18+
{
19+
displayName: 'Base URL',
20+
name: 'url',
21+
type: 'string',
22+
default: 'http://worldtimeapi.org/api/',
23+
required: true,
24+
placeholder: 'http://worldtimeapi.org/api/',
25+
description: 'The base URL of your worldtimeapi API server',
26+
},
27+
{
28+
displayName: 'API Key',
29+
name: 'apiKey',
30+
type: 'string',
31+
typeOptions: { password: true },
32+
default: '',
33+
required: false,
34+
},
35+
{
36+
"displayName": "❤️ Keep It Moving: One developer built a tool that auto-generates n8n nodes from any OpenAPI spec. Your donation funds new features, more API support, and better tooling for every developer after you. <a href=\"https://n8n-code.github.io/membership/#/eyJ0aXRsZSI6IktlZXAgSXQgTW92aW5nIiwiZGVzYyI6Ik9uZSBkZXZlbG9wZXIgYnVpbHQgYSB0b29sIHRoYXQgYXV0by1nZW5lcmF0ZXNcbm44biBub2RlcyBmcm9tIGFueSBPcGVuQVBJIHNwZWMuXG5cbllvdXIgZG9uYXRpb24gZnVuZHMgbmV3IGZlYXR1cmVzLCBtb3JlIEFQSSBzdXBwb3J0LFxuYW5kIGJldHRlciB0b29saW5nIGZvciBldmVyeSBkZXZlbG9wZXIgYWZ0ZXIgeW91LiIsInRhcmdldCI6NTAwMCwiYWRkcmVzc2VzIjp7ImV0aGVyZXVtIjoiMHhmMDU1NWQ0MGRiRkI0ZTNCZjA3MDQ0MjgyQjc4RjJmRTFmNTFFZjcyIiwic29sYW5hIjoiNlpEVk5BYmpZZExEcXo4cGt3VUNHYllaNVV3QlFranB0QzU1Wk5vTFcybVUifSwiZGlzY29yZCI6Imh0dHBzOi8vZGlzY29yZC5nZy9wdERaOGU0aDkzIn0\" target=\"_blank\">☕ Buy me a coffee</a>",
37+
"name": "n8nCodeNotice",
38+
"type": "notice",
39+
"default": "",
40+
"displayOptions": {
41+
"show": {}
42+
}
43+
}
44+
];
45+
46+
authenticate: IAuthenticateGeneric = {
47+
type: 'generic',
48+
properties: {
49+
headers: {
50+
Authorization: '=Bearer {{$credentials.apiKey}}',
51+
},
52+
},
53+
};
54+
55+
56+
}

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { config } from '@n8n/node-cli/eslint';
2+
3+
export default config;

icons/worldtimeapi.dark.svg

Lines changed: 18 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)