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, #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) ⇒ AccountKeys



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

def initialize(api)
  super(api, 'account/keys')
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