docs(): updated docs

This commit is contained in:
mhartington 2016-08-01 14:01:54 -04:00
parent ea049ff82f
commit 5162411b38
No known key found for this signature in database
GPG Key ID: C0CE5F60E890DB47
4 changed files with 25 additions and 40 deletions

View File

@ -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);
* });
* ```
*

View File

@ -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();
* ```
*

View File

@ -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; }

View File

@ -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