[ { "id": "fbcc6274.7d5be", "type": "http in", "z": "ecb44e8.9b069b", "name": "", "url": "/news", "method": "get", "x": 80, "y": 100, "wires": [ [ "7386d12f.3f0a2" ] ] }, { "id": "77cd121e.1b474c", "type": "http response", "z": "ecb44e8.9b069b", "name": "", "x": 590, "y": 100, "wires": [] }, { "id": "5203faaf.777994", "type": "template", "z": "ecb44e8.9b069b", "name": "news", "field": "payload", "fieldType": "msg", "syntax": "mustache", "template": "
\n\t
\n\t\t

News

\n\t
\n{{#payload}}\n\t
\n\t\t
\n\t\t\t
{{title}}
\n\t\t\t
\n\t\t\t\t{{#image}}\n\t\t\t\t\n\t\t\t\t{{/image}}\n\t\t\t\t

{{content}}

\n\t\t\t
\n\t\t
\n\t
\n{{/payload}}\n
\n", "x": 470, "y": 100, "wires": [ [ "77cd121e.1b474c" ] ] }, { "id": "7386d12f.3f0a2", "type": "function", "z": "ecb44e8.9b069b", "name": "params", "func": "msg.payload = {\n\tparameters: {\n\t\tinlineImages: true\n\t}\n};\nreturn msg;", "outputs": 1, "noerr": 0, "x": 220, "y": 100, "wires": [ [ "78b4b6b1.4f9c48" ] ] }, { "id": "78b4b6b1.4f9c48", "type": "simplicite-session", "z": "ecb44e8.9b069b", "name": "news", "server": "8d2f0431.acb558", "action": "news", "x": 350, "y": 100, "wires": [ [ "5203faaf.777994" ] ] }, { "id": "24df0003.b44ed", "type": "http in", "z": "ecb44e8.9b069b", "name": "", "url": "/restaurants", "method": "get", "swaggerDoc": "", "x": 100, "y": 40, "wires": [ [ "78ccfd0b.80ad84" ] ] }, { "id": "449b2367.7eb56c", "type": "template", "z": "ecb44e8.9b069b", "name": "restaurants", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "\n\nSimplicité Advisor\n\n\n\n\n\n
\n\t
\n\t\t
\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t
\n\t
\n\t
\n\t\t

© Simplicité Software
\n\t
\n
\n\n\n\n\n\n", "x": 410, "y": 40, "wires": [ [ "3e19aac8.c85db6" ] ] }, { "id": "3e19aac8.c85db6", "type": "http response", "z": "ecb44e8.9b069b", "name": "", "x": 550, "y": 40, "wires": [] }, { "id": "78ccfd0b.80ad84", "type": "function", "z": "ecb44e8.9b069b", "name": "params", "func": "msg.payload = { resourcesURL: \"https://www.simplicite.io/resources/\" };\nreturn msg;", "outputs": 1, "noerr": 0, "x": 260, "y": 40, "wires": [ [ "449b2367.7eb56c" ] ] }, { "id": "12804232.e2160e", "type": "http in", "z": "ecb44e8.9b069b", "name": "", "url": "/restaurants/main", "method": "get", "swaggerDoc": "", "x": 120, "y": 180, "wires": [ [ "598087ed.66e4f8" ] ] }, { "id": "b8006543.0b1538", "type": "http response", "z": "ecb44e8.9b069b", "name": "", "x": 950, "y": 180, "wires": [] }, { "id": "61a5b7b6.209988", "type": "template", "z": "ecb44e8.9b069b", "name": "restaurants", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "
\n\t
\n\t\t

{{payload.count}} restaurant(s) found

\n

\n \n page {{payload.page}} / {{payload.maxpage}}\n \n

\n\t
\n{{#payload.list}}\n\t
\n\t\t
\n\t\t\t

{{rstRstName}} {{rstRstCuisine}}

\n\t\t\t
\n\t\t\t\t
\n \t\t\t\t{{#rstRstPicture}}\n \t\t\t\t\n \t\t\t\t{{/rstRstPicture}}\n \t\t\t\t

{{rstRstAddress}}
Rating {{rstRstRating}}% based on {{rstRstNbComments}} comment(s)

\n \t\t\t\t

\n \t\t\t\t \n \t\t\t\t
{{{rstRstDescription}}}

\n \t\t\t\t
{{rstRst}}
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n{{/payload.list}}\n
\n
\n
\n
\n
\n \n

Map

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n

Comments

\n
\n
\n
\n
\n
\n", "x": 790, "y": 220, "wires": [ [ "b8006543.0b1538" ] ] }, { "id": "ce55f83f.38dbe8", "type": "simplicite-object", "z": "ecb44e8.9b069b", "name": "", "server": "8d2f0431.acb558", "objectname": "RstRestaurant", "action": "search", "x": 620, "y": 220, "wires": [ [ "61a5b7b6.209988" ] ] }, { "id": "a9ac807b.6c6fe", "type": "function", "z": "ecb44e8.9b069b", "name": "params", "func": "msg.payload = {\n\tparameters: {\n\t\tinlineThumbs: true,\n\t\tpage: msg.payload.page ? msg.payload.page : 1\n\t},\n\tfilters: { rstRstLocId: msg.payload.location }\n};\nreturn msg", "outputs": 1, "noerr": 0, "x": 460, "y": 220, "wires": [ [ "ce55f83f.38dbe8" ] ] }, { "id": "1b602582.442aca", "type": "simplicite-object", "z": "ecb44e8.9b069b", "name": "", "server": "8d2f0431.acb558", "objectname": "RstLocation", "action": "search", "x": 530, "y": 160, "wires": [ [ "82066beb.ca7e48" ] ] }, { "id": "82066beb.ca7e48", "type": "template", "z": "ecb44e8.9b069b", "name": "locations", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "

Locations

\n
\n \n \n
\n", "x": 680, "y": 160, "wires": [ [ "b8006543.0b1538" ] ] }, { "id": "598087ed.66e4f8", "type": "switch", "z": "ecb44e8.9b069b", "name": "location", "property": "payload.location", "propertyType": "msg", "rules": [ { "t": "null" }, { "t": "nnull" } ], "checkall": "true", "outputs": 2, "x": 300, "y": 180, "wires": [ [ "1b602582.442aca" ], [ "a9ac807b.6c6fe" ] ] }, { "id": "9044d77.8f84b28", "type": "http response", "z": "ecb44e8.9b069b", "name": "", "x": 790, "y": 280, "wires": [] }, { "id": "6625336a.3bcd1c", "type": "http in", "z": "ecb44e8.9b069b", "name": "", "url": "/restaurants/comments", "method": "get", "swaggerDoc": "", "x": 140, "y": 280, "wires": [ [ "945462b7.10783" ] ] }, { "id": "11b00e52.5d1df2", "type": "simplicite-object", "z": "ecb44e8.9b069b", "name": "", "server": "8d2f0431.acb558", "objectname": "RstComments", "action": "search", "x": 500, "y": 280, "wires": [ [ "c6f90bf.c85dff8" ] ] }, { "id": "c6f90bf.c85dff8", "type": "template", "z": "ecb44e8.9b069b", "name": "comments", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "
\n \n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n \n \n \n
\n
\n\n

Other comments:

\n
\n{{#payload.list}}\n

On {{rstCmtDateTime}}, {{rstCmtEmail}} said:\n
{{rstCmtEval}}% {{rstCmtComments}}

\n{{/payload.list}}\n{{^payload.list}}\n No other comments so far...\n{{/payload.list}}\n
\n\n", "x": 660, "y": 280, "wires": [ [ "9044d77.8f84b28" ] ] }, { "id": "945462b7.10783", "type": "function", "z": "ecb44e8.9b069b", "name": "params", "func": "msg.payload = {\n filters: { rstCmtRstId: msg.payload.restaurant }\n};\nreturn msg", "outputs": 1, "noerr": 0, "x": 340, "y": 280, "wires": [ [ "11b00e52.5d1df2" ] ] }, { "id": "67f21e48.e5638", "type": "http in", "z": "ecb44e8.9b069b", "name": "", "url": "/restaurants/comments", "method": "post", "swaggerDoc": "", "x": 140, "y": 340, "wires": [ [ "324f6af7.428016" ] ] }, { "id": "de35be13.f5a2f", "type": "http response", "z": "ecb44e8.9b069b", "name": "", "x": 1250, "y": 340, "wires": [] }, { "id": "c437c459.22b978", "type": "function", "z": "ecb44e8.9b069b", "name": "params", "func": "msg.payload = { item: msg.payload };\nreturn msg;", "outputs": 1, "noerr": 0, "x": 940, "y": 340, "wires": [ [ "d3c2e517.f4ea28" ] ] }, { "id": "d3c2e517.f4ea28", "type": "simplicite-object", "z": "ecb44e8.9b069b", "name": "", "server": "8d2f0431.acb558", "objectname": "RstComments", "action": "create", "x": 1100, "y": 340, "wires": [ [ "de35be13.f5a2f" ] ] }, { "id": "65e2a428.45ddcc", "type": "sentiment", "z": "ecb44e8.9b069b", "name": "", "x": 520, "y": 380, "wires": [ [ "fd68ad47.f2808" ] ] }, { "id": "10fcf102.370fbf", "type": "function", "z": "ecb44e8.9b069b", "name": "comments", "func": "msg.payload = msg.payload.rstCmtComments;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 360, "y": 380, "wires": [ [ "65e2a428.45ddcc" ] ] }, { "id": "324f6af7.428016", "type": "join", "z": "ecb44e8.9b069b", "name": "", "mode": "custom", "build": "merged", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "timeout": "", "count": "2", "x": 810, "y": 340, "wires": [ [ "c437c459.22b978" ] ] }, { "id": "fd68ad47.f2808", "type": "function", "z": "ecb44e8.9b069b", "name": "score", "func": "msg.payload = { rstCmtSentiment: msg.sentiment.score }\nreturn msg;", "outputs": 1, "noerr": 0, "x": 670, "y": 380, "wires": [ [] ] }, { "id": "e5e860ba.150f1", "type": "function", "z": "ecb44e8.9b069b", "name": "comments", "func": "msg.payload = msg.payload.rstCmtComments;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 360, "y": 440, "wires": [ [ "2df854a3.e959dc" ] ] }, { "id": "6dafa23d.52fa3c", "type": "function", "z": "ecb44e8.9b069b", "name": "score", "func": "msg.payload = { rstCmtTones: JSON.stringify(msg.response.document_tone.tone_categories) }\nreturn msg;", "outputs": 1, "noerr": 0, "x": 670, "y": 440, "wires": [ [] ] }, { "id": "2df854a3.e959dc", "type": "watson-tone-analyzer-v3", "z": "ecb44e8.9b069b", "name": "", "tones": "emotion", "sentences": "false", "contentType": "false", "x": 520, "y": 440, "wires": [ [ "6dafa23d.52fa3c" ] ] }, { "id": "8d2f0431.acb558", "type": "simplicite-config", "z": "", "name": "default", "user": "public", "password": "simplicite", "host": "xxx.try.simplicite.io", "port": "80", "scheme": "http", "root": "", "debug": "false" } ]