UNPKG

2.24 kBJavaScriptView Raw
1"use strict";
2var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6 return c > 3 && r && Object.defineProperty(target, key, r), r;
7};
8var plugin_1 = require('./plugin');
9/**
10 * @name App Rate
11 * @description
12 * The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
13 *
14 * Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the [AppRate plugin docs](https://github.com/pushandplay/cordova-plugin-apprate).
15 *
16 * @usage
17 * ```typescript
18 * import { AppRate } from 'ionic-native';
19 *
20 * AppRate.preferences.storeAppURL = {
21 * ios: '<my_app_id>',
22 * android: 'market://details?id=<package_name>',
23 * windows: 'ms-windows-store://review/?ProductId=<Store_ID>'
24 * };
25 *
26 * AppRate.promptForRating(false);
27 * ```
28 *
29 * @interfaces
30 * AppRatePreferences
31 * AppRateStoreAppUrls
32 * AppRateCallbacks
33 *
34 */
35var AppRate = (function () {
36 function AppRate() {
37 }
38 /**
39 * Prompts the user for rating
40 * @param {boolean} immediately Show the rating prompt immediately.
41 */
42 AppRate.promptForRating = function (immediately) { };
43 ;
44 __decorate([
45 plugin_1.CordovaProperty
46 ], AppRate, "preferences", void 0);
47 __decorate([
48 plugin_1.Cordova()
49 ], AppRate, "promptForRating", null);
50 AppRate = __decorate([
51 plugin_1.Plugin({
52 pluginName: 'AppRate',
53 plugin: 'cordova-plugin-apprate',
54 pluginRef: 'AppRate',
55 repo: 'https://github.com/pushandplay/cordova-plugin-apprate',
56 platforms: ['Android', 'iOS', 'Windows (experimental)']
57 })
58 ], AppRate);
59 return AppRate;
60}());
61exports.AppRate = AppRate;
62//# sourceMappingURL=apprate.js.map
\No newline at end of file