mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-21 21:33:11 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04ba4a1bb3 | ||
|
|
851d6e7a79 | ||
|
|
3439f60465 |
@@ -17,4 +17,4 @@
|
||||
|
||||
|
||||
## Usage
|
||||
Check library documentation and examples at https://github.com/skydiver/ewelink-api/docs
|
||||
Check library documentation and examples at https://github.com/skydiver/ewelink-api/tree/master/docs
|
||||
@@ -27,4 +27,4 @@ const ewelink = require('ewelink-api');
|
||||
})();
|
||||
```
|
||||
|
||||
> If you don't know your region, use [getRegion](/docs/available-methods/getregion) method
|
||||
> If you don't know your region, use [getRegion](/docs/available-methods/getregion.md) method
|
||||
@@ -13,7 +13,7 @@ const makeFakeIMEI = () => {
|
||||
|
||||
const makeAuthorizationSign = body =>
|
||||
crypto
|
||||
.createHmac('sha256', '6Nz4n0xA8s8qdxQf2GqurZj2Fs55FUvM')
|
||||
.createHmac('sha256', '4G91qSoboqYO4Y0XJ0LPPKIsq8reHdfa')
|
||||
.update(JSON.stringify(body))
|
||||
.digest('base64');
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ const credentialsPayload = ({ email, password }) => ({
|
||||
version: 6,
|
||||
ts: `${Math.round(new Date().getTime() / 1000)}`,
|
||||
nonce: `${nonce()}`,
|
||||
appid: 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq',
|
||||
appid: 'YzfeftUVcZ6twZw1OoVKPRFYTrGEg01Q',
|
||||
imei: makeFakeIMEI(),
|
||||
os: 'iOS',
|
||||
model: 'iPhone10,6',
|
||||
|
||||
@@ -18,7 +18,7 @@ const getDevicesMixin = {
|
||||
getTags: 1,
|
||||
version: 6,
|
||||
ts,
|
||||
appid: 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq',
|
||||
appid: 'YzfeftUVcZ6twZw1OoVKPRFYTrGEg01Q',
|
||||
imei: makeFakeIMEI(),
|
||||
os: 'android',
|
||||
model: '',
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ewelink-api",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ewelink-api",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "eWeLink API for Node.js",
|
||||
"author": "Martín M.",
|
||||
"license": "MIT",
|
||||
|
||||
Reference in New Issue
Block a user