Sha256: 4b4711f10ee2e4f32d688b50635ce1cb63a915c7fc2f8bf5d989a8fb59933bea
Contents?: true
Size: 597 Bytes
Versions: 3
Compression:
Stored size: 597 Bytes
Contents
require './lib/marver.rb' require 'digest/md5' module Marver module API class Client include Marver::Queryable API_VERSION = "v1" API_ENDPOINT = "http://gateway.marvel.com" def get(entity, options) query_string = options.empty? ? "" : hash_to_querystring(options) url = endpoint + "#{entity.to_s}?" + query_string + credentials Marver::API::Response.new(RestClient.get(url)) end def endpoint "#{API_ENDPOINT}/#{API_VERSION}/public/" end def credentials Credentials.get end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
marver-0.0.6 | lib/marver/api/client.rb |
marver-0.0.5 | lib/marver/api/client.rb |
marver-0.0.4 | lib/marver/api/client.rb |