-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Roman Alekseev
committed
Jan 27, 2017
1 parent
e681d09
commit 784a37c
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ This package provides possibility for third party applications to log in with tr | |
|
||
First of all you need to get a client ID. | ||
|
||
If you don't have one, you need create a request to Hotel Manager team or another responsible team in order to get it. | ||
If you don't have one, please send a request to [email protected] | ||
|
||
## How to start | ||
|
||
|
@@ -47,17 +47,17 @@ We have several predefined scopes that you can use at the moment: | |
If you don't pass any scopes, default one will be used (personal_info). | ||
|
||
## API reference | ||
|
||
### trvOauthSdk(clientId, options) | ||
|
||
Method to initialize your application. Returns an object with `authorize` method in it. | ||
Throws an error if `clientId` was not specified or was not a string. | ||
|
||
#### clientId `<string>` *required* | ||
A clientId provided by trivago in order to make possible to log in with trivago. | ||
|
||
#### options `<object>` *optional* | ||
|
||
##### options.scope `string`: | ||
|
||
Oauth scope, default: '' (empty string) | ||
|
@@ -73,7 +73,7 @@ Consider the next example which shows how this library can be used: | |
<script type="text/javascript" src="path/to/trv.sdk.js"></script> | ||
<script type="text/javascript"> | ||
var sdk = trvOauthSdk('your-client-id'); | ||
|
||
var button = document.getElementById('button'); | ||
button.addEventListener('click', onClick); | ||
function onClick() { | ||
|
@@ -85,4 +85,4 @@ Consider the next example which shows how this library can be used: | |
} | ||
</script> | ||
|
||
``` | ||
``` |