mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(market): add search method, return promises
This commit is contained in:
parent
009a20608e
commit
d62779a2a6
@ -19,12 +19,30 @@ import { Plugin, Cordova } from './plugin';
|
||||
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 in the format {success?: Function, failure?: Function}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static open(appId: string, callbacks?: {success?: Function, failure?: Function}): void { }
|
||||
@Cordova({
|
||||
callbackStyle: 'object',
|
||||
successName: 'success',
|
||||
errorName: 'failure'
|
||||
})
|
||||
static open(appId: string): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Search apps by keyword
|
||||
* @param keyword {string} Keyword
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackStyle: 'object',
|
||||
successName: 'success',
|
||||
errorName: 'failure',
|
||||
platforms: ['Android']
|
||||
})
|
||||
static search(keyword: string): Promise<any> { return }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user