Sha256: e4c0085ce872fa33413f1e0d008355db3b90b0b2489962cc51acc28c6da2284d

Contents?: true

Size: 409 Bytes

Versions: 8

Compression:

Stored size: 409 Bytes

Contents

# encoding: utf-8

module Github
  class Scopes < API

    # Check what OAuth scopes you have.
    #
    # = Examples
    #  github = Github.new :oauth_token => 'token'
    #  github.scopes.all
    #
    def list(params={})
      response = get_request("/user", params)
      response.headers.oauth_scopes ? response.headers.oauth_scopes.split(',') : response
    end
    alias :all :list

  end
end # Github

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
github_api-0.9.7 lib/github_api/scopes.rb
github_api-0.9.6 lib/github_api/scopes.rb
github_api-0.9.5 lib/github_api/scopes.rb
github_api-0.9.4 lib/github_api/scopes.rb
github_api-0.9.3 lib/github_api/scopes.rb
github_api-0.9.2 lib/github_api/scopes.rb
github_api-0.9.1 lib/github_api/scopes.rb
github_api-0.9.0 lib/github_api/scopes.rb