-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting an API-key when provided only username and password #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just some minor comments! 👍
package.json
Outdated
@@ -1,7 +1,7 @@ | |||
{ | |||
"displayName": "GlueHome Homebridge Plugin", | |||
"name": "@gluehome/homebridge-gluehome", | |||
"version": "0.1.3", | |||
"version": "0.1.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be "0.2.0"
src/api/client.ts
Outdated
@@ -1,6 +1,19 @@ | |||
import axios, { AxiosInstance } from "axios" | |||
import { Lock, LockOperation, CreateLockOperation } from "./" | |||
|
|||
|
|||
export async function issueApiKey(username: string, password: string): Promise<string> { | |||
let response = await axios.post("https://user-api.gluehome.com/v1/api-keys", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the api Url as constant?
const API_URL = 'https://user-api.gluehome.com';
let response = await axios.post(`{API_URL}/v1/api-keys`...
c16d234
to
61adfb5
Compare
Add BasicAuth scheme alternative through configuration. Graceful handling of 503 (lock busy) errors. Increase polling frequency during a lock operation.
8683352
to
e85702e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
No description provided.