Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IProfile

Batch's Profile Module.

Hierarchy

  • IProfile

Index

Methods

Methods

edit

  • Edit profile's attributes.

    Parameters

    • callback: (editor: IProfileDataEditor) => void

      A callback which will be called with an instance of the profile data editor.

      To edit data, pass a function to this method. Batch will call it back with the profile data editor as its only parameter. Once your callback ends, Batch will persist the changes.

      If your edits result in your attributes going over limit, an error will be logged and all of the changes described in the transaction will be rolled back, as if nothing happened. See https://doc.batch.com/web/custom-data/custom-attributes for more info about the limits.

      Escaping the editor instance is not supported: calling any method on it once your callback has ended will throw an exception.

      See ProfileDataEditor's documentation for the methods available on the user data editor.

      Return a promise that resolve the IProfile instance.

    Returns Promise<IProfile>

identify

  • identify(identifier: undefined | null | { customId?: string }): Promise<IProfile>
  • Identify the current user.

    Attach the current installation to a Profile.

    Parameters

    • identifier: undefined | null | { customId?: string }

      An object containing the customId.

      Return a promise that resolve the IProfile instance.

      See https://doc.batch.com/web/custom-data/customid for more info.

    Returns Promise<IProfile>

Generated using TypeDoc