Sha256: 81ed5a63b5ab0cd7b74fdcac1c166370cb3eeb6dc532a39391d05e440e6f1f86

Contents?: true

Size: 743 Bytes

Versions: 1

Compression:

Stored size: 743 Bytes

Contents

# frozen_string_literal: true

require 'starcall/helpers/region_parser'
require 'starcall/api_requests'

module Starcall
  module Endpoints
    # Method to check the status of services in a region
    class StatusV3
      # Get League of Legends status for the given shard
      def self.status_data(region: 'euw')
        Starcall::Regions.valid?(region: region)
        Starcall::ApiRequests.make_request(
          url: "https://#{parse_region(region: region)}.api.riotgames.com"\
               '/lol/status/v3/shard-data'
        )
      end

      def self.parse_region(region:)
        Starcall::Helpers::RegionParser.parse(region: region)
      end

      private_class_method :parse_region
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
starcall-0.6.0 lib/starcall/endpoints/status_v3.rb