Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
pat saunders
6,636 PointsUsing API's with Ruby on Rails
Hi, I am trying to call paypals adaptive payments API but it's just not working for me. Has anyone had experience with Apis in rails? Or know any links to good tutorials on the subject?
Specifically I am not sure that I have the calls I'm the correct place. None of the documentation specifies the location, I've got my configuration paypal.yml all set up but not sure where to make the calls from?
Jason Seifer have you covered API's and rails anywhere on tree book? Could you?
Thanks!
2 Answers
Carl Reyes
Courses Plus Student 7,225 Pointsthis is a pretty good resource. I haven't messed with payment API's, but HTTParty is a huge part of my current project.
As for where to put it, I think it depends. In your case, you're going to want to make a Model and put it there because you're going to (i assume) be interacting with User data. If you were just pulling like... I can't actually think of an example but something (api that serves images maybe?) that interacted with the front end of your site, you'd probably put your calls in a controller.
pat saunders
6,636 Pointsthanks for your response Carl that was really helpful.