Class: AuthorsRequest Abstract Private

Inherits:
Request show all
Defined in:
lib/refworks/authors/authors_request.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This class is abstract.

The Author class base abstract request class. Parameters common to all Author class calls are captured here.

Direct Known Subclasses

AuthorsAllRequest, AuthorsSearchRequest

Class Method Summary collapse

Methods inherited from Request

generate_signature, http_request_verb

Class Method Details

.call_classObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/refworks/authors/authors_request.rb', line 7

def self.call_class
  "authors"
end

.generate_class_params(params) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Handle parameters common to all Author calls.

Parameters:

  • params (Hash)

    All Author class calls should include the params :pgsize and :pgnum in their method_params.



13
14
15
16
17
18
19
20
21
22
# File 'lib/refworks/authors/authors_request.rb', line 13

def self.generate_class_params(params)
  class_name = call_class()

  # query parameters common to all Authors calls
  {
      :class => class_name,
      :pgsize => params[:pgsize] || 50,
      :pgnum => params[:pgnum] || 1,
  }
end