UNPKG

cordova-plugin-market

Version:

Cordova Plugin for access to Google Play and Apple Store within your app

22 lines (17 loc) 638 B
/** * Cordova Market plugin * Author: Miguel Revetria <miguel@xmartlabs.com> * License: Apache 2.0 */ var exec = require('cordova/exec'); function Market() { } Market.prototype.open = function(appId, callbackContext) { callbackContext = callbackContext || { }; exec(callbackContext.success || null, callbackContext.error || null, 'Market', 'open', [appId]); }; Market.prototype.search = function(key, callbackContext) { callbackContext = callbackContext || { }; exec(callbackContext.success || null, callbackContext.error || null, 'Market', 'search', [key]); }; var market = new Market(); module.exports = market;