Class: Funky::Connection::API Private
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
Class Method Details
.batch_request(ids:, fields:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 19 20 21 22 23 |
# File 'lib/funky/connections/api.rb', line 15 def self.batch_request(ids:, fields:) uri = URI::HTTPS.build host: host, path: "/", query: "include_headers=false&access_token=#{app_id}%7C#{app_secret}" batch = create_batch_for ids, fields http_request = post_http_request uri http_request.set_form_data batch: batch.to_json response_for(http_request, uri) end |
.request(id:, fields:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 13 |
# File 'lib/funky/connections/api.rb', line 8 def self.request(id:, fields:) uri = URI::HTTPS.build host: host, path: "/v2.6/#{id}", query: "access_token=#{app_id}%7C#{app_secret}&fields=#{fields}" response_for(get_http_request(uri), uri) end |