Class: Starcall::ApiRequests

Inherits:
Object
  • Object
show all
Defined in:
lib/starcall/api_requests.rb

Overview

A small class to make a HTTP get request using the passed in URL Intened to only be used my internal Gem classes and not be called directly.

Class Method Summary collapse

Class Method Details

.make_request(url:) ⇒ Object



9
10
11
# File 'lib/starcall/api_requests.rb', line 9

def self.make_request(url:)
  HTTParty.get(url, { headers: { 'X-Riot-Token' => ENV['RIOT_API_KEY'] } }).parsed_response
end