# @timfagergren/google-reviews

> 1. Google Maps API * The following line must exist in your root `index.html` file, with a valid `API_KEY` ``` ```

Latest version **0.0.3** (published 2020-12-21) · 0 weekly downloads

## Install

```sh
npm install @timfagergren/google-reviews
pnpm add @timfagergren/google-reviews
yarn add @timfagergren/google-reviews
bun add @timfagergren/google-reviews
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-12-21 |
| First published | 2020-12-21 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 60.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | timfagergren |

## Links

- npm: https://www.npmjs.com/package/@timfagergren/google-reviews
- npm.io page: https://npm.io/package/@timfagergren/google-reviews

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## Recent versions

- 0.0.3 (latest) — 2020-12-21
- 0.0.2 — 2020-12-21

## README

# Prerequisites

1. Google Maps API
* The following line must exist in your root `index.html` file, with a valid `API_KEY`
    ```
    <script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=API_KEY"></script>
    ```

2. Bootstrap
-   We're really only using the `col` class here, if you want to import just that you can; otherwise
    ```
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
    ```





Example

```
<!doctype html>
<html lang="en">
<head>
  ...
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
  <!-- Requires the following APIs: JavaScript API, Geocoding API, and Places API -->
  <script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=API_KEY"></script>
</head>
...
</html>
```

# Installation

1. Install package
    ```
    npm install @timfagergren/google-reviews
    ```

2. Update `app.module.ts`

    a. Add the import

    ```
    import { GoogleReviewsModule } from '@timfagergren/google-reviews'
    ```

    b. Add the module to the `imports` list

    Result should look something similar to this:

    ```
    import { BrowserModule } from '@angular/platform-browser';
    import { NgModule } from '@angular/core';

    import { AppComponent } from './app.component';
    import { GoogleReviewsModule } from '../../projects/google-reviews/src/public-api'

    @NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        GoogleReviewsModule
    ],
    providers: [],
    bootstrap: [AppComponent]
    })
    export class AppModule { }
    ```

# Usage

```
<lib-google-reviews place_id="ChIJN1t_tDeuEmsRUsoyG83frY4" review_count=3></lib-google-reviews>
```

## Parameters
| Option | Description | Type | Default | Required |
| --- | --- | --- | --- | --- |
| `place_id` | Place ID ([find place id](https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder)) | string | - | true |
| `review_count` | Number of reviews to display (between 0 and 5) | integer | 3 | false |

---
_Source: https://npm.io/package/@timfagergren/google-reviews · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
