Skip to content

Commit

Permalink
Merge pull request #32 from Holo-Host/develop
Browse files Browse the repository at this point in the history
0.4.0
  • Loading branch information
zo-el authored Mar 3, 2021
2 parents bcbe2af + 09b7aea commit d5dd039
Show file tree
Hide file tree
Showing 5 changed files with 1,389 additions and 1,038 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0] - 2021-03-02
### Added
- added signals.
- added branding field to configuring the branding shown on the log in/sign-up screen

## [0.3.1] - 2021-02-04
### Fixed
- Bump COMB version.
Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,25 @@ const { Connection } = require('@holo-host/web-sdk');
const envoy = new Connection();
```

### `new Connection( url, signalCb ) -> Connection`
Returns a connection object. `url` is the url of [chaperone](https://github.com/Holo-Host/chaperone), and is used to specify a development chaperone server. Normally should just be null. `signalCb` is a callback that is called whenever the conductor sends a signal to your app. The callback is passed a single argument, the signal object.
### `new Connection( url, signalCb, branding ) -> Connection`
Returns a connection object.
- `url` is the url of [chaperone](https://github.com/Holo-Host/chaperone), and is used to specify a development chaperone server. Normally should just be `null`.
- `signalCb` is a callback that is called whenever the conductor sends a signal to your app. The callback is passed a single argument, the signal object.
- `branding` is an object with the following fields each used for configuring the branding shown on the log in/sign-up screen:
- `app_name` (required)
- `logo_url` (optional)
- `info_link` (optional) shows an info button with the specified link next to the Joining Code field
- `publisher_name` (optional) displays "published by X" underneath the log in/sign-up page header

```javascript
const envoy = new Connection(null, signal => console.log('Got signal', signal))
const envoy = new Connection(
null,
signal => console.log('Got signal', signal),
{
logo_url: 'my-logo.png',
app_name: 'My App'
}
)
```

### `.ready( ) -> Promise<null>`
Expand Down
Loading

0 comments on commit d5dd039

Please sign in to comment.