Class: TokyoApi::Actionkit

Inherits:
Base
  • Object
show all
Defined in:
lib/tokyo_api/actionkit.rb

Instance Method Summary collapse

Methods inherited from Base

#normalized_base_path, #required_fields_param, #url_escape

Instance Method Details

#base_pathObject



5
6
7
# File 'lib/tokyo_api/actionkit.rb', line 5

def base_path
  'actionkit'
end

#full_user(id) ⇒ Object



9
10
11
# File 'lib/tokyo_api/actionkit.rb', line 9

def full_user(id)
  client.get_request("#{normalized_base_path}full_user/#{url_escape(id)}").body
end

#user_path(id, required_fields: nil) ⇒ Object



13
14
15
16
17
# File 'lib/tokyo_api/actionkit.rb', line 13

def user_path(id, required_fields: nil)
  path = String.new("/#{normalized_base_path}user/#{url_escape(id)}")
  path << "?#{required_fields_param(required_fields)}" unless required_fields.nil?
  path
end