Making JSON API calls within Rails app Making JSON API calls within Rails app wordpress wordpress

Making JSON API calls within Rails app


It looks like HTTParty is probably your best case for something like this. I think it'll be an easy way for you to get started and handles the JSON for you easily.

Add 'httparty' to your Gemfile and bundle.

recent_posts = HTTParty.get "http://www.example.org/?json=get_recent_posts"puts recent_posts.status, recent_posts.countrecent_posts.posts.each do |post|  puts post.title #guessingend