docs(): massive updates

This commit is contained in:
mhartington 2016-07-08 15:19:13 -04:00
parent ba20dbe590
commit 9eb63a0d74
No known key found for this signature in database
GPG Key ID: C0CE5F60E890DB47
10 changed files with 67 additions and 53 deletions

View File

@ -95,7 +95,7 @@ export interface CameraPopoverOptions {
* @usage
* ```js
* import {Camera} from 'ionic-native';
*
*
* Camera.getPicture(options).then((imageData) => {
* // imageData is either a base64 encoded string or a file URI
* // If it's base64:
@ -113,8 +113,8 @@ export interface CameraPopoverOptions {
export class Camera {
/**
* Take a picture or video, or load one from the library.
* @param {CameraOptions} options
* @return Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
* @param {CameraOptions} options Options that you want to pass to the camera. Encoding type, quality, etc.
* @return {Promise} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
@ -132,6 +132,7 @@ export class Camera {
static cleanup() { };
/**
* @private
* @enum {number}
*/
static DestinationType = {
@ -144,6 +145,7 @@ export class Camera {
};
/**
* @private
* @enum {number}
*/
static EncodingType = {
@ -153,6 +155,7 @@ export class Camera {
PNG: 1
};
/**
* @private
* @enum {number}
*/
static MediaType = {
@ -165,6 +168,7 @@ export class Camera {
};
/**
* @private
* @enum {number}
*/
static PictureSourceType = {
@ -177,6 +181,7 @@ export class Camera {
};
/**
* @private
* Matches iOS UIPopoverArrowDirection constants to specify arrow location on popover.
* @enum {number}
*/
@ -189,6 +194,7 @@ export class Camera {
};
/**
* @private
* @enum {number}
*/
static Direction = {

View File

@ -41,7 +41,7 @@ export class CardIO {
/**
* Scan a credit card with card.io.
* @param options
* @param {CardIOOptions} options Options for configuring the plugin
*/
@Cordova()
static scan(options?: CardIOOptions): Promise<any> {return; }
@ -70,4 +70,4 @@ export interface CardIOOptions {
hideCardIOLogo?: boolean;
useCardIOLogo?: boolean;
supressScan?: boolean;
}
}

View File

@ -18,12 +18,12 @@ import {Plugin, Cordova} from './plugin';
*
* Clipboard.paste().then(
* (resolve : string) => {
* alert(resolve);
* },
* alert(resolve);
* },
* (reject : string) => {
* alert("Error: " + reject);
* }
* );
* );
* );
* ```
*/
@ -37,15 +37,15 @@ export class Clipboard {
/**
* Copies the given text
* @param text
* @returns {Promise<T>}
* @param {string} text Text that gets copied on the system clipboard
* @returns {Promise<T>} Returns a promise after the text has been copied
*/
@Cordova()
static copy(text: string): Promise<any> { return; }
/**
* Pastes the text stored in clipboard
* @returns {Promise<T>}
* @returns {Promise<T>} Returns a promise after the text has been pasted
*/
@Cordova()
static paste(): Promise<any> { return; }

View File

@ -265,9 +265,6 @@ export class Contacts {
}
/**
* Search for contacts in the Contacts list.
*
* Example: Contacts.find(['*'], { filter: 'Max' }) // will search for a displayName of 'Max'
*
* @param fields {string[]} Contact fields to be used as a search qualifier.
* A zero-length contactFields parameter is invalid and results in ContactError.INVALID_ARGUMENT_ERROR.
* A contactFields value of "*" searches all contact fields.

View File

@ -77,7 +77,6 @@ export interface DatePickerOptions {
* import {DatePicker} from 'ionic-native';
*
*
*
* DatePicker.show({
* date: new Date(),
* mode: 'date'
@ -97,10 +96,10 @@ export class DatePicker {
/**
* Shows the date and/or time picker dialog(s)
* @param options
* @param {DatePickerOptions} options Options for the date picker.
* @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error.
*/
@Cordova()
static show(options: DatePickerOptions): Promise<Date> { return; }
}
}

View File

