Sha256: c383409553de8f2c61646e5183d20d0e23833b288f3d8b8577ffbb1af0ec2982

Contents?: true

Size: 393 Bytes

Versions: 9

Compression:

Stored size: 393 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.oauth_scopes ? response.oauth_scopes.split(',') : response
    end
    alias :all :list

  end
end # Github

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
github_api-0.8.11 lib/github_api/scopes.rb
github_api-0.8.10 lib/github_api/scopes.rb
github_api-0.8.9 lib/github_api/scopes.rb
github_api-0.8.8 lib/github_api/scopes.rb
github_api-0.8.7 lib/github_api/scopes.rb
github_api-0.8.6 lib/github_api/scopes.rb
github_api-0.8.5 lib/github_api/scopes.rb
github_api-0.8.4 lib/github_api/scopes.rb
github_api-0.8.3 lib/github_api/scopes.rb