Class: Gitea::ReposResource
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#delete(owner:, repo:) ⇒ Object
17
18
19
|
# File 'lib/gitea/resources/repos.rb', line 17
def delete(owner:, repo:)
delete_request("repos/#{owner}/#{repo}")
end
|
#get(owner:, repo:) ⇒ Object
9
10
11
|
# File 'lib/gitea/resources/repos.rb', line 9
def get(owner:, repo:)
Repo.new get_request("repos/#{owner}/#{repo}").body
end
|
#search(**params) ⇒ Object
4
5
6
7
|
# File 'lib/gitea/resources/repos.rb', line 4
def search(**params)
response = get_request("repos/search", params: params)
Collection.from_response(response, type: Repo, kind: "data")
end
|
#update(owner:, repo:, **args) ⇒ Object
13
14
15
|
# File 'lib/gitea/resources/repos.rb', line 13
def update(owner:, repo:, **args)
Repo.new patch_request("repos/#{owner}/#{repo}", body: args).body
end
|