Please note: User profiles are not an actual feature in AppMachine. This tutorial is a proof of concept to get you familiar with the AppMachine API. Support will be limited.
Previous steps taken
- Added User Authentication
- Created a view where users can MAKE their own profile
- Created a view where users can VIEW their profile.
- Created a view where users can EDIT their profile.
Step 10: Showing a “Store” with different options
In this case we made a shop example with some items and a detail screen with Excel blocks.
In the detail screen you will find some options like Color and Size and a button to add this item to your wish list. This is where the content is added just for the logged in user. Nobody else can see this but you.
When we click the wish list button a web service is being executed and some info is being sent along with the request like the user who is requesting the item and of course the title/price/size etc.
So how did we do this?
Step 11: ADDING THE WISH LIST WEB SERVICE
Step 1: Go to the Developer tab
Step 2: Click on Add → Data
Step 3: Select New Web Service
Step 4: Select AppMachine
Step 5: Select “Post” Add data to data store
- Fill in the name for your data, in this case we've called it “wishlist”
Fill in a value like “firstName” in order for the service to be executed.
- Click Next or Finish and give your web service a name like “Post Wishlist”
- We can find our data store under Custom Objects in the same Developer Tab.
And our web service is now located under “services”
We have now created a web service for posting items and a data store to hold our wish list data.
- Added a “shop” with items and made a detail screen with an “add to my wish list” button
- (POST) Added new web service that will add items to the current user their wish list.
Next step is to connect the fields we want to have in our wish list data store. As it stands now we only have one field and that is firstName, but we want to have , more info than that of course like the title of the item / price / maybe even an image of the product.