Skip to content

Commit

Permalink
docs: update place-fields docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt committed Dec 22, 2021
1 parent 257e1ec commit c4ec1c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
10 changes: 8 additions & 2 deletions docs/rules/place-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

# place-fields

Use the `fields` option to limit the fields returned by the API and costs. Request to the Places API are billed by the fields that are returned. See [data-skus](https://developers.google.com/maps/documentation/places/web-service/usage-and-billing#data-skus) for more details.
> **Note**: This rule is not exhaustive and ignores `Autocomplete.setFields()`.
Use the `fields` option to limit the fields returned by the API and costs. Requests to the Places API are billed by the fields that are returned. See [Places Data SKUs](https://developers.google.com/maps/documentation/places/web-service/usage-and-billing#data-skus) for more details.

More information about fields for specific API calls can be found at the following links:

- [Place Details fields guidance](https://goo.gle/3H0TxxG)
- [Place Autocomplete fields guidance](https://goo.gle/3sp2XyS)

> **Note**: This rule is not exhaustive. For example, it ignores `Autocomplete.setFields()`.
📋 This rule is enabled in `plugin:googlemaps/recommended`.

Expand Down
11 changes: 9 additions & 2 deletions src/rules/place-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ import { createRule, camelCased } from "../utils/rules";

export const messageId = camelCased(__filename);

const description = `Use the \`fields\` option to limit the fields returned by the API and costs. Request to the Places API are billed by the fields that are returned. See [data-skus](https://developers.google.com/maps/documentation/places/web-service/usage-and-billing#data-skus) for more details.
> **Note**: This rule is not exhaustive and ignores \`Autocomplete.setFields()\`.`;
const description = `Use the \`fields\` option to limit the fields returned by the API and costs. Requests to the Places API are billed by the fields that are returned. See [Places Data SKUs](https://developers.google.com/maps/documentation/places/web-service/usage-and-billing#data-skus) for more details.
More information about fields for specific API calls can be found at the following links:
- [Place Details fields guidance](https://goo.gle/3H0TxxG)
- [Place Autocomplete fields guidance](https://goo.gle/3sp2XyS)
> **Note**: This rule is not exhaustive. For example, it ignores \`Autocomplete.setFields()\`.`;

export default createRule({
name: __filename,
meta: {
Expand Down

0 comments on commit c4ec1c5

Please sign in to comment.