module Posmoni::Interface

Public Instance Methods

all(options = {}) click to toggle source
# File lib/posmoni/interface.rb, line 4
def all(options = {})
  connector.get(options)
end
create(options) click to toggle source
# File lib/posmoni/interface.rb, line 8
def create(options)
  connector.post(options)
end
find_by(options = {}) click to toggle source
# File lib/posmoni/interface.rb, line 12
def find_by(options = {})
  @query_str = true if @query_str.nil?
  connector.get(options.merge({ query: options[:id] }), @query_str)
end

Private Instance Methods

connector() click to toggle source
# File lib/posmoni/interface.rb, line 19
def connector
  @connection ||= Posmoni::Connector.new(@path, @type, token: @project_key)
end