mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-23 22:18:20 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04ba4a1bb3 | ||
|
|
851d6e7a79 | ||
|
|
3439f60465 |
@@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
|
|
||||||
## Usage
|
## 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 =>
|
const makeAuthorizationSign = body =>
|
||||||
crypto
|
crypto
|
||||||
.createHmac('sha256', '6Nz4n0xA8s8qdxQf2GqurZj2Fs55FUvM')
|
.createHmac('sha256', '4G91qSoboqYO4Y0XJ0LPPKIsq8reHdfa')
|
||||||
.update(JSON.stringify(body))
|
.update(JSON.stringify(body))
|
||||||
.digest('base64');
|
.digest('base64');
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const credentialsPayload = ({ email, password }) => ({
|
|||||||
version: 6,
|
version: 6,
|
||||||
ts: `${Math.round(new Date().getTime() / 1000)}`,
|
ts: `${Math.round(new Date().getTime() / 1000)}`,
|
||||||
nonce: `${nonce()}`,
|
nonce: `${nonce()}`,
|
||||||
appid: 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq',
|
appid: 'YzfeftUVcZ6twZw1OoVKPRFYTrGEg01Q',
|
||||||
imei: makeFakeIMEI(),
|
imei: makeFakeIMEI(),
|
||||||
os: 'iOS',
|
os: 'iOS',
|
||||||
model: 'iPhone10,6',
|
model: 'iPhone10,6',
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const getDevicesMixin = {
|
|||||||
getTags: 1,
|
getTags: 1,
|
||||||
version: 6,
|
version: 6,
|
||||||
ts,
|
ts,
|
||||||
appid: 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq',
|
appid: 'YzfeftUVcZ6twZw1OoVKPRFYTrGEg01Q',
|
||||||
imei: makeFakeIMEI(),
|
imei: makeFakeIMEI(),
|
||||||
os: 'android',
|
os: 'android',
|
||||||
model: '',
|
model: '',
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ewelink-api",
|
"name": "ewelink-api",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ewelink-api",
|
"name": "ewelink-api",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "eWeLink API for Node.js",
|
"description": "eWeLink API for Node.js",
|
||||||
"author": "Martín M.",
|
"author": "Martín M.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
Reference in New Issue
Block a user