griddo-sdk 1.0.3 → 1.0.6

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 ADDED
@@ -0,0 +1,15 @@
1
+ **GRIDDO SDK**
2
+
3
+ Javascript class SDK for making easy automated tasks with Griddo.
4
+
5
+ **ADD TO YOUR PROJECT**
6
+
7
+ npm i griddo-sdk
8
+
9
+ **USE IT!**
10
+
11
+ Documentation: https://www.notion.so/thesaurus/Griddo-SDK-c3263026c5fa4721a153ec3e7a05a6e4
12
+
13
+ For sporadic and reusable works, please consider using the SDK through Griddo Debugger (https://github.com/griddo/griddo-debugger).
14
+
15
+ Nothing more to say :P
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
 
@@ -1,4 +1,4 @@
1
- const api = require('../api');
1
+ const { api } = require('../api');
2
2
 
3
3
  const getLanguages = env => api(env, 'get', '/languages')
4
4
  .then(data => data.items);
@@ -1,4 +1,4 @@
1
- const api = require('../api');
1
+ const { api } = require('../api');
2
2
 
3
3
  const getStatus = env => api(env, 'get', '/live-status');
4
4
 
package/models/pages.js CHANGED
@@ -1,4 +1,4 @@
1
- const api = require('../api');
1
+ const { api } = require('../api');
2
2
 
3
3
  const getPages = (env, template = null) => api(env, 'get', `/pages/all/id/${template ? `?template=${template}` : ''}`);
4
4
 
@@ -1,4 +1,4 @@
1
- const api = require('../api');
1
+ const { api } = require('../api');
2
2
 
3
3
  const getStructuredData = async (env, id, site = null, language = null) => {
4
4
  const headers = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "griddo-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {