Class: Scro::Auth::Repository
Instance Method Summary
collapse
Methods inherited from Request
#endpoint, #get, #post, #uri_for
Constructor Details
#initialize(token, user, name) ⇒ Repository
Returns a new instance of Repository.
4
5
6
7
|
# File 'lib/scro/auth/repository.rb', line 4
def initialize(token, user, name)
super(token)
@user, @name = user, name
end
|
Instance Method Details
#add_deploy_key(title, key) ⇒ Object
9
10
11
|
# File 'lib/scro/auth/repository.rb', line 9
def add_deploy_key(title, key)
post("repos/key/#{@name}/add", {:title => title, :key => key})
end
|
#deploy_keys ⇒ Object
13
14
15
|
# File 'lib/scro/auth/repository.rb', line 13
def deploy_keys
get("repos/keys/#{@name}")["public_keys"]
end
|
#info ⇒ Object
17
18
19
|
# File 'lib/scro/auth/repository.rb', line 17
def info
@info ||= get("repos/show/#{@user}/#{@name}")["repository"]
end
|