Files
awesome-cordova-plugins/src/@ionic-native/plugins/launch-review/index.ts
T
Daniel Sogl c6f9fa356f style(): unify docs and spacing (#1448)
* typo(barcode-scanner): fixe circle lint error

* typo(docs):  Unified the documentations

In some plugins the typescript markup was missing.
I also unified the console.log string from console.log("hello") to console.log('Hello') so any plugin page look the same.
2017-04-30 14:36:22 -04:00

43 lines
1.2 KiB
TypeScript

import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Launch Review
* @description
*
* This launches the native store app in order for the user to leave a review.
* On Android, the plugin opens the the app's storepage in the Play Store where the user can leave a review by pressing the stars to give a rating.
* On iOS, the plugin opens the app's storepage in the App Store and focuses the Review tab, where the user can leave a review by pressing "Write a review".
*
* @usage
* ```typescript
* import { LaunchReview } from '@ionic-native/launch-review';
*
* constructor(private launchReview: LaunchReview) { }
*
* ...
*
* const appId: string = 'yourAppId';
* this.launchReview.launch(appId)
* .then(() => console.log('Successfully launched store app');
* ```
*/
@Plugin({
pluginName: 'LaunchReview',
plugin: 'cordova-launch-review',
pluginRef: 'LaunchReview',
repo: 'https://github.com/dpa99c/cordova-launch-review',
platforms: ['Android', 'iOS']
})
@Injectable()
export class LaunchReview extends IonicNativePlugin {
/**
* Launch store app using given app ID
* @returns {Promise<void>}
*/
@Cordova()
launch(appId: string): Promise<void> { return; }
}