Can I please have some help with the API function call as below. I have read many of the others and from what I see it should work however there must be something I am missing.
Photon Code:
I have followed the particle class example and can get the function to work though it still doesn’t accept the args=coffee when using Postman. However it works when I use Porter. Can I please be pointed in the right direction regarding how to implement args=coffee
Good practice in debugging would be to print out your variables in question to see what you actually getting.
Never only assume things, always confirm your assumtions
Thanks @ScruffR. I'm not assuming and only following what is in other forums and obviously I don't have a clear understanding what is shown.
So what does the -d in
Awesome thanks @ScruffR that all worked great. I have seen Curl though did not know it could be installed in terminal. Pity its not noted in the examples then I wouldn’t have to annoy the elites.
That's probably organisational blindness - since it's so obvious for us, we wouldn't think that's something that needs to be explicitly told ... till someone proves that assumption wrong
Thanks @bko. Thats cool that this is in the FAQ however if you don't know what curl is for you are not going to look for it if it is not stated in example docs. Personally I have been with Particle from the inception and a lot of these docs weren't here. Particle has grown super fast with enhancements added frequently.
Particle is absolutely brilliant as well as the community like you you guys who support it. Your knowledge with all this is huge though like @ScruffR said
For some of us we only need to learn small parts of things to get our projects to work, hope that makes sense.
Keep up the great work fellas and thanks again for your dedications to this forum
I didn't know what it was either. Then I Googled a bit. Found out what it was. Tried it. Disliked the fact that it was more complicated/abstract/vague than it was helpful. Moved on to @bko's excellent tutorials. Never looked back
For those who may not wish to install curl, here is a web based debugger for Particle devices, written and hosted by my friend and co-developer Jim Schrempp. It is extremely easy and intuitive to use and you do not have to copy out device id’s and access tokens, as it uses the Spark.js library:
The web page provides a “login to Spark” button. Click on it and you get the standard Particle login panel. Log in just as you would to the Particle web, and you then get a pick list of all of the Particle devices registered to your account. Simply select the device that you want to test, and you will then see a page with all of your device’s cloud functions and cloud variables. To retrieve and display a cloud variable, click on its button. To call a function, enter the argument (as a string), if any, and click the button. The returned value (if any) will also be displayed. Like I said, easy to use and completely intuitive.
Jim wrote this to help us debug a rather complex Particle project called SIS (see: https://github.com/TeamPracticalProjects/SISProject, if you are interested). However, it is completely general in nature and will work with any Particle device that exposes variables and/or functions to the Particle cloud.