mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
add GooglePlus plugin, closes #183
This commit is contained in:
parent
fea980f1d9
commit
d57a2dc29b
@ -38,6 +38,7 @@ import {Transfer} from './plugins/filetransfer';
|
||||
import {Flashlight} from './plugins/flashlight';
|
||||
import {Geolocation} from './plugins/geolocation';
|
||||
import {Globalization} from './plugins/globalization';
|
||||
import {GooglePlus} from './plugins/google-plus';
|
||||
import {GoogleMap} from './plugins/googlemaps';
|
||||
import {GoogleAnalytics} from './plugins/googleanalytics';
|
||||
import {Hotspot} from './plugins/hotspot';
|
||||
@ -97,6 +98,7 @@ export {
|
||||
Flashlight,
|
||||
Geolocation,
|
||||
Globalization,
|
||||
GooglePlus,
|
||||
GoogleAnalytics,
|
||||
Hotspot,
|
||||
ImagePicker,
|
||||
@ -159,6 +161,7 @@ window['IonicNative'] = {
|
||||
Flashlight: Flashlight,
|
||||
Geolocation: Geolocation,
|
||||
Globalization: Globalization,
|
||||
GooglePlus: GooglePlus,
|
||||
GoogleMap : GoogleMap,
|
||||
GoogleAnalytics: GoogleAnalytics,
|
||||
Hotspot: Hotspot,
|
||||
|
46
src/plugins/google-plus.ts
Normal file
46
src/plugins/google-plus.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name Google Plus
|
||||
* @description
|
||||
* @usage
|
||||
* ```
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-googleplus',
|
||||
pluginRef: 'window.plugins.googleplus',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-googleplus',
|
||||
platforms: ['Web','Android','iOS'],
|
||||
install: 'ionic plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid'
|
||||
})
|
||||
export class GooglePlus {
|
||||
|
||||
/**
|
||||
* The login function walks the user through the Google Auth process.
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static login(options?: any): Promise<any> {return; }
|
||||
|
||||
/**
|
||||
* You can call trySilentLogin to check if they're already signed in to the app and sign them in silently if they are.
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static trySilentLogin(options?: any): Promise<any> {return; }
|
||||
|
||||
/**
|
||||
* This will clear the OAuth2 token.
|
||||
*/
|
||||
@Cordova()
|
||||
static logout(): Promise<any> {return; }
|
||||
|
||||
/**
|
||||
* This will clear the OAuth2 token, forget which account was used to login, and disconnect that account from the app. This will require the user to allow the app access again next time they sign in. Be aware that this effect is not always instantaneous. It can take time to completely disconnect.
|
||||
*/
|
||||
@Cordova()
|
||||
static disconnect(): Promise<any> {return; }
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user