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.
- package/README.md +7 -1
- 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
|
|
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
|