GithubHelp home page GithubHelp logo

Comments (3)

knolleary avatar knolleary commented on August 22, 2024

For multiple messages, this description isn't what we discussed. I know there was some confusion over what we meant by multiple messages versus multiple results in a single message. And it is entirely possible the implementation in PR is more up to date than this... but need to clarify this first.

Here's what I would expect for the combinations of 'requested num of results' and 'single/multiple messages'

requested num of results=1 , single message

  • The node sends a single message:node.send(msg)
  • msg.payload set to the JSON representation of the venue
  • msg.lat/lon/etc set to the relevant values for the venue
  • msg.title set to something sensible

requested num of results=1 , multiple messages

  • The node sends a single message:node.send(msg)
  • msg.payload set to the JSON representation of the venue
  • msg.location.lat/lon/etc set to the relevant values for the venue
  • msg.title set to something sensible

requested num of results>1 , single message

  • The node sends a single message:node.send(msg)
  • msg.payload set to an array of objects, each of which has the properties:
    • payload set to the JSON rep of the venu
    • location.lat/long/etc etc set to the relevant values
    • title set to something sensible
  • msg.lat/lon/etc left unset

requested num of results>1 , multiple messages

  • The node sends a message for each result.
    This can either be achieved by calling node.send(msg) for each result in turn, or calling node.send([[result1,result2,result3,...]]) - note the double level of array for this to work.
    For each of the messages sent...
  • result1.payload set to the JSON representation of the venue
  • result1.location.lat/lon/etc set to the relevant values for the venue
  • result1.title set to something sensible

from node-red-web-nodes.

hbeeken avatar hbeeken commented on August 22, 2024

In which case I "still" don't completely understand the multiple msgs thing as I thought I'd implemented/written down what we'd discussed :-) I'll look at it some more and see where my confusion lies.

BTW the info here is the same as in the PR so that needs updating too....

from node-red-web-nodes.

hbeeken avatar hbeeken commented on August 22, 2024

Implemented as per @knolleary comment. Pull request merged and closed. Therefore closing this issue.

from node-red-web-nodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.