Global

Methods

index(resource, params) → {Promise}

Makes a GET request to the index path of the given resource

Source:
Parameters:
Name Type Description
resource string

The base path of the request

params object

The parameters to be injected in the path as query

Returns:
Type:
Promise
Example
let api = new RailsRanger
api.index('users', { flag: true })
//=> GET request to '/users?flag=true' path

list(resource, params) → {Promise}

Makes a GET request to the index path of the given resource

Source:
Parameters:
Name Type Description
resource string

The base path of the request

params object

The parameters to be injected in the path as query

Returns:
Type:
Promise
Example
let api = new RailsRanger
api.index('users', { flag: true })
//=> GET request to '/users?flag=true' path