module Spore::Client::Cells

Public Instance Methods

create_cell(app_id, environment, key, value, cell_id = nil) click to toggle source
# File lib/spore/client/cells.rb, line 4
def create_cell(app_id, environment, key, value, cell_id = nil)
  cell_id = SecureRandom.uuid if cell_id.nil?
  path = "/apps/#{app_id}/envs/#{environment}/cells"
  response = post path, { id: cell_id, key: key, value: value }, { async: true }
  response.body["cell"]
end
get_cell(app_id, environment, cell_id) click to toggle source
# File lib/spore/client/cells.rb, line 11
def get_cell(app_id, environment, cell_id)
  path = "/apps/#{app_id}/envs/#{environment}/cells/#{cell_id}"
  response = get path
  response.body["cell"]
end