griddo-sdk 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/api/index.js +2 -2
- package/models/auth.js +2 -2
- package/models/languages.js +1 -1
- package/models/liveStatus.js +1 -1
- package/models/pages.js +1 -1
- package/models/structuredData.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
**GRIDDO SDK**
|
|
2
|
+
Javascript class SDK for making easy automated tasks with Griddo.
|
|
3
|
+
|
|
4
|
+
**ADD TO YOUR PROJECT**
|
|
5
|
+
npm i griddo-sdk
|
|
6
|
+
|
|
7
|
+
**USE IT!**
|
|
8
|
+
Documentation: https://www.notion.so/thesaurus/Griddo-SDK-c3263026c5fa4721a153ec3e7a05a6e4
|
|
9
|
+
|
|
10
|
+
For sporadic and reusable works, please consider using the SDK through Griddo Debugger (https://github.com/griddo/griddo-debugger).
|
|
11
|
+
|
|
12
|
+
Nothing more to say :P
|
package/api/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const axios = require('axios');
|
|
2
2
|
|
|
3
3
|
const api = (env, method, endpoint, body = null, headers = {}) => {
|
|
4
4
|
const {
|
|
@@ -20,6 +20,6 @@ const api = (env, method, endpoint, body = null, headers = {}) => {
|
|
|
20
20
|
.then(response => response.data);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
module.exports={
|
|
24
24
|
api,
|
|
25
25
|
};
|
package/models/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const api = require('../api');
|
|
1
|
+
const { api } = require('../api');
|
|
2
2
|
|
|
3
3
|
const getToken = async (params) => {
|
|
4
4
|
const {
|
|
@@ -9,7 +9,7 @@ const getToken = async (params) => {
|
|
|
9
9
|
console.log('Logging to api...');
|
|
10
10
|
const token = await api({ api: apiKey }, 'post', '/login_check', { email, password })
|
|
11
11
|
.then(data => data.token);
|
|
12
|
-
console.log('Authenticated.')
|
|
12
|
+
console.log('Authenticated.');
|
|
13
13
|
return token;
|
|
14
14
|
};
|
|
15
15
|
|
package/models/languages.js
CHANGED
package/models/liveStatus.js
CHANGED
package/models/pages.js
CHANGED
package/models/structuredData.js
CHANGED