Class: GithubCLI::Gist

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

Constant Summary

Constants inherited from API

API::ENDPOINT

Class Method Summary collapse

Methods inherited from API

configure_api, github_api, output

Class Method Details

.all(params, format) ⇒ Object



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

def all(params, format)
  output format do
    github_api.gists.list params
  end
end

.create(params, format) ⇒ Object



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

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

.delete(id, params, format) ⇒ Object



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

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

.edit(id, params, format) ⇒ Object



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

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

.fork(id, params, format) ⇒ Object



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

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

.get(id, params, format) ⇒ Object



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

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

.star(id, params, format) ⇒ Object



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

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

.starred(params, format) ⇒ Object



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

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

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

Returns:

  • (Boolean)


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

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

.unstar(id, params, format) ⇒ Object



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

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