module ShadowCabinet

Constants

VERSION

Public Class Methods

client(url:, key:, secret:) click to toggle source
# File lib/shadow_cabinet.rb, line 5
def self.client(url:, key:, secret:)
  Client::Real.new(url: url, key: key, secret: secret)
end
update_box(api, id, content) click to toggle source
# File lib/shadow_cabinet.rb, line 9
def self.update_box(api, id, content)
  begin
    data = api.patch(
      path: "/boxes/#{id}",
      data: {
        "box" => {
          "content" => content
        }
      }.to_json
    )
  rescue
    return false
  end

  true
end