require 'rest-client' require 'json' # makes a request to url passing access token provided def request(url, token) JSON.parse(RestClient.get(url, {params: {access_token: token}})) end