This API is used by the exercises in the Outside-In Frontend Development, a tutorial using either React or Vue.js.
Creating an API Key
Create your personal key to get started.
Usage
This API exposes endpoints for listing and creating restaurant records. Examples for accessing these endpoints are shown using the Axios HTTP client. In the URLs below, replaceYOUR-API-KEY
with the API key you created above.
Listing Restaurants
import axios from 'axios';
axios.get('http://api.outsidein.dev/YOUR-API-KEY/restaurants')
.then(response => console.log(response.data));
Output:
[
{
"id": 1,
"name": "Pasta Place"
},
{
"id": 2,
"name": "Salad Place"
}
]
Creating a Restaurant
import axios from 'axios';
axios.post(
'http://api.outsidein.dev/YOUR-API-KEY/restaurants',
{ name: 'Sushi Place' },
)
.then(response => console.log(response.data));
Response:
{
"id": 3,
"name": "Sushi Place"
}