Sha256: 994a054c7066ec7c63db4fcccc9a25f340d3fe561c2ad8c808a8c25cbd2b3127
Contents?: true
Size: 563 Bytes
Versions: 1
Compression:
Stored size: 563 Bytes
Contents
module Lolxin class Api BASE_ENDPOINT = "https://%{region}.api.riotgames.com/lol/" attr_accessor :api_key, :conn, :region, :version def initialize(options = {}) @api_key = options[:api_key] @region = options[:region] @version = options[:version] endpoint = BASE_ENDPOINT % {region: region} @conn = Faraday.new(endpoint, options[:conn_options]) do |faraday| faraday.request(:url_encoded) faraday.adapter(Faraday.default_adapter) faraday.params[:api_key] = api_key end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lolxin-0.13.0 | lib/lolxin/helpers/api.rb |