The mailman-client API

0.1

A Node.js client for mailman-core

ListArchivers Class

Extends ApiRequest
Module: ListArchivers
Parent Module: mailman-client

ListArchivers extends ApiRequest to perform operation on the list archivers

Properties

_info Object private

Object containing the resource information, will be null if getInfo() is never called

Default: null

_listId String private

ID of the corresponding list

_options Object private

Inherited from BaseRequest but overwritten in lib/ListArchivers.js:24

Configuration options such as the endpoint of the API, auth parameters etc.

Default: {}

_params Object private

The object containing the query parameters

Default: {}

_path Object private

Inherited from BaseRequest but overwritten in lib/ListArchivers.js:52

Object containing request path variables used to assemble the request URI

_queryParams Boolean private

A boolean flag that is set when there are query parameters to be rendered

Default: false

_supportedMethods Array private

Supported HTTP methods for this BaseRequest instance (Each of the child constructor classes i.e Client, List etc. define their own subset of supported methods)

Default: [ 'head', 'get', 'put', 'post', 'delete', 'patch' ]

_template String private

Inherited from BaseRequest but overwritten in lib/ListArchivers.js:43

The URI template used to generate the URI to request

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

Constructor

ListArchivers
(
  • options
  • listId
)

Parameters:

  • options Object

    A hash of options for the ListArchivers instance

    • endpoint String

      The endpoint URI to request

    • [username] String optional

      A username for authenticating API requests

    • [password] String optional

      A password for authenticating API requests

  • listId String

    ID of the corresponding list

Methods

_auth () Object private

Performs auth on the superagent request object if implied externally

Returns:

Object:

The superagent request object by performing auth on it

_checkAuthParameters () Boolean private

Checks if authentication is externally forced on the request object by passing in username & password

Returns:

Boolean:

Returns true if auth is forced else false

_checkMethodSupport
(
  • method
)
Boolean private

Verify that the request object in use supports a HTTP method

Parameters:

  • method String

    An HTTP method to check ('get', 'post', etc)

Returns:

Boolean:

Returns true if the HTTP method is supported else it will throw

_renderPath () String private

Renders the request path by using _path and _template

Returns:

String:

The rendered path string

_renderQuery () String private

Compose query string by using the recorded query parameters

Returns:

String:

Returns the query string to be appended in the final URI

_renderURI () String private

Renders the URI to request after checking for query parameters

Returns:

String:

The URI enpoint to request

all
(
  • [callback]
)
Promise async

Calls the callback(if any) with an array of available list archivers, and provide a promise to it

Parameters:

  • [callback] Function optional

    The callback function to be invoked with the results

    • err Error | Object

      Any errors encountered during the request

    • result Object

      An array of available list archivers

Returns:

Promise:

Promise to an array of available list archivers

delete
(
  • [callback]
  • transform
)
Promise async

Parameters:

  • [callback] Function optional

    A callback to invoke with the results of the DELETE request

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The response of the request

  • transform String

    Flag to get the full response object by passing in identity

Returns:

Promise:

A promise to the results of the HTTP request

each
(
  • callback
)
async

Iterating interface to the ListArchivers instance, callback is called each time with a list archiver and it's value

Parameters:

  • callback Function

    The callback function to be invoked

get
(
  • [callback]
  • transform
)
Promise async

Parameters:

  • [callback] Function optional

    A callback to invoke with the results of the GET request

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The response of the request

  • transform String

    Flag to get the full response object by passing in identity

Returns:

Promise:

A promise to the results of the HTTP request

getArchiver
(
  • key
  • [callback]
)
Promise async

Get the current state of the list archiver

Parameters:

  • key String

    The name of the list archiver

  • [callback] Function optional

    The callback function to be invoked with the results

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The state of the list archiver

Returns:

Promise:

Promise to the state of the list archiver

getInfo
(
  • [callback]
)
Promise async

Fetch the resource by making a HTTP GET request and calls the callback(if any), and provide a promise to the ListArchivers object itself

Parameters:

  • [callback] Function optional

    The callback function to be invoked with the results

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The ListArchivers object itself

Returns:

Promise:

Promise to the ListArchivers object itself

head
(
  • [callback]
  • transform
)
Promise async

Parameters:

  • [callback] Function optional

    A callback to invoke with the results of the HEAD request

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The response of the request

  • transform String

    Flag to get the full response object by passing in identity

Returns:

Promise:

A promise to the results of the HTTP request

patch
(
  • data
  • [callback]
  • transform
)
Promise async

Parameters:

  • data Object

    The patch data

  • [callback] Function optional

    A callback to invoke with the results of the PATCH request

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The response of the request

  • transform String

    Flag to get the full response object by passing in identity

Returns:

Promise:

A promise to the results of the HTTP request

post
(
  • data
  • [callback]
  • transform
)
Promise async

Parameters:

  • data Object

    The post data

  • [callback] Function optional

    A callback to invoke with the results of the POST request

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The response of the request

  • transform String

    Flag to get the full response object by passing in identity

Returns:

Promise:

A promise to the results of the HTTP request

put
(
  • data
  • [callback]
  • transform
)
Promise async

Parameters:

  • data Object

    The put data

  • [callback] Function optional

    A callback to invoke with the results of the PUT request

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The response of the request

  • transform String

    Flag to get the full response object by passing in identity

Returns:

Promise:

A promise to the results of the HTTP request

query
(
  • key
  • [value]
)
Object chainable

Record query parameters to be rendered in the final URI

Parameters:

  • key String | Object

    The name of the query parameter or an object containing query parameters as key,val pairs repectively

  • [value] String | Array optional

    If the supplied key is a String, then value can be of type Array or String

Returns:

Object:

Returns the ApiRequest instance itself if the arguments are in the required form else throw an Error

setArchiver
(
  • key
  • value
  • [callback]
)
Promise async

Set the value of a list archiver

Parameters:

  • key String

    Name of the list archiver

  • value Boolean

    The state of the archiver to be set

  • [callback] Function optional

    The callback function to be invoked with the results

    • err Error | Object

      Any errors encountered during the request

    • result Object

      The ListArchivers object itself

Returns:

Promise:

Promise to the ListArchivers object itself

toString () String

String representation of the ListArchivers instance

Returns:

String:

String representation of the ListArchivers instance

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index