Sha256: 467c84a086e2927aba3884d244da85c34487e99b683a9de4322c45aa9776266e

Contents?: true

Size: 615 Bytes

Versions: 2

Compression:

Stored size: 615 Bytes

Contents

require 'international_postcode_api/version'
require 'international_postcode_api/client'
require 'securerandom'
require 'byebug'

module InternationalPostcodeApi
  class << self
    attr_accessor :configuration
  end

  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration)
  end

  class Configuration
    attr_accessor :api_key, :secret_key, :base_uri, :dynamic_endpoints
    attr_reader :session_token

    def initialize
      @base_uri = 'https://api.postcode.eu/international/v1/'
      @session_token = SecureRandom.hex(8)
      @dynamic_endpoints = true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
international_postcode_api-0.2.0 lib/international_postcode_api.rb
international_postcode_api-0.1.0 lib/international_postcode_api.rb