Skip to content

Instantly share code, notes, and snippets.

@adelcambre
Forked from anonymous/gist:290194
Created January 29, 2010 22:08
Show Gist options
  • Save adelcambre/290197 to your computer and use it in GitHub Desktop.
Save adelcambre/290197 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'httparty'
require 'pp'
TOKEN = 'token'
class Task
include HTTParty
base_uri "https://api.myintervals.com"
def self.all
get("/task/", :basic_auth => {:username => TOKEN, :password => "x"})
end
end
pp Task.all.to_hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment