Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get All endpoint is not working #302

Open
Parl582 opened this issue Oct 31, 2023 · 3 comments
Open

Get All endpoint is not working #302

Parl582 opened this issue Oct 31, 2023 · 3 comments

Comments

@Parl582
Copy link

Parl582 commented Oct 31, 2023

http://www.omdbapi.com/?apikey=[yourkey]&

and also http://img.omdbapi.com/?apikey=[yourkey]& is not working

Even after putting the key unable to get all the data

{
"Response": "False",
"Error": "Incorrect IMDb ID."
}

@Koomycode
Copy link

Your link is missing an argument, add any argument after your api key so it works, like this :

http://www.omdbapi.com/?apikey=[yourkey]&s=ted

i added here the s=ted which means search for movies/series with name ted

@anopenprogrammer
Copy link

But what if we want the complete data and we want to just filter out the 10 movies in the list. How we will do that

@Koomycode
Copy link

But what if we want the complete data and we want to just filter out the 10 movies in the list. How we will do that

You can add page to the endpoint, this way you can get all the list by simply getting the second page which contains the next 10 movies list,
https://www.omdbapi.com/?apikey=[YOUR-KEY]&s=${name}&page=${page}

in here i created async funsction with 2 parameters (name, page) and after when the user fetch the data a button at the end shows up if clicked it increment the page number by 1 and fetch second page

i gave you a kick start, you can figure out how to implement it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants