Interface amplifyRequest

Index

Call signatures

Properties

Methods

Call signatures

(resourceId: string, hash?: any, callback?: Function)

Request a resource. resourceId: Identifier string for the resource. data: A set of key/value pairs of data to be sent to the resource. callback: A function to invoke if the resource is retrieved successfully.

Parameters

  • resourceId: string
  • hash?: any optional
  • callback?: Function optional

(settings: amplifyRequestSettings): any

Request a resource. settings: A set of key/value pairs of settings for the request. resourceId: Identifier string for the resource. data (optional): Data associated with the request. success (optional): Function to invoke on success. error (optional): Function to invoke on error.

Parameters

Returns

any

Properties

public cache: any

public decoders: amplifyDecoders

Methods

public define(resourceId: string, requestType: string, settings?: amplifyAjaxSettings)

Define a resource. resourceId: Identifier string for the resource. requestType: The type of data retrieval method from the server. See the request types sections for more information. settings: A set of key/value pairs that relate to the server communication technology. The following settings are available: Any settings found in jQuery.ajax(). cache: See the cache section for more details. decoder: See the decoder section for more details.

Parameters

public define(resourceId: string, resource: (settings: amplifyRequestSettings) => void)

Define a custom request. resourceId: Identifier string for the resource. resource: Function to handle requests. Receives a hash with the following properties: resourceId: Identifier string for the resource. data: Data provided by the user. success: Callback to invoke on success. error: Callback to invoke on error.

Parameters

  • resourceId: string
  • resource: (settings: amplifyRequestSettings) => void