Class: Kitsu::API

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/kitsu/api.rb

Constant Summary collapse

BASE_URL =
'https://kitsu.io/api/edge/'.freeze

Class Method Summary collapse

Class Method Details

.get(path) ⇒ Object



9
10
11
12
13
14
# File 'lib/kitsu/api.rb', line 9

def self.get(path)
  path = path.gsub(BASE_URL, '')
  url = "#{BASE_URL}/#{path}"
  response = super(url)
  JSON.parse(response)
end