Method: Github.api
- Defined in:
- lib/github.rb
.api(authorization_info = {}) ⇒ Object
Get an instance of the Octokit API class
Authorization info is the structure from here: developer.github.com/v3/oauth/#create-a-new-authorization
something like this:
:scopes => ['repo'],
:note => "git-scripts command line interface",
:note_url => "https://github.com/ifixit/git-scripts"
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/github.rb', line 31 def self.api( = {}) # Let Octokit handle pagination automagically for us. Octokit.auto_paginate = true # Defaults = { :scopes => ['repo'], :note => "ifixit git-scripts command line interface", :note_url => "https://github.com/ifixit/git-scripts" }.merge() OctokitWrapper.new(self::get_authentication()) end |