This is a mobile project that demonstrates how to create an application that integrates the Also Cloud SimpleAPI.
These instructions will get you a copy of the project up and running on your local machine for development purposes.
Note: Follow the instructions for building native code in a project. The following should be the last command to complete this setup.
npm install -g react-native-cli
Since this is a React Native project it works on both Android and iOS devices. But the project has only been tested on Android so we recommend this setup.
Note: As with React Native, follow the instructions for building native code in a project.
Clone the repo into your preferred directory.
git clone https://github.com/alsocloud/alsoservicepurchase.git
Run "npm install" and after that run "react-native run-android" inside the project folder
cd alsoservicepurchase
npm install
react-native run-android
The following samples are written in JavaScript using the Fetch API.
fetch(
url: 'https://marketplacetest.ccpaas.net/SimpleAPI/SimpleAPIService.svc/rest/${endpoint}',
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: `${requestBodyJsonString}`
}
)
fetch(
url: `https://marketplacetest.ccpaas.net/SimpleAPI/SimpleAPIService.svc/rest/${endpoint}`,
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authenticate': `CCPSessionId ${token}` // difference between authenticated and non authenticated requests
},
body: `${requestBodyJsonString}`
}
)
All implementations of the Also Cloud SimpleAPI in this project can be found in the src/apis folder.
This project is licensed under the MIT License - see the LICENSE.md file for details