init(username?:string, password?:string): void
- Use this to initialize the client after creating it, It is not required when using the "embed" function (which include the initialization in its sequence).
- Injecting the username and password values can also authenticate the user at the same time.
- Without supplying these details, the login must be called separately unless the authentication cookies has been set and saved otherwise.
The following initializes a new embed client for the target instance of Pyramid and authenticates a new user "john"
var client = pyramidEmbedClient("https://analytics.pyramid.com"); client.init("john","ab123!");