Skip to content

Instantly share code, notes, and snippets.

@rufo
Created August 26, 2018 17:31
Show Gist options
  • Save rufo/fb3297b9bb100d408e4f3d697fbdb4fd to your computer and use it in GitHub Desktop.
Save rufo/fb3297b9bb100d408e4f3d697fbdb4fd to your computer and use it in GitHub Desktop.
Example RSS flow
[
{
"id": "2b142d34.a6f53a",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "a0ce6df4.9e2fb8",
"type": "rss",
"z": "2b142d34.a6f53a",
"name": "",
"feedOptionRules": [
{
"name": "title",
"type": "str",
"value": "rufo's starred repos"
},
{
"name": "site_url",
"type": "str",
"value": "https://github.com/rufo?tab=stars"
}
],
"itemOptionRules": [
{
"name": "title",
"type": "item",
"value": "repo.full_name"
},
{
"name": "url",
"type": "item",
"value": "repo.html_url"
},
{
"name": "description",
"type": "item",
"value": "repo.description"
},
{
"name": "date",
"type": "item",
"value": "repo.starred_at"
}
],
"x": 830,
"y": 180,
"wires": [
[
"ca6c1349.7caff8",
"4715848e.521f8c"
]
]
},
{
"id": "c3209c01.72595",
"type": "http in",
"z": "2b142d34.a6f53a",
"name": "",
"url": "/starred_items",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 130,
"y": 80,
"wires": [
[
"fe6c6087.1c6d8"
]
]
},
{
"id": "7fa4b165.849e58",
"type": "http request",
"z": "2b142d34.a6f53a",
"name": "starred items API",
"method": "GET",
"ret": "obj",
"url": "https://api.github.com/users/rufo/starred",
"tls": "586db134.38b958",
"x": 630,
"y": 120,
"wires": [
[
"4715848e.521f8c",
"a0ce6df4.9e2fb8"
]
]
},
{
"id": "4715848e.521f8c",
"type": "debug",
"z": "2b142d34.a6f53a",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 890,
"y": 60,
"wires": []
},
{
"id": "cce0fbc6.9aaae8",
"type": "inject",
"z": "2b142d34.a6f53a",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 160,
"y": 140,
"wires": [
[
"fe6c6087.1c6d8"
]
]
},
{
"id": "fe6c6087.1c6d8",
"type": "function",
"z": "2b142d34.a6f53a",
"name": "add neccessary headers",
"func": "msg.headers = {}\nmsg.headers['User-Agent'] = 'Node-RED'\nmsg.headers['Accept'] = 'application/vnd.github.v3.star+json'\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 390,
"y": 120,
"wires": [
[
"7fa4b165.849e58"
]
]
},
{
"id": "ca6c1349.7caff8",
"type": "http response",
"z": "2b142d34.a6f53a",
"name": "",
"statusCode": "200",
"headers": {
"content-type": "application/rss+xml"
},
"x": 980,
"y": 220,
"wires": []
},
{
"id": "586db134.38b958",
"type": "tls-config",
"z": "",
"name": "",
"cert": "",
"key": "",
"ca": "",
"certname": "",
"keyname": "",
"caname": "",
"servername": "",
"verifyservercert": true
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment