Sha256: 2d8855b33f57454db1c946cca67b42c1d4b6f535fedbcc3743f7ed635403a0f8

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

module ComicVine
  class Api
    class Request
      attr_reader :raw_path, :raw_args, :raw_options

      GET = 'get'.freeze

      def initialize(path:, args: {}, options: {})
        @raw_path = path
        @raw_args = args
        @raw_options = options
      end

      def verb
        GET
      end

      def path
        "/api/#{raw_path}/"
      end

      def args
        {
          format: :json
        }.merge(raw_args)
      end

      def options
        raw_options
      end

      def server
        ComicVine::Api::DEFAULT_SERVER
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
comic_vine-api-0.1.1 lib/comic_vine/api/request.rb