feat(market): add Market plugin support (#490)

This commit is contained in:
Ibrahim Hadeed
2016-08-27 02:02:30 -04:00
committed by GitHub
parent cd82a5393e
commit 9bcc4ed80f
2 changed files with 32 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import {Plugin, Cordova} from './plugin';
/**
* @name Market
* @description
* Opens an app's page in the market place (Google Play, App Store)
*
* @usage
* ```
* import {Market} from 'ionic-native';
*
* Market.open('your.package.name');
*
* ```
*/
@Plugin({
plugin: '',
pluginRef: 'plugins.market',
repo: 'https://github.com/xmartlabs/cordova-plugin-market'
})
export class Market {
/**
* Opens an app in Google Play / App Store
* @param appId {string} Package name
* @param callbacks {Object} Optional callbacks
*/
@Cordova({sync: true})
static open(appId: string, callbacks?: {success?: Function, failure?: Function}): void { }
}