mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
docs(): updated docs
This commit is contained in:
parent
ea049ff82f
commit
5162411b38
@ -20,7 +20,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* 'addCancelButtonWithLabel': 'Cancel',
|
||||
* 'addDestructiveButtonWithLabel' : 'Delete'
|
||||
* }).then((buttonIndex: number) => {
|
||||
* console.log('Button pressed: ' + buttonLabels[buttonIndex - 1]);
|
||||
* console.log('Button pressed: ' + buttonIndex);
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
|
@ -14,11 +14,11 @@ declare var window;
|
||||
* ```typescript
|
||||
* import { AppRate } from 'ionic-native';
|
||||
*
|
||||
* AppRate.preferences.storeAppURL = {
|
||||
* ios: '<my_app_id>',
|
||||
* android: 'market://details?id=<package_name>',
|
||||
* };
|
||||
*
|
||||
* AppRate.preferences.storeAppURL.ios = '<my_app_id>';
|
||||
* AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
|
||||
* AppRate.preferences.storeAppURL.blackberry = 'appworld://content/[App Id]/';
|
||||
* AppRate.preferences.storeAppURL.windows8 = 'ms-windows-store:Review?name=<the Package Family Name of the application>';
|
||||
* AppRate.promptForRating();
|
||||
* ```
|
||||
*
|
||||
|
@ -1,6 +1,9 @@
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export interface CalendarOptions {
|
||||
firstReminderMinutes?: number;
|
||||
secondReminderMinutes?: number;
|
||||
@ -12,11 +15,6 @@ export interface CalendarOptions {
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export interface Calendar {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Calendar
|
||||
* @description
|
||||
@ -24,7 +22,18 @@ export interface Calendar {
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-calendar`. For more info, please see the [Calendar plugin docs](https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin).
|
||||
*
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import {Calendar} from 'ionic-native';
|
||||
*
|
||||
*
|
||||
*
|
||||
* Calendar.createCalendar('MyCalendar').then(
|
||||
* (msg) => { console.log(msg); },
|
||||
* (err) => { console.log(err); }
|
||||
* );
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
@ -87,23 +96,8 @@ export class Calendar {
|
||||
/**
|
||||
* Create a calendar. (iOS only)
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import {Calendar} from 'ionic-native';
|
||||
*
|
||||
*
|
||||
*
|
||||
* Calendar.createCalendar('MyCalendar').then(
|
||||
* (msg) => { console.log(msg); },
|
||||
* (err) => { console.log(err); }
|
||||
* );
|
||||
* ```
|
||||
*
|
||||
* @param {string | Object} nameOrOptions either a string name or a options object.
|
||||
* options:
|
||||
* calendarName: string the name of the calendar
|
||||
* calendarColor: string the hex color of the calendar
|
||||
* @return Returns a Promise
|
||||
* @param {string | Object} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string
|
||||
* @return {Promise} Returns a Promise
|
||||
*/
|
||||
@Cordova()
|
||||
static createCalendar(
|
||||
@ -112,15 +106,6 @@ export class Calendar {
|
||||
|
||||
/**
|
||||
* Delete a calendar. (iOS only)
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* Calendar.deleteCalendar('MyCalendar').then(
|
||||
* (msg) => { console.log(msg); },
|
||||
* (err) => { console.log(err); }
|
||||
* );
|
||||
* ```
|
||||
*
|
||||
* @param {string} name Name of the calendar to delete.
|
||||
* @return Returns a Promise
|
||||
*/
|
||||
@ -158,7 +143,6 @@ export class Calendar {
|
||||
|
||||
/**
|
||||
* Silently create an event.
|
||||
*
|
||||
* @param {string} [title] The event title
|
||||
* @param {string} [location] The event location
|
||||
* @param {string} [notes] The event notes
|
||||
@ -268,7 +252,6 @@ export class Calendar {
|
||||
|
||||
/**
|
||||
* Find an event with additional options.
|
||||
*
|
||||
* @param {string} [title] The event title
|
||||
* @param {string} [location] The event location
|
||||
* @param {string} [notes] The event notes
|
||||
@ -413,7 +396,8 @@ export class Calendar {
|
||||
|
||||
/**
|
||||
* Open the calendar at the specified date.
|
||||
* @return {Date} date
|
||||
* @param {Date} date The date you want to open the calendar on
|
||||
* @return {Promise<any>} Promise returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
static openCalendar(date: Date): Promise<any> { return; }
|
||||
|
@ -47,7 +47,8 @@ export interface CompassOptions {
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { DeviceOrientation } from 'ionic-native';
|
||||
* // CompassHeading is an interface for compass
|
||||
* import { DeviceOrientation, CompassHeading } from 'ionic-native';
|
||||
*
|
||||
*
|
||||
* // Get the device current compass heading
|
||||
|
Loading…
Reference in New Issue
Block a user