Class: Scalingo::Endpoint::AccountKeys

Inherits:
Collection
  • Object
show all
Defined in:
lib/scalingo/endpoint/account_keys.rb

Instance Attribute Summary

Attributes included from Base

#api, #auth_api, #prefix

Instance Method Summary collapse

Methods inherited from Collection

#all, #each, #find, #find_by, #resource_class

Methods included from Scalingo::Endpoint

included

Methods included from ClassMethods

#resources

Constructor Details

#initialize(api, _, opts = {}) ⇒ AccountKeys

Returns a new instance of AccountKeys.



4
5
6
# File 'lib/scalingo/endpoint/account_keys.rb', line 4

def initialize(api, _, opts = {})
  super(api, 'keys', opts)
end

Instance Method Details

#collection_nameObject



8
9
10
# File 'lib/scalingo/endpoint/account_keys.rb', line 8

def collection_name
  'keys'
end

#create(name, content) ⇒ Object



12
13
14
# File 'lib/scalingo/endpoint/account_keys.rb', line 12

def create(name, content)
  post(nil, key: { name: name, content: content })
end