Class: Bitrix24CloudApi::Base
- Inherits:
-
Object
- Object
- Bitrix24CloudApi::Base
show all
- Extended by:
- Forwardable
- Defined in:
- lib/bitrix24_cloud_api/base.rb
Direct Known Subclasses
COMMON_METHODS::App, COMMON_METHODS::Event, COMMON_METHODS::User, CRM::Communication, CRM::Duplicate, CRM::EXTERNALCHANNEL::Connector, CRM::Entity, CRM::Enum, CRM::Enumeration, CRM::Externalchannel, CRM::LiveFeedMessage, CRM::Multifield, CRM::Paysystem, CRM::PersonType, CRM::ProductRow, CRM::REQUISITE::Link, CRM::Settings, CRM::Stage, Client, CommonMethods, Crm
Class Method Summary
collapse
Class Method Details
.resource_path(exact_name = nil) ⇒ Object
21
22
23
|
# File 'lib/bitrix24_cloud_api/base.rb', line 21
def resource_path(exact_name = nil)
exact_name || name.gsub("Bitrix24CloudApi::", "").gsub("::", ".").downcase
end
|
.resource_url(client, action) ⇒ Object
15
16
17
18
19
|
# File 'lib/bitrix24_cloud_api/base.rb', line 15
def resource_url(client, action)
path = client.api_endpoint
path << "#{resource_path}." unless resource_path.empty?
path << "#{action}.#{client.extension}"
end
|
.to_query(params) ⇒ Object
11
12
13
|
# File 'lib/bitrix24_cloud_api/base.rb', line 11
def to_query(params)
params.to_a.map { |x| "#{CGI.escape(x[0].to_s)}=#{CGI.escape(x[1].to_s)}" }.join("&")
end
|