tags:

views:

28

answers:

1

I have to authenticate user through GitHub API using Ruby to be able to create a private repository.

The manual http://develop.github.com/p/general.html shows how to do it with curl.

Could someone show me how to do it with Ruby gem like:

rest-client http://github.com/pengwynn/octopussy

or

octopussy http://github.com/pengwynn/octopussy

Thanks!

+1  A: 

Something like this?

client = Octopussy::Client.new(:login => 'someguy', :token => 'sometoken123b1i3')
client.create(:name=>'foobar', :description=>'Foo Bar', :homepage=> 'http://example.com', :public=>false)

http://github.com/pengwynn/octopussy/blob/master/lib/octopussy/client.rb#L198

BaroqueBobcat