README.rdoc in github_api-0.3.6 vs README.rdoc in github_api-0.3.7
- old
+ new
@@ -24,10 +24,17 @@
At this stage you can also supply various configuration parameters, such as :user, :repo, :org, :oauth_token, :login, :password or :basic_auth which are used throughout the API
@github = Github.new :user => 'peter-murach', :repo => 'github-api'
+ or
+
+ @github = Github.new do |opts|
+ opts.user = 'peter-murach'
+ opts.repo = 'github-api'
+ end
+
You can authenticate either using OAuth authentication convenience methods(see section OAuth) or through basic authentication by passing your login and password credentials
@github = Github.new :login => 'peter-murach', :password => '...'
or use convenience method:
@@ -43,10 +50,10 @@
The code base is modular and allows for you to work specifically with a given part of GitHub API e.g. repositories
@repos = Github::Repos.new
@repos.branches 'peter-murach', 'github'
-or
+ or
@repos = Github::Repos.new :user => 'peter-murach', :repo => 'github'
@repos.branches
The response is of type [Hashie::Mash] and allows to traverse all the json response attributes like method calls e.i.