Sha256: a6b82ba35ccd1bdd60009fd96a0403a79dc157eff9072a9500fb40e0ed1a76e9

Contents?: true

Size: 1.51 KB

Versions: 3

Compression:

Stored size: 1.51 KB

Contents

# encoding: utf-8

module GithubCLI
  class Gist < API

    class << self

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

      def starred(params, options)
        output options do
          github_api(options).gists.starred params
        end
      end

      def get(id, params, options)
        output options do
          github_api(options).gists.get id, params
        end
      end

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

      def edit(id, params, options)
        output options do
          github_api(options).gists.edit id, params
        end
      end

      def star(id, params, options)
        output options do
          github_api(options).gists.star id, params
        end
      end

      def unstar(id, params, options)
        output options do
          github_api(options).gists.unstar id, params
        end
      end

      def starred?(id, params, options)
        output options do
          github_api(options).gists.starred? id, params
        end
      end

      def fork(id, params, options)
        output options do
          github_api(options).gists.fork id, params
        end
      end

      def delete(id, params, options)
        output options do
          github_api(options).gists.delete id, params
        end
      end
    end

  end # Gist
end # GithubCLI

Version data entries

3 entries across 3 versions & 1 rubygems

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