Mission: SERVERLESS 101
Task: Invoke the API Service using generated client SDK
Please, describe your problem here.
Hi
I have only one step left in Serverless 101 - the 2nd step. This one is a puzzle and I will need help. I use AppGyver as my nocode client, I like it a lot as I like Backendless a lot.
The example video for the 2nd step uses js as the example on how to do the additem of CodelessShoppingCartService. But I need a NoCode example. One of your staff made a very good tutorial of Backendless with AppGyver, which i followed and completed before I started these missions. He/she would probably know how to use AppGyver’s data configurator to call the methods of CodelessShoppingCartService. Could I please request assistance with this and an example of how to do this .
Kind Regards
BruceX
You need to call the methods of the CodelessShoppingCard service. For example, using AppGyver you can add several buttons and add logic to call the necessary methods to them. You can find method cURL here: https://monosnap.com/direct/OCgfZU5sNJW3dbRqwyq9hTWItz0u1V
After you add each method from the service, call them in the desired sequence
The GetInstructions button works well, because there are no parameters.
For the AddItem I put the entire contents of the cURL into the Open URL logic, but that obviously did not work. I believe Open URL wants a URL with parameters. What would be the URL be with the parameters for this example be for the AddItem? I have tried some things but nothing I have tried has worked.
Each button reports success when it is clicked, including the Purchase button.
However, when I check the tables in Backendless, Order is not there, also I am not getting the completed message. CAn you complete this for me and unlock the next mission.
Hi Inna
That is correct. All the methods return a 200 (thats good isn’t it?) in the console and in AppGyver. In the console this is how the Invokes went…
So, you can see that all seems good here, if there is an error on my part I cannot spot it, please let me know or let me through please. I have 2 days in hand to get this complete, apologies for the pressure but my trial period is about to expire.
It seems these hiccups are only in the missions, backendless itself is brilliant and I want to stay with it.
You specify the cart name, but there is no item to add. The method succeeds since there is no error - you simply not adding anything to the cart. As a result, when you’re purchasing the items in the cart, there is nothing to purchase and then no Order object is saved in the database. And subsequently, the task is not completed.
If you change the payload of the addItem method to include the item information and repeat the sequence, it should work. For instance, the payload for addItem could look something like this:
By 4 invocations I presume you mean GetInstructions, AddItem, GetItems and Purchase. If you mean something else please let me know.
Look back through prior entries in this conversation and you will see that I have done all 4, successfully.
Hope to hear from you soon, I have just received my 2 day warning on the trial end.
Bruce X
Hi, thank you so much for setting my last mission as complete.
btw, the Order table did not get created despite my steps completing successfully, is that a concern?
2nd question.
I am more interested in getting this tutorial to run correctly in AppGyver. I hope that you can answer this question.
In the backendless rest consol when I create an item with getItem, the response is…
The error is because I believe that AppGyver is expecting the array to be named, but I am a beginner at AppGyver and Backendless, so I am wondering how the response of the GetItems can be referenced and used.
Other screen dumps that may help with your answer…
The Base…
Ok, I do understand this, so we get back to my original question, which is important for future use of APIs like this. The Purchase method returned success after proving with GetItem that the cartItem was created successfully in cache. So why did the Order table not get created as per the above logic with the Purchase method.
Please, this is only a small question so if to get to answer is going to take a lot of digging, the question is not important enough to justify the effort.