ErosNow API
MediaEros Now Public API - A Guide for Developers
Are you interested in integrating the latest Indian entertainment content into your app? Eros Now offers a range of APIs to help developers enhance their applications with fresh and dynamic content.
To get started, it is essential to have a basic understanding of Eros Now Public API and how it works. This guide will cover the steps required to access the Eros Now Public API and provide sample API code in JavaScript.
Understanding the Eros Now Public API
Eros Now Public API offers a wide range of RESTful endpoints that allow developers to access Indian movie and TV show content. With the Eros Now APIs, developers can view movie information, browse playlists, and even stream high-quality video directly in their applications.
The API is protected by an API key, which can be obtained by registering an application on the Eros Now Developers Portal. Once registered, developers can access endpoints by passing the API key in the header of requests.
Sample API Code in JavaScript
To access the Eros Now Public API in JavaScript, you will need to use a library that supports making HTTP requests. In this example, we will be using the Axios library.
First, we will need to install Axios using npm:
npm install axios
Then, we can use the following code to get the list of movies:
const axios = require('axios');
const apiKey = 'YOUR_API_KEY';
async function getMovies() {
try {
const response = await axios.get('https://api.erosnow.com/v1/api/movies/all', {
headers: {
'X-API-KEY': apiKey,
},
});
console.log(response.data);
} catch (error) {
console.error(error);
}
}
getMovies();
This code will make a GET request to the /v1/api/movies/all
endpoint and return a list of all Eros Now movies. The API key is passed in the header of the request as X-API-KEY
.
Similarly, we can use the following code to get movie details by ID:
const axios = require('axios');
const apiKey = 'YOUR_API_KEY';
async function getMovieDetails(movieId) {
try {
const response = await axios.get(`https://api.erosnow.com/v1/api/movie/${movieId}`, {
headers: {
'X-API-KEY': apiKey,
},
});
console.log(response.data);
} catch (error) {
console.error(error);
}
}
getMovieDetails(123456);
This code will make a GET request to the /v1/api/movie/{movieId}
endpoint and return the details of the movie with the given ID. The API key is passed in the header of the request as X-API-KEY
.
Conclusion
In conclusion, Eros Now offers a wide range of APIs to help developers integrate the latest Indian entertainment content into their applications. By registering an application on the Eros Now Developers Portal and using the provided API key, developers can access endpoints and perform a range of operations.
In this guide, we provided an overview of the Eros Now Public API and demonstrated how to access the API using JavaScript. We hope this guide has been helpful in getting you started with the Eros Now Public API!