Sha256: 7e306947a29f097d415fc5a4135c90fefaf78703f9516c12ab35ef11911cba2e

Contents?: true

Size: 1.82 KB

Versions: 3

Compression:

Stored size: 1.82 KB

Contents

# encoding: utf-8

module GithubCLI
  class Repository < API

    class << self

      def all(params, options)
        args = options[:every] ? ['every', params] : [params]
        output options do
          github_api(options).repos.list *args
        end
      end

      def get(user, repo, params, options)
        output options do
          github_api(options).repos.get user, repo, params
        end
      end

      def create(params, options)
        output options do
          github_api(options).repos.create params
        end
      end

      def edit(user, repo, params, options)
        output options do
          github_api(options).repos.edit user, repo, params
        end
      end

      def delete(user, repo, params, options)
        output options do
          github_api(options).repos.delete user, repo, params
        end
      end

      def branches(user, repo, params, options)
        output options do
          github_api(options).repos.branches user, repo, params
        end
      end

      def branch(user, repo, name, params, options)
        output options do
          github_api(options).repos.branch user, repo, name, params
        end
      end

      def contributors(user, repo, params, options)
        output options do
          github_api(options).repos.contributors user, repo, params
        end
      end

      def languages(user, repo, params, options)
        output options do
          github_api(options).repos.languages user, repo, params
        end
      end

      def tags(user, repo, params, options)
        output options do
          github_api.repos.tags user, repo, params
        end
      end

      def teams(user, repo, params, options)
        output options do
          github_api(options).repos.teams user, repo, params
        end
      end
    end

  end # Repository
end # GithubCLI

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
github_cli-0.6.2 lib/github_cli/apis/repository.rb
github_cli-0.6.1 lib/github_cli/apis/repository.rb
github_cli-0.6.0 lib/github_cli/apis/repository.rb