https://github.com/aeharding/capacitor-tips
Add tips to your capacitor app via in-app purchases
https://github.com/aeharding/capacitor-tips
Last synced: over 1 year ago
JSON representation
Add tips to your capacitor app via in-app purchases
- Host: GitHub
- URL: https://github.com/aeharding/capacitor-tips
- Owner: aeharding
- Created: 2023-11-22T02:24:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-26T01:51:55.000Z (over 1 year ago)
- Last Synced: 2025-03-20T04:40:36.804Z (over 1 year ago)
- Language: Java
- Size: 231 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# capacitor-tips
Add tips to your capacitor app via in-app purchases
## Install
```bash
npm install capacitor-tips
npx cap sync
```
## API
* [`listProducts(...)`](#listproducts)
* [`purchaseProduct(...)`](#purchaseproduct)
* [Interfaces](#interfaces)
### listProducts(...)
```typescript
listProducts(options: { productIdentifiers: string[]; }) => Promise<{ products: Product[]; }>
```
| Param | Type |
| ------------- | ---------------------------------------------- |
| **`options`** | { productIdentifiers: string[]; } |
**Returns:** Promise<{ products: Product[]; }>
--------------------
### purchaseProduct(...)
```typescript
purchaseProduct(product: Product) => Promise
```
| Param | Type |
| ------------- | ------------------------------------------- |
| **`product`** | Product |
--------------------
### Interfaces
#### Product
| Prop | Type | Description |
| ----------------- | ------------------- | --------------------------------- |
| **`identifier`** | string | |
| **`priceString`** | string | Locale formatted price ex `$3.99` |
| **`price`** | number | ex. `3.99` |
| **`description`** | string | |
| **`name`** | string | |