mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
docs: updated docs to have consistent format
This commit is contained in:
parent
01b342f7ed
commit
350a5b0911
13
scripts/docs/templates/common.template.html
vendored
13
scripts/docs/templates/common.template.html
vendored
@ -114,12 +114,7 @@ Improve this doc
|
||||
|
||||
<@ endblock @>
|
||||
|
||||
|
||||
<!-- description -->
|
||||
<@ block description @>
|
||||
<$ doc.description | marked $>
|
||||
<@ endblock @>
|
||||
|
||||
<!-- decorators -->
|
||||
<@- if doc.decorators @>
|
||||
<@ for prop in doc.decorators[0].argumentInfo @>
|
||||
<pre>
|
||||
@ -135,6 +130,12 @@ Repo: <$ prop.repo $>
|
||||
<@ endfor @>
|
||||
<@ endif -@>
|
||||
|
||||
<!-- description -->
|
||||
<@ block description @>
|
||||
<$ doc.description | marked $>
|
||||
<@ endblock @>
|
||||
|
||||
|
||||
<@- if doc.directiveInfo @>
|
||||
<h2><$ doc.directiveInfo.type $></h2>
|
||||
<h3><$ doc.directiveInfo.properties[0].name $>: <code><$ doc.directiveInfo.properties[0].values $></code></h3>
|
||||
|
@ -1,13 +1,15 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name ActionSheet
|
||||
* @description
|
||||
* The ActionSheet plugin shows a native list of options the user can choose from.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ```
|
||||
* ```ts
|
||||
* import {ActionSheet} from 'ionic-native';
|
||||
*
|
||||
* let buttonLabels = ['Share via Facebook', 'Share via Twitter'];
|
||||
@ -33,14 +35,14 @@ export class ActionSheet {
|
||||
/**
|
||||
* Show the ActionSheet.
|
||||
* @param {options} options
|
||||
* `buttonLabels`: string[]
|
||||
* `title`: string
|
||||
* `androidTheme` (Android only): number 1-5
|
||||
* `androidEnableCancelButton` (Android only): boolean, default false
|
||||
* `winphoneEnableCancelButton` (WP only): boolean, default false
|
||||
* `addCancelButtonWithLabel`: string
|
||||
* `addDestructiveButtonWithLabel`: string
|
||||
* `position`: [x, y] (iPad pass in [x, y] coords of popover)
|
||||
* `buttonLabels`: string[]
|
||||
* `title`: string
|
||||
* `androidTheme` (Android only): number 1-5
|
||||
* `androidEnableCancelButton` (Android only): boolean, default false
|
||||
* `winphoneEnableCancelButton` (WP only): boolean, default false
|
||||
* `addCancelButtonWithLabel`: string
|
||||
* `addDestructiveButtonWithLabel`: string
|
||||
* `position`: [x, y] (iPad pass in [x, y] coords of popover)
|
||||
* @returns {Promise} Returns a Promise that resolves with the index of the
|
||||
* button pressed (1 based, so 1, 2, 3, etc.)
|
||||
*/
|
||||
|
@ -1,6 +1,8 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name BarcodeScanner
|
||||
* @description
|
||||
* The Barcode Scanner Plugin opens a camera view and automatically scans a barcode, returning the data back to you.
|
||||
*
|
||||
* Requires Cordova plugin: `phonegap-plugin-barcodescanner`. For more info, please see the [BarcodeScanner plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
||||
@ -17,7 +19,8 @@ import {Plugin, Cordova} from './plugin';
|
||||
@Plugin({
|
||||
name: 'BarcodeScanner',
|
||||
plugin: 'phonegap-plugin-barcodescanner',
|
||||
pluginRef: 'cordova.plugins.barcodeScanner'
|
||||
pluginRef: 'cordova.plugins.barcodeScanner',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-barcodescanner'
|
||||
})
|
||||
export class BarcodeScanner {
|
||||
|
||||
|
@ -2,6 +2,8 @@ import {Plugin, Cordova} from './plugin';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name BLE
|
||||
* @description
|
||||
* This plugin enables communication between a phone and Bluetooth Low Energy (BLE) peripherals.
|
||||
*
|
||||
* The plugin provides a simple JavaScript API for iOS and Android.
|
||||
@ -16,10 +18,13 @@ import {Observable} from 'rxjs/Observable';
|
||||
*
|
||||
* Simultaneous connections to multiple peripherals are supported.
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ## Peripheral Data
|
||||
*
|
||||
* Peripheral Data is passed to the success callback when scanning and connecting. Limited data is passed when scanning.
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* {
|
||||
* "name": "Battery Demo",
|
||||
* "id": "20:FF:D0:FF:D1:C0",
|
||||
@ -28,7 +33,8 @@ import {Observable} from 'rxjs/Observable';
|
||||
* }
|
||||
* ```
|
||||
* After connecting, the peripheral object also includes service, characteristic and descriptor information.
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* {
|
||||
* "name": "Battery Demo",
|
||||
* "id": "20:FF:D0:FF:D1:C0",
|
||||
@ -86,7 +92,8 @@ import {Observable} from 'rxjs/Observable';
|
||||
* The advertising information for both Android and iOS appears to be a combination of advertising data and scan response data.
|
||||
*
|
||||
* ### Android
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* {
|
||||
* "name": "demo",
|
||||
* "id": "00:1A:7D:DA:71:13",
|
||||
@ -100,7 +107,8 @@ import {Observable} from 'rxjs/Observable';
|
||||
* ### iOS
|
||||
*
|
||||
* Note that iOS uses the string value of the constants for the [Advertisement Data Retrieval Keys](https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBCentralManagerDelegate_Protocol/index.html#//apple_ref/doc/constant_group/Advertisement_Data_Retrieval_Keys). This will likely change in the future.
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* {
|
||||
* "name": "demo",
|
||||
* "id": "D8479A4F-7517-BCD3-91B5-3302B2F81802",
|
||||
@ -128,7 +136,8 @@ import {Observable} from 'rxjs/Observable';
|
||||
* This plugin uses typed Arrays or ArrayBuffers for sending and receiving data.
|
||||
*
|
||||
* This means that you need convert your data to ArrayBuffers before sending and from ArrayBuffers when receiving.
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* // ASCII only
|
||||
* function stringToBytes(string) {
|
||||
* var array = new Uint8Array(string.length);
|
||||
@ -154,7 +163,7 @@ import {Observable} from 'rxjs/Observable';
|
||||
name: 'BLE',
|
||||
plugin: 'cordova-plugin-ble-central',
|
||||
pluginRef: 'ble',
|
||||
pluginRepo: 'https://github.com/don/cordova-plugin-ble-central'
|
||||
repo: 'https://github.com/don/cordova-plugin-ble-central'
|
||||
})
|
||||
export class BLE {
|
||||
/**
|
||||
@ -369,7 +378,7 @@ export class BLE {
|
||||
* console.log(String.fromCharCode.apply(null, new Uint8Array(buffer));
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @param {string} device_id UUID or MAC address of the peripheral
|
||||
* @param {string} service_uuid UUID of the BLE service
|
||||
* @param {string} characteristic_uuid UUID of the BLE characteristic
|
||||
|
@ -17,6 +17,8 @@ export interface Calendar {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Calendar
|
||||
* @description
|
||||
* This plugin allows you to add events to the Calendar of the mobile device.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-calendar`. For more info, please see the [Calendar plugin docs](https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin).
|
||||
@ -25,7 +27,8 @@ export interface Calendar {
|
||||
@Plugin({
|
||||
name: 'Calendar',
|
||||
plugin: 'cordova-plugin-calendar',
|
||||
pluginRef: 'plugins.calendar'
|
||||
pluginRef: 'plugins.calendar',
|
||||
repo: 'https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin'
|
||||
})
|
||||
export class Calendar {
|
||||
/**
|
||||
|
@ -85,6 +85,8 @@ export interface CameraPopoverOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Camera
|
||||
* @description
|
||||
* Take a photo or capture video.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-camera`. For more info, please see the [Cordova Camera Plugin Docs](https://github.com/apache/cordova-plugin-camera).
|
||||
@ -102,7 +104,8 @@ export interface CameraPopoverOptions {
|
||||
@Plugin({
|
||||
name: 'Camera',
|
||||
plugin: 'cordova-plugin-camera',
|
||||
pluginRef: 'navigator.camera'
|
||||
pluginRef: 'navigator.camera',
|
||||
repo: 'https://github.com/apache/cordova-plugin-camera'
|
||||
})
|
||||
export class Camera {
|
||||
/**
|
||||
|
@ -188,6 +188,8 @@ declare var Contact: {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Contacts
|
||||
* @description
|
||||
* Access and manage Contacts on the device.
|
||||
*
|
||||
* Requires plugin: `cordova-plugin-contacts`
|
||||
|
@ -27,6 +27,8 @@ export interface Device {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Device
|
||||
* @description
|
||||
* Access information about the underlying device and platform.
|
||||
*
|
||||
* @usage
|
||||
@ -37,7 +39,8 @@ export interface Device {
|
||||
@Plugin({
|
||||
name: 'Device',
|
||||
plugin: 'cordova-plugin-device',
|
||||
pluginRef: 'device'
|
||||
pluginRef: 'device',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device'
|
||||
})
|
||||
export class Device {
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name Facebook
|
||||
* @description
|
||||
* Use the Facebook Connect plugin to obtain access to the native FB application on iOS and Android.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-facebook4`. For more info, please see the [Facebook Connect](https://github.com/jeduan/cordova-plugin-facebook4).
|
||||
@ -70,7 +72,8 @@ import {Plugin, Cordova} from './plugin';
|
||||
@Plugin({
|
||||
name: 'Facebook',
|
||||
plugin: 'cordova-plugin-facebook4',
|
||||
pluginRef: 'facebookConnectPlugin'
|
||||
pluginRef: 'facebookConnectPlugin',
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-facebook4'
|
||||
})
|
||||
export class Facebook {
|
||||
|
||||
@ -82,7 +85,7 @@ export class Facebook {
|
||||
/**
|
||||
* Login to Facebook to authenticate this app.
|
||||
*
|
||||
* ```
|
||||
* ```ts
|
||||
* {
|
||||
* status: "connected",
|
||||
* authResponse: {
|
||||
|
@ -93,10 +93,15 @@ export interface GeolocationOptions {
|
||||
|
||||
|
||||
/**
|
||||
* Get geolocation data.
|
||||
* @name Geolocation
|
||||
* @description
|
||||
* This plugin provides information about the device's location, such as latitude and longitude. Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs.
|
||||
*
|
||||
* This API is based on the W3C Geolocation API Specification, and only executes on devices that don't already provide an implementation.
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
*
|
||||
* ```ts
|
||||
* Geolocation.getCurrentPosition().then((resp) => {
|
||||
* //resp.coords.latitude
|
||||
* //resp.coords.longitude
|
||||
@ -135,7 +140,7 @@ export class Geolocation {
|
||||
* Watch the current device's position. Clear the watch by unsubscribing from
|
||||
* Observable changes.
|
||||
*
|
||||
* ```
|
||||
* ```ts
|
||||
* var subscription = Geolocation.watchPosition().subscribe(position => {
|
||||
* console.log(position.coords.longitude + ' ' + position.coords.latitude);
|
||||
* });
|
||||
|
@ -246,6 +246,8 @@ declare var PushNotification: {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Push
|
||||
* @description
|
||||
* Register and receive push notifications.
|
||||
*
|
||||
* Requires Cordova plugin: `phonegap-plugin-push`. For more info, please see the [Push plugin docs](https://github.com/phonegap/phonegap-plugin-push).
|
||||
@ -256,7 +258,8 @@ declare var PushNotification: {
|
||||
@Plugin({
|
||||
name: 'Push',
|
||||
plugin: 'phonegap-plugin-push',
|
||||
pluginRef: 'PushNotification'
|
||||
pluginRef: 'PushNotification',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-push'
|
||||
})
|
||||
export class Push {
|
||||
|
||||
|
@ -3,6 +3,7 @@ import {Plugin, Cordova, RequiresPlugin} from './plugin';
|
||||
declare var window;
|
||||
|
||||
/**
|
||||
*
|
||||
* Manage the appearance of the native status bar.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-statusbar`. For more info, please see the [StatusBar plugin docs](https://github.com/apache/cordova-plugin-statusbar).
|
||||
@ -10,7 +11,8 @@ declare var window;
|
||||
@Plugin({
|
||||
name: 'StatusBar',
|
||||
plugin: 'cordova-plugin-statusbar',
|
||||
pluginRef: 'StatusBar'
|
||||
pluginRef: 'StatusBar',
|
||||
repo: 'https://github.com/apache/cordova-plugin-statusbar'
|
||||
})
|
||||
export class StatusBar {
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name TouchID
|
||||
* @description
|
||||
* Scan the fingerprint of a user with the TouchID sensor.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-touch-id`. For more info, please see the [TouchID plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-touch-id).
|
||||
@ -11,13 +13,13 @@ import {Plugin, Cordova} from './plugin';
|
||||
*
|
||||
* Here is a list of some of the error codes:
|
||||
*
|
||||
* `-1` - Fingerprint scan failed more than 3 times
|
||||
* `-2` or `-128` - User tapped the 'Cancel' button
|
||||
* `-3` - User tapped the 'Enter Passcode' or 'Enter Password' button
|
||||
* `-4` - The scan was cancelled by the system (Home button for example)
|
||||
* `-6` - TouchID is not Available
|
||||
* `-8` - TouchID is locked out from too many tries
|
||||
*
|
||||
* - `-1` - Fingerprint scan failed more than 3 times
|
||||
* - `-2` or `-128` - User tapped the 'Cancel' button
|
||||
* - `-3` - User tapped the 'Enter Passcode' or 'Enter Password' button
|
||||
* - `-4` - The scan was cancelled by the system (Home button for example)
|
||||
* - `-6` - TouchID is not Available
|
||||
* - `-8` - TouchID is locked out from too many tries
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'TouchID',
|
||||
|
Loading…
Reference in New Issue
Block a user