Sha256: 08734143ed62d0f53445be857ee672139a74779627dea28a9e0b9c5418ae36d3

Contents?: true

Size: 1.86 KB

Versions: 2

Compression:

Stored size: 1.86 KB

Contents

# encoding: utf-8

module Github
  class Client < API

    # Serving up the ‘social’ in Social Coding™, the Activity APIs
    # provide access to notifications, subscriptions, and timelines.
    #
    def activity(options = {})
      @activity ||= ApiFactory.new 'Activity', options
    end

    def emojis(options = {})
      @emojis ||= ApiFactory.new 'Emojis', options
    end

    def gists(options = {})
      @gists ||= ApiFactory.new 'Gists', options
    end

    # The Git Database API gives you access to read and write raw Git objects
    # to your Git database on GitHub and to list and update your references
    # (branch heads and tags).
    def git_data(options = {})
      @git_data ||= ApiFactory.new 'GitData', options
    end
    alias :git :git_data

    def issues(options = {})
      @issues ||= ApiFactory.new 'Issues', options
    end

    def markdown(options = {})
      @markdown ||= ApiFactory.new 'Markdown', options
    end

    # An API for users to manage their own tokens. You can only access your own
    # tokens, and only through Basic Authentication.
    def oauth(options = {})
      @oauth ||= ApiFactory.new 'Authorizations', options
    end
    alias :authorizations :oauth

    def orgs(options = {})
      @orgs ||= ApiFactory.new 'Orgs', options
    end
    alias :organizations :orgs

    def pull_requests(options = {})
      @pull_requests ||= ApiFactory.new 'PullRequests', options
    end

    def repos(options = {})
      @repos ||= ApiFactory.new 'Repos', options
    end
    alias :repositories :repos

    def search(options = {})
      @search ||= ApiFactory.new 'Search', options
    end

    # Many of the resources on the users API provide a shortcut for getting 
    # information about the currently authenticated user.
    #
    def users(options = {})
      @users ||= ApiFactory.new 'Users', options
    end

  end # Client
end # Github

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
github_api-0.8.1 lib/github_api/client.rb
github_api-0.8.0 lib/github_api/client.rb