Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
streamtools pattern for the UK food ratings endpoint at http://ratings.food.gov.uk/OpenDataFiles/FHRS531en-GB.xml
{
"Blocks": [
{
"Id": "24",
"Type": "bang",
"Rule": null,
"Position": {
"X": 309,
"Y": 79
}
},
{
"Id": "25",
"Type": "webRequest",
"Rule": {
"BodyPath": ".",
"Headers": {},
"Method": "GET",
"Url": "http://ratings.food.gov.uk/OpenDataFiles/FHRS531en-GB.xml",
"UrlPath": ""
},
"Position": {
"X": 287,
"Y": 154
}
},
{
"Id": "26",
"Type": "parsexml",
"Rule": {
"Path": ".body"
},
"Position": {
"X": 306,
"Y": 247
}
},
{
"Id": "29",
"Type": "unpack",
"Rule": {
"Path": ".FHRSEstablishment.EstablishmentCollection.EstablishmentDetail"
},
"Position": {
"X": 297,
"Y": 340
}
},
{
"Id": "31",
"Type": "cache",
"Rule": {
"KeyPath": ".BusinessName",
"TimeToLive": "10m",
"ValuePath": ".RatingValue"
},
"Position": {
"X": 348,
"Y": 467
}
}
],
"Connections": [
{
"Id": "27",
"FromId": "24",
"ToId": "25",
"ToRoute": "in"
},
{
"Id": "28",
"FromId": "25",
"ToId": "26",
"ToRoute": "in"
},
{
"Id": "30",
"FromId": "26",
"ToId": "29",
"ToRoute": "in"
},
{
"Id": "32",
"FromId": "29",
"ToId": "31",
"ToRoute": "in"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.