Sha256: b9a24ce8f89548cf15ae954aed0f513b5fc42d1f9b6c0bbeaa1df6038c4f4037
Contents?: true
Size: 1022 Bytes
Versions: 3
Compression:
Stored size: 1022 Bytes
Contents
require 'forwardable' require 'kintone/api' require 'kintone/command/accessor' class Kintone::Api class Guest extend Forwardable GUEST_PATH = '/k/guest/%s/v1/'.freeze ACCESSIBLE_COMMAND = [ :record, :records, :form, :app_acl, :record_acl, :field_acl, :space, :space_body, :space_thread, :space_members, :space_guests, :app, :apps, :bulk_request, :bulk, :file, :preview_form ].freeze def_delegators :@api, :get, :post, :put, :delete, :post_file def initialize(space_id, api) @api = api @guest_path = GUEST_PATH % space_id.to_i end def get_url(command) @guest_path + (COMMAND % command) end def method_missing(name, *args) if ACCESSIBLE_COMMAND.include?(name) CommandAccessor.send(name, self) else super end end def respond_to_missing?(name, *args) ACCESSIBLE_COMMAND.include?(name) || super end class CommandAccessor extend Kintone::Command::Accessor end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
kintone_rb-1.0.0 | lib/kintone/api/guest.rb |
kintone-oauth-extension-0.2.2 | lib/kintone/api/guest.rb |
kintone-oauth-extension-0.2.1 | lib/kintone/api/guest.rb |