Skip to content

Instantly share code, notes, and snippets.

@aussielunix
Forked from runemadsen/httparty.rb
Created December 17, 2011 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aussielunix/1488720 to your computer and use it in GitHub Desktop.
Save aussielunix/1488720 to your computer and use it in GitHub Desktop.
Creating a repo via the Github API and HTTParty
class Github
include HTTParty
base_uri 'https://api.github.com'
end
Github.post("/user/repos", :query => {
:access_token => @token
},
:body => {
:name => name,
:description => "Reop description",
:homepage => "http://mysite.com",
:public => true,
:has_issues => false,
:has_wiki => false,
:has_downloads => false
}.to_json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment