Mission: CRUD ROOKIE
Task: Retrieve Object With API
So fair warning here: I have no coding experience. However, I was somehow able to complete the Add Object with API step…
Not sure how, I initially followed every step (including recreating the controlling.js file and the index.html file with the exact same approach as you did per the Youtube video here ) however I was unable to get the same result in Visual Studio Code… the documents I had added on weren’t properly referencing each other or something and so when I would reopen it in my browser to see if the API is connecting or not I would always get the javascript:purchase() or javascript:getItems() since they weren’t referencing eachother and calling the API properly.
So in order to complete the “Add Object with API” sub-mission I followed this approach and instead of naming the file/app tables in backendless to contact per another video, I named it to person which is how I now just got John Rambo as my added record in the Person Data Table.
However, given my limited knowledge, these directions are very high-level for me and unfortunately I am lost as to how to properly do it - especially in Android Studio per the video which I followed which is directing me to setup the API through Android and this is now getting very difficult…
Any help would be significantly appreciated. I’ve read all the other posts on this exact Retrieve Object With API topic and they really are not helping at all for me.
Since you have no coding experience ,I suggest sticking with JS, rather than going the Android route. This way, there is no compilation step, you do not need to mess with emulators or deploying to devices.
So let’s start with the basics… you need to have an HTML file and then import the Backendless SDK to it. Have you already done that?
No - but if I follow the steps here and build the To-Do app - as long as I rename the app data table properly to Person in my backend won’t I be fulfilling the CRUD requirements for this mission or no?
So I completed all of it but the step for Retrieve Object with API is still unchecked - however I’ve completed the entire to-do list and it’s updating and deleting on my database correctly. So I have earned the checkmarks for Update Object with API and Delete Object with API but skipped over the Retrieve Object with API…
The explanation is quite simple - the task requires retrieving the first object from the table and I assume your Codeless logic retrieves a collection of objects.
A solution may be adding a button to your UI which would retrieve only the first Person object. There is a block for that: