npm package: @koodos/browser-capacitor-plugin
Description: The Browser API provides the ability to open an in-app browser and get data of an online service.
Author: Ionic
Latest version: 1.0.31

# service-capacitor-plugin

The Browser plugin provides the ability to open an in-app browser and subscribe to browser events.

# Prerequisites

## Build plugin
* Pull the plugin beside your capacitor project's root folder
* Install dependencies:
```
npm install
```
* Build plugin:
```
npm run build
```

## Install/build plugin
* In capacitor project's root folder
```
npm install ../service-capacitor-plugin
npm run build
npx cap sync
```
## API

<docgen-index>

* [`open(...)`](#open)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### open(...)

```typescript
open(params: BrowserParams) => Promise<ServiceData | null>
```

Open a page with the specified options.

| Param        | Type                                                    |
| ------------ | ------------------------------------------------------- |
| **`params`** | <code><a href="#browserparams">BrowserParams</a></code> |

**Returns:** <code>Promise&lt;<a href="#servicedata">ServiceData</a> | null&gt;</code>

**Since:** 1.0.0

--------------------


### Interfaces


#### ServiceData

Represents the options passed to `open`.

| Prop                | Type                | Description                        | Since |
| ------------------- | ------------------- | ---------------------------------- | ----- |
| **`email`**         | <code>string</code> | Email of the service user.         | 1.0.0 |
| **`password`**      | <code>string</code> | Password of the service user.      | 1.0.0 |
| **`profileId`**     | <code>string</code> | ProfileId of the service user.     | 1.0.0 |
| **`authUrl`**       | <code>string</code> | authUrl of the service user.       | 1.0.0 |
| **`serviceId`**     | <code>string</code> | serviceId of the service user.     | 1.0.0 |
| **`profileName`**   | <code>string</code> | profileName of the service user.   | 1.0.0 |
| **`profileImg`**    | <code>string</code> | profileImg of the service user.    | 1.0.0 |
| **`profileImgUrl`** | <code>string</code> | profileImgUrl of the service user. | 1.0.0 |
| **`cookies`**       | <code>any</code>    |                                    |       |


#### BrowserParams

Represents the params passed to `open`.

| Prop                      | Type                | Description                                 | Since |
| ------------------------- | ------------------- | ------------------------------------------- | ----- |
| **`firstUrl`**            | <code>string</code> | Email of the service user.                  | 1.0.0 |
| **`browseUrl`**           | <code>string</code> | Password of the service user.               | 1.0.0 |
| **`browseUrl2`**          | <code>string</code> | Password of the service user.               | 1.0.0 |
| **`profileUrl`**          | <code>string</code> | ProfileId of the service user.              | 1.0.0 |
| **`switchProfilePrefix`** | <code>string</code> | authUrl of the service user.                | 1.0.0 |
| **`cookieKey`**           | <code>string</code> | CookieKey to get the serviceId cookie       | 1.0.0 |
| **`loginSelector`**       | <code>string</code> | loginSelector to get login.                 | 1.0.0 |
| **`passwordSelector`**    | <code>string</code> | passwordSelector to get password.           | 1.0.0 |
| **`authURLSelector`**     | <code>string</code> | authURLSelector to get authURL.             | 1.0.0 |
| **`liProfile`**           | <code>string</code> | liProfile to get profiles.                  | 1.0.0 |
| **`profileLink`**         | <code>string</code> | profileLink to get profile-link element.    | 1.0.0 |
| **`dataTkn`**             | <code>string</code> | dataTkn attribute to get profileId.         | 1.0.0 |
| **`profileImage`**        | <code>string</code> | profileImage to get .profile-image element. | 1.0.0 |
| **`profileName`**         | <code>string</code> | profileName to get .profile-name element.   | 1.0.0 |

</docgen-api>