Sha256: cdc3d6b090ae8d38d287887077761866ed1ac8a56959c2cd922d074b0ae3daee
Contents?: true
Size: 453 Bytes
Versions: 4
Compression:
Stored size: 453 Bytes
Contents
# frozen_string_literal: true require 'cased/query' module Cased class Policy attr_reader :api_key, :client def initialize(api_key:) @api_key = api_key @client = Cased::Clients.create(api_key: @api_key) end def events(phrase: nil, variables: {}) Query.new(@client, phrase: phrase, variables: variables) end def event(id) response = @client.get("events/#{id}") response.body end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
cased-ruby-0.8.0 | lib/cased/policy.rb |
cased-ruby-0.7.1 | lib/cased/policy.rb |
cased-ruby-0.7.0 | lib/cased/policy.rb |
cased-ruby-0.6.1 | lib/cased/policy.rb |