0

I´m mainly a coder but for a project I've got to do some more with RoR. I've been working with RoR for some projects but mainly on the front-end side. I understand it a basic level, but for this project I have to dive in the deep.

What I want to create is an app where a user can search for movies and add them to their account. I want to use theMovieDb api for this, but I can't find a screencast or tutorial that shows the beginning of how to connect your app with someone else's api. So I was hoping the StackOverflow people could point me in the right direction.

Peter Boomsma
  • 8,851
  • 16
  • 93
  • 185

1 Answers1

1

This is kind of a big question, but it seems you have two parts here. First is how to make a request from inside your application. The second is how to interact with an API.

I've set up somethings similar where I had to make API requests from inside a controller using Net::HTTP. The answer to this question helped a lot. From inside the controller, I processed the request response as needed, i.e. putting it into a relational database, or displaying it to the user.

How make a HTTP request using Ruby on Rails?

The second part about interacting with the database. The movie database API is described at

http://docs.themoviedb.apiary.io/reference

You need to reference this API documenation. The first thing, for instance, = is they require you to get an API key for instance. You will also need to be aware that they limit the rate at which you can make requests. Without knowing more specifics its hard to give more detail about how to construct the queries.

Hope this helps.

Community
  • 1
  • 1
Rob Olendorf
  • 561
  • 5
  • 9