polyapi 0.1.19 → 0.1.20

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.
Files changed (2) hide show
  1. package/README.md +7 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,12 +6,18 @@ Install the package with `npm install polyapi`.
6
6
  Run `npx poly generate` to set up your Poly connection (only for the first time) and generate Poly functions.
7
7
  Whenever you update your Poly functions, run `npx poly generate` again to update your local functions.
8
8
 
9
+ You will need an API Key to to access Poly. Please head to https://polyapi.io to request an API key!
10
+
9
11
  ### Using Poly functions
10
12
  After that you can use your Poly client in your code:
11
13
  ```
12
14
  import poly from 'polyapi';
13
15
 
14
- const response = await poly.myContext.myFunction('param1', 'param2');
16
+ const location = 'Eiffel Tower, Paris';
17
+
18
+ poly.maps.google.getXY(location)
19
+ .then(res => console.log(res))
20
+ .catch(err => console.error(err));
15
21
  ```
16
22
 
17
23
  ### Using error handler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polyapi",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Poly is a CLI tool to help create and manage your Poly definitions.",
5
5
  "license": "MIT",
6
6
  "repository": {