Sha256: 13bccbfaaaa4bc5970c6dd28f37a0cf6ab870d5b5fd58664f7296d655641b01a

Contents?: true

Size: 437 Bytes

Versions: 7

Compression:

Stored size: 437 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(*args)
      arguments(args)
      response = get_request("/user", arguments.params)
      response.headers.oauth_scopes ? response.headers.oauth_scopes.split(',') : response
    end
    alias :all :list

  end
end # Github

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
github_api-0.11.3 lib/github_api/scopes.rb
github_api-0.11.2 lib/github_api/scopes.rb
github_api-0.11.1 lib/github_api/scopes.rb
github_api-0.11.0 lib/github_api/scopes.rb
github_api-0.10.2 lib/github_api/scopes.rb
github_api-0.10.1 lib/github_api/scopes.rb
github_api-0.10.0 lib/github_api/scopes.rb