lib/marvel/client.rb in marvel_api-0.1.0 vs lib/marvel/client.rb in marvel_api-0.1.1
- old
+ new
@@ -1,16 +1,20 @@
require 'json'
require 'time'
require 'faraday'
require 'digest/md5'
+require_relative 'request'
+require_relative 'connection'
require_relative 'configuration'
module Marvel
class Client
+ include Marvel::Request
+ include Marvel::Connection
include Marvel::Configuration
- BASE_URL = 'https://gateway.marvel.com/v1/public/'
+ # BASE_URL = 'https://gateway.marvel.com/v1/public/'
def initialize
reset
end
@@ -33,9 +37,10 @@
# fetches a single character by id
def get_character(id)
# v1/public/characters/{characterId}
Faraday.get("#{BASE_URL}characters/#{id}#{auth}").body
+ # get("characters/#{id}#{auth}")
end
# fetches lists of comics filtered by a character id
def get_comics_by_character_id(id)
# v1/public/characters/{characterId}/comics
\ No newline at end of file