You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This gem closely mirrors the GitHub API hierarchy i.e. if you want to create a download resource, look up the GitHub API spec and issue the request as in `github.repos.downloads.create`
97
+
The **github_api** closely mirrors the [GitHub API](https://developer.github.com/v3/) hierarchy. For example, if you want to create a new file in a repository, look up the GitHub API spec. In there you will find contents sub category underneath the repository category. This would translte to the request:
98
98
99
-
For example to interact with GitHub Repositories API, issue the following calls that correspond directly to the GitHub API hierarchy
The code base has been extensively documented with examples of how to use each method. Please refer to the [documentation](http://rubydoc.info/github/peter-murach/github/master/frames) under the `Github::Client` class name.
119
+
107
120
### 1.2 Modularity
108
121
109
-
The code base is modular and allows for you to work specifically with a given part of GitHub API e.g. blobs
122
+
The code base is modular. This means that you can work specifically with a given part of GitHub API. If you want to only work with activity starring API do the following:
Please refer to the [documentation](http://rubydoc.info/github/peter-murach/github/master/frames) and look under `Github::Client` to see all avilable classes.
130
+
116
131
### 1.3 Response Querying
117
132
The response is of type [Github::ResponseWrapper] which allows traversing all the json response attributes like method calls i.e.
Certain methods require authentication. To get your GitHub OAuth v2 credentials,
464
-
register an app at https://github.com/settings/applications/
465
-
You will need to be logged in to register the application.
466
-
467
-
```ruby
468
-
Github.configure do |config|
469
-
config.oauth_token =YOUR_OAUTH_ACCESS_TOKEN
470
-
config.basic_auth ='login:password'
471
-
end
472
-
473
-
or
474
-
475
-
Github.new(:oauth_token => YOUR_OAUTH_TOKEN)
476
-
Github.new(:basic_auth => 'login:password')
477
-
```
478
-
479
-
All parameters can be overwritten each method call by passing a parameters hash.
480
-
481
-
482
-
By default, no caching will be performed. In order to set the cache do... If no cache type is provided, a default memoization is done.
483
-
484
476
## 10 Pagination
485
477
486
478
Any request that returns multiple items will be paginated to 30 items by default. You can specify custom `page` and `per_page` query parameters to alter default behavior. For instance:
0 commit comments