-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checked and updated geopoints cookbook #310
Conversation
Codecov Report
@@ Coverage Diff @@
## master #310 +/- ##
==========================================
+ Coverage 38.49% 39.42% +0.92%
==========================================
Files 99 87 -12
Lines 4159 2765 -1394
Branches 10 10
==========================================
- Hits 1601 1090 -511
+ Misses 2557 1674 -883
Partials 1 1 |
name: geolocation | ||
description: Intereact with geolocation data object | ||
runtime: nodejs_v8 | ||
keywords: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keywords should go to package.json
@@ -21,41 +21,49 @@ In order to be able to use the GeoPoints functionality, you'll need a Data Class | |||
To save the data, create a `save-location` endpoint. It will serve as a gateway for writing the coordinates to your `geolocation` class. | |||
|
|||
```YAML | |||
name: geolocation | |||
description: Intereact with geolocation data object | |||
runtime: nodejs_v8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime is obsolete now. Please remove it.
@@ -21,41 +21,49 @@ In order to be able to use the GeoPoints functionality, you'll need a Data Class | |||
To save the data, create a `save-location` endpoint. It will serve as a gateway for writing the coordinates to your `geolocation` class. | |||
|
|||
```YAML | |||
name: geolocation | |||
description: Intereact with geolocation data object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description only in package.json
classes: | ||
geolocation: | ||
- name: coordinates | ||
type: geopoint | ||
filter_index: true | ||
- name: user | ||
type: reference | ||
target: user | ||
target: user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added there two spaces at the end of the line.
|
||
endpoints: | ||
save-location: | ||
description: User coordinates fetched from the browser | ||
inputs: | ||
properties: | ||
coordinates: | ||
type: geopoint | ||
description: latitude, longitude plus optional distance_in_kilometers or distance_in_miles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We keep description starting with capital letter.
{ | ||
"message": Something went wrong!" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces..
}) | ||
|
||
return response.json({ message: 'location saved' }, status) | ||
return response.json(createdGeoPoint, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
200 is default, no need to add it to response.
exit_code: 200 | ||
description: returns a list of Data Objects matching the provided range | ||
fail: | ||
exit_code: 404 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, you have spaces here.
Went through the cookbook and checked for errors, user should be able to re-product the cookbook outcome