Options
All
  • Public
  • Public/Protected
  • All
Menu

Class locations

The LocationService allows you to get data about Locations.

For example, to list all Locations that the Account has:

// List all Locations
import * as Qminder from 'qminder-api';
Qminder.setKey('API_KEY_GOES_HERE');
const locations = await Qminder.locations.list();
console.log('Locations are', locations);
// => 'Locations are' [ { id: 14152, name: 'Service Center', ... } ]

Hierarchy

  • locations

Index

Constructors

Methods

Constructors

constructor

Methods

Static details

  • Get details about a location.

    Calls the following HTTP API: GET /locations/<ID>

    For example:

    import * as Qminder from 'qminder-api';
    Qminder.setKey('API_KEY_HERE');
    
    const locationDetails = await Qminder.locations.details(1234);
    // locationDetails.id = 1234
    // locationDetails.name = 'Example Location'
    

    Parameters

    Returns Promise<Location>

    A promise that resolves to the location.

Static getDesks

  • Fetch all desks of the location. Desks may have numbered names or customized names.

    Calls the following HTTP API: GET /v1/locations/<ID>/desks

    For example:

    import * as Qminder from 'qminder-api';
    Qminder.setKey('API_KEY_HERE');
    
    const desks = await Qminder.locations.getDesks(11424);
    console.log(desks);
    // [ { "id": 9950, "name": "Desk 1" }, ... ]
    

    Parameters

    Returns Promise<Desk[]>

    a Promise that resolves to the list of desks in this location

Static list

  • List all locations the API key has access to. The API key belongs to a particular account and has access to all locations of the account. This function returns a list of locations that the API key has access to.

    Calls the following HTTP API: GET /locations/

    For example:

    import * as Qminder from 'qminder-api';
    Qminder.setKey('API_KEY_HERE');
    
    const locationList = await Qminder.locations.list();
    

    Returns Promise<Location[]>

    A promise that resolves to an array of locations.

Generated using TypeDoc