@ -83,8 +83,8 @@ export class DeviceOrientation {
* Get the device current heading at a regular interval
*
* Stop the watch by unsubscribing from the observable
* @param options
* @returns {Observable<CompassHeading>}
* @param {CompassOptions} options Options for compass. Frequency and Filter. Optional
* @returns {Observable<CompassHeading>} Returns an observable that contains the compass heading
*/
@Cordova({
callbackOrder: 'reverse',

View File

@ -40,9 +40,9 @@ export class Dialogs {
/**
* Shows a custom alert or dialog box.
* @param message Dialog message. (String)
* @param title Dialog title. (String) (Optional, defaults to Alert)
* @param buttonName Button name. (String) (Optional, defaults to OK)
* @param {string} message Dialog message.
* @param {string} title Dialog title. (Optional, defaults to Alert)
* @param {string} buttonName Button name. (Optional, defaults to OK)
* @returns {Promise<any>} Returns a blank promise once the user has dismissed the alert.
*/
@Cordova({
@ -57,9 +57,9 @@ export class Dialogs {
/**
* Displays a customizable confirmation dialog box.
* @param message Dialog message. (String)
* @param title Dialog title. (String) (Optional, defaults to Confirm)
* @param buttonLabels Array of strings specifying button labels. (Array) (Optional, defaults to [OK,Cancel])
* @param {string} message Dialog message.
* @param {string} title Dialog title. (Optional, defaults to Confirm)
* @param {Array<string>} buttonLabels Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked. Note that the index use one-based indexing.
*/
@Cordova({
@ -74,10 +74,10 @@ export class Dialogs {
/**
* Displays a native dialog box that is more customizable than the browser's prompt function.
* @param message Dialog message. (String)
* @param title Dialog title (String) (Optional, defaults to Prompt)
* @param buttonLabels Array of strings specifying button labels (Array) (Optional, defaults to ["OK","Cancel"])
* @param defaultText Default textbox input value (String) (Optional, Default: empty string)
* @param {string} message Dialog message.
* @param {string} title Dialog title. (Optional, defaults to Prompt)
* @param {Array<string>} buttonLabels Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
* @param {string} defaultText Default textbox input value. (Optional, Default: empty string)
* @returns {Promise<any>} Returns a promise that resolves an object with the button index clicked and the text entered
*/
@Cordova({
@ -94,11 +94,11 @@ export class Dialogs {
/**
* The device plays a beep sound.
* @param times The number of times to repeat the beep. (Number)
* @param {numbers} times The number of times to repeat the beep.
*/
@Cordova({
sync: true
})
static beep(times: number): void {}
}
}

View File

@ -87,8 +87,8 @@ export class Facebook {
/**
* Browser wrapper
* @param appId
* @param version
* @param {number} appId Your Facebook AppID from their dashboard
* @param {string} version The version of API you may want to use. Optional
*/
@Cordova()
static browserInit(appId: number, version?: string): Promise<any> {

View File

@ -34,9 +34,9 @@ export class Globalization {
/**
* Converts date to string
* @param date
* @param options
* @return {Promise<{value: string}>}
* @param {Date} date Date you wish to convert
* @param options Options for the converted date. Length, selector.
* @return {Promise<{value: string}>} Returns a promise when the date has been converted.
*/
@Cordova({
successIndex: 1,
@ -45,9 +45,10 @@ export class Globalization {
static dateToString(date: Date, options: {formatLength: string, selector: string}): Promise<{value: string}> {return; }
/**
*
* @param dateString
* @param options
* Parses a date formatted as a string, according to the client's user preferences and calendar using the time zone of the client, and returns the corresponding date object.
* @param {string} dateString Date as a string to be converted
* @param options Options for the converted date. Length, selector.
* @return {Promise<{value: string}>} Returns a promise when the date has been converted.
*/
@Cordova({
successIndex: 1,
@ -57,8 +58,9 @@ export class Globalization {
/**
*
* @param options
* Returns a pattern string to format and parse dates according to the client's user preferences.
* @param options Object with the format length and selector
* @return {Promise<{value: string}>} Returns a promise.
*/
@Cordova({
callbackOrder: 'reverse'
@ -67,8 +69,9 @@ export class Globalization {
/**
*
* @param options
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
* @param options Object with type (narrow or wide) and item (month or days).
* @return {Promise<{value: string}>} Returns a promise.
*/
@Cordova({
callbackOrder: 'reverse'
@ -76,20 +79,22 @@ export class Globalization {
static getDateNames(options: {type: string, item: string}): Promise<{value: Array<string>}> {return; }
/**
* Check if day light saving is active
* @param date
* Indicates whether daylight savings time is in effect for a given date using the client's time zone and calendar.
* @param {data} date Date to process
* @returns {Promise<dst>} reutrns a promise with the value
*/
@Cordova()
static isDayLightSavingsTime(date: Date): Promise<{dst: string}> {return; }
/**
* Get first day of week
* Returns the first day of the week according to the client's user preferences and calendar.
* @returns {Promise<value>} reutrns a promise with the value
*/
@Cordova()
static getFirstDayOfWeek(): Promise<{value: string}> {return; }
/**
*
* Returns a number formatted as a string according to the client's user preferences.
* @param options
*/
@Cordova({
@ -100,8 +105,9 @@ export class Globalization {
/**
*
* @param stringToConvert
* @param options
* @param {string} stringToConvert String you want to conver to a number
* @param options The type of number you want to return. Can be decimal, percent, or currency.
* @returns {Promise} Returns a promise with the value.
*/
@Cordova({
successIndex: 1,
@ -110,8 +116,9 @@ export class Globalization {
static stringToNumber(stringToConvert: string, options: {type: string}): Promise<{value: number|string}> {return; }
/**
*
* @param options
* Returns a pattern string to format and parse numbers according to the client's user preferences.
* @param options Can be decimal, percent, or currency.
* @returns {Promise} returns a promise with the value.
*/
@Cordova({
callbackOrder: 'reverse'
@ -119,8 +126,9 @@ export class Globalization {
static getNumberPattern(options: {type: string}): Promise<{pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string}> {return; }
/**
*
* @param currencyCode
* Returns a pattern string to format and parse currency values according to the client's user preferences and ISO 4217 currency code.
* @param {string} currencyCode Currency Code.A
* @returns {Promise} returns a promise with the value
*/
@Cordova()
static getCurrencyPattern(currencyCode: string): Promise<{pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string}> {return; }

View File

@ -76,6 +76,10 @@ export class Network {
}
/**
* @private
*/
export class Connection {
static get UNKNOWN() { return 'unknown'; }
static get ETHERNET() { return 'ethernet'; }