Class: GithubCLI::Gist

Inherits:
API
  • Object
show all
Defined in:
lib/github_cli/apis/gist.rb

Class Method Summary collapse

Methods inherited from API

configure, github_api, output, set_basic_auth

Class Method Details

.all(params, options) ⇒ Object


8
9
10
11
12
13
# File 'lib/github_cli/apis/gist.rb', line 8

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

.create(params, options) ⇒ Object


27
28
29
30
31
# File 'lib/github_cli/apis/gist.rb', line 27

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

.delete(id, params, options) ⇒ Object


63
64
65
66
67
# File 'lib/github_cli/apis/gist.rb', line 63

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

.edit(id, params, options) ⇒ Object


33
34
35
36
37
# File 'lib/github_cli/apis/gist.rb', line 33

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

.fork(id, params, options) ⇒ Object


57
58
59
60
61
# File 'lib/github_cli/apis/gist.rb', line 57

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

.get(id, params, options) ⇒ Object


21
22
23
24
25
# File 'lib/github_cli/apis/gist.rb', line 21

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

.star(id, params, options) ⇒ Object


39
40
41
42
43
# File 'lib/github_cli/apis/gist.rb', line 39

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

.starred(params, options) ⇒ Object


15
16
17
18
19
# File 'lib/github_cli/apis/gist.rb', line 15

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

.starred?(id, params, options) ⇒ Boolean


51
52
53
54
55
# File 'lib/github_cli/apis/gist.rb', line 51

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

.unstar(id, params, options) ⇒ Object


45
46
47
48
49
# File 'lib/github_cli/apis/gist.rb', line 45

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