Sha256: 001d4791e09d2d1a2bae549f62bbb5964ad689dfe78597d317d1bea5bc803cc3
Contents?: true
Size: 705 Bytes
Versions: 6
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true module Lokalise module Connection BASE_URL = 'https://api.lokalise.com/api2/' def connection(client) options = { headers: { accept: 'application/json', user_agent: "ruby-lokalise-api gem/#{Lokalise::VERSION}", 'x-api-token': client.token }, url: BASE_URL } Faraday.new(options, request_params_for(client)) { |faraday| faraday.adapter Faraday.default_adapter } end private # Allows to customize request params per-client def request_params_for(client) {request: {timeout: client.timeout, open_timeout: client.open_timeout}} end end end
Version data entries
6 entries across 6 versions & 1 rubygems