Class Fleakr::Api::ParameterList
In: lib/fleakr/api/parameter_list.rb
Parent: Object

ParameterList

Represents a list of parameters that get passed as part of a MethodRequest or UploadRequest. These can be transformed as necessary into query strings (using to_query) or form data (using to_form)

Methods

<<   []   authenticate?   new   sign?   to_form   to_query  

Public Class methods

Create a new parameter list with optional parameters:

:authenticate?
Request will automatically be authenticated if Fleakr.token is available set this to false to force it not to authenticate

Any additional name / value pairs will be created as individual ValueParameters as part of the list. Example:

  >> list = Fleakr::Api::ParameterList.new(:foo => 'bar')
  => #<Fleakr::Api::ParameterList:0x1656e6c @list=... >
  >> list[:foo]
  => #<Fleakr::Api::ValueParameter:0x1656da4 @include_in_signature=true, @name="foo", @value="bar">

Public Instance methods

Add a new parameter (ValueParameter / FileParameter) to the list

Access an individual parameter by key (symbol or string)

Should we send the auth_token with the request?

Should this parameter list be signed?

Generate the form representation of this parameter list including the boundary

Generate the query string representation of this parameter list - e.g. foo=bar&blee=baz

[Validate]