akin-oz / vue3-ts-shopping-cart

0 stars 0 forks source link

Implement API #4

Closed akin-oz closed 3 years ago

akin-oz commented 3 years ago

https://api-docs.musement.com/reference#getvenuesvenueidactivities

akin-oz commented 3 years ago

const options = {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    'Accept-Language': 'it',
    'X-Musement-Currency': 'EUR',
    'X-Musement-Version': '3.4.0'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));```
akin-oz commented 3 years ago

Used https://api.musement.com/api/v3/activities?venue_in=164&limit=6&offset=0 instead of https://api.musement.com/api/v3/venues/164/activities?limit=6&offset=0 because of response metadata. /activities have item count on its response.