Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (23 sloc) 1.19 KB
$LOAD_PATH.unshift 'lib'
require 'trello'
include Trello
include Trello::Authorization
Trello::Authorization.const_set :AuthPolicy, OAuthPolicy
# First arg is your public key, and second is secret.
# You can get this info by going to:
OAuthPolicy.consumer_credential = 'PUBLIC_KEY', 'SECRET'
# First arg is the access token key, second is presently not used -- trello bug?
# You can get the key by going to this url in your browser:
# Only request the permissions you need; i.e., scope=read if you only need read, or scope=write if you only need write. Comma separate scopes you need.
# If you want your token to expire after 30 days, drop the &expiration=never.
OAuthPolicy.token = 'ACCESS_TOKEN_KEY', nil
me = Member.find("me")
board = Board.create(:name => "ruby-trello test")
if board.has_lists?
list = board.lists.first
list = List.create(:name => "Getting Shit done", :board_id =>
Card.create(:name => "test from ruby-trello", :description => "Just a desc", :list_id =>