Sha256: 47f235d3661ccabe3a493d76859a1ff98066123b35cc5340d81c6961959a85f4

Contents?: true

Size: 416 Bytes

Versions: 3

Compression:

Stored size: 416 Bytes

Contents

# frozen_string_literal: true

require "faraday"

module LoopsSdk
  class Configuration
    attr_accessor :api_key

    def connection
      @connection ||= Faraday.new(url: "https://app.loops.so/api/") do |faraday|
        faraday.adapter Faraday.default_adapter
        faraday.headers["Authorization"] = "Bearer #{api_key}"
        faraday.headers["Content-Type"] = "application/json"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loops_sdk-0.2.0 lib/loops_sdk/configuration.rb
loops_sdk-0.1.2 lib/loops_sdk/configuration.rb
loops_sdk-0.1.0 lib/loops_sdk/configuration.rb