Module: unified-push-admin-client

Methods


unifiedPushAdminClient(baseUrl, settings)

Creates a new UnifiedPush Admin client
Parameters:
Name Type Description
baseUrl string The baseurl for the AeroGear UnifiedPush server - ex: http://localhost:8080/ag-push,
settings object an object containing the settings
Properties
Name Type Argument Description
username string The username to login to the UnifiedPush server - ex: admin
password string The password to login to the UnifiedPush server - ex: *****
kcUrl string <optional>
The URL to the keycloak server
realmName string <optional>
the realm name the Unified Push Server is under in Keycloak - defaults to aerogear
Returns:
A promise that will resolve with the client object.
Type
Promise
Example
const adminClient = require('unifiedpush-admin-client');
  const settings = {
    baseUrl: 'http://127.0.0.1:8080/ag-push',
    username: 'admin',
    password: 'admin'
  };

  adminClient(settings)
    .then((client) => {
      client.realms()
      ...
      ...
    });