Skip to content
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

Merged
merged 6 commits into from
Oct 31, 2018

Conversation

ksyhoo
Copy link
Contributor

@ksyhoo ksyhoo commented Oct 30, 2018

Went through the cookbook and checked for errors, user should be able to re-product the cookbook outcome

@ksyhoo ksyhoo self-assigned this Oct 30, 2018
@codecov-io
Copy link

codecov-io commented Oct 30, 2018

Codecov Report

Merging #310 into master will increase coverage by 0.92%.
The diff coverage is n/a.

@@            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:
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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!"
}
}
Copy link
Member

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)
Copy link
Member

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
Copy link
Member

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.

@ksyhoo ksyhoo added the DOCS label Oct 31, 2018
@ksyhoo ksyhoo merged commit 9ff9a2c into master Oct 31, 2018
@ksyhoo ksyhoo deleted the chore/updated_geopoints_cookbook branch October 31, 2018 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants