Sha256: 799912e479f41691a71ebe6957dd9218253aa5e86d0766346af1e92ba87f1227

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

module Lolxin
  class LolStatus
    BASE_ENDPOINT = "http://status.leagueoflegends.com/shards"

    attr_accessor :conn

    def initialize(options = {})
      endpoint = BASE_ENDPOINT
      @conn    = Faraday.new(endpoint, options[:conn_options]) do |faraday|
        faraday.request  :url_encoded
        faraday.response :logger
        faraday.adapter  Faraday.default_adapter
      end
    end

    def shards(params = {})
      shard = params.delete(:shard).to_s
      conn.get(shard, params)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lolxin-0.12.1 lib/lolxin/lol_status.rb