- Print
- DarkLight
React Native Retail SDK - Discovery API
Article summary
Did you find this summary helpful?
Thank you for your feedback
To use the Discovery API in React Native you can call the Discovery API directly. You can find the documentation for the API here: https://developer.ticketmaster.com/products-and-docs/apis/discovery-api/v2/
Here is an example:
...
const entityIds = ['K8vZ9171o57', 'K8vZ91718XV'].join(',')
useEffect(() => {
fetch(`https://app.ticketmaster.com/discovery/v2/attractions.json?id=${entityIds}&sort=relevance,desc&size=200&page=${page}&locale=en-us&apikey=${apiKey}`)
.then((response) => response.json())
.then((data) => {
console.log(data._embedded.attractions)
});
}, [entityIds, page, apiKey])
...
Obtain an API key through your developer account
Was this article helpful?