README.rdoc in github_api-0.1.0.pre vs README.rdoc in github_api-0.1.0
- old
+ new
@@ -6,15 +6,15 @@
== Installation
Grab the gem by issuing
- gem install github-api
+ gem install github_api --pre
or in your Gemfile
- gem 'github-api'
+ gem "github_api", "~> 0.1.0.pre"
== Usage
Create a new client instance
@@ -67,11 +67,11 @@
Github::Orgs
Github::PullRequests
Github::Repos
Github::Users
-Some parts of GitHub API v3 require you to be autheticated, for instance the following are examples of API only for the authenticated user
+Some parts of GitHub API v3 require you to be autheticated, for instance the following are examples of APIs only for the authenticated user
Github::Users::Emails
Github::Users::Keys
All method calls form ruby like sentences and allow for intuitive api navigation, for instance
@@ -81,10 +81,26 @@
@github.users.following? 'wycats' # => returns true if following, otherwise false
For specification on all available methods go to http://developer.github.com/v3/ or
read the rdoc, all methods are documented there with examples of usage.
+== Inputs
+
+Some API methods apart from required parameters such as username, repository name
+or organisation name, allow you to switch the way the data is returned to you, for instance
+
+ @github = Github.new
+ @github.git_data.tree 'peter-murach', 'github', 'c18647b75d72f19c1e0cc8af031e5d833b7f12ea' # => gets a tree
+
+ @github.git_data.tree 'peter-murach', 'github', 'c18647b75d72f19c1e0cc8af031e5d833b7f12ea', :recursive => true # => gets a whole tree recursively
+
+ by passing a block you can iterate over the file tree
+
+ @github.git_data.tree 'peter-murach', 'github', 'c18647b75d72f19c1e0cc8af031e5d833b7f12ea', :recursive => true do |file|
+ puts file.path
+ end
+
== MIME Types
Provides support for the following mime types
In order to pass a mime type with your request do
@@ -130,9 +146,11 @@
@github = Github.new
@github.orgs.public_member? 'github', 'technoweenie' # => true
== Caching
+
+Each call by default is not going to be cached. In order to set the inmemory cache do...
== TODO
* Add support for mime types
* Add request caching - local filestore?, http caching?.