Skip to content

Instantly share code, notes, and snippets.

@jthandy
Last active December 16, 2015 03:49
Show Gist options
  • Save jthandy/5372739 to your computer and use it in GitHub Desktop.
Save jthandy/5372739 to your computer and use it in GitHub Desktop.
A simple code snippet to post data to the RJMetrics Data Import API.
def push_to_warehouse(table, data_to_push)
response = HTTParty.post("https://connect.rjmetrics.com/v1/client/#{cid}/table/#{table}/data?apikey=#{apikey}",
body: data_to_push.to_json,
headers: { 'Content-Type' => 'application/json' })
response
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment