docs(): add missing docs

This commit is contained in:
Ibby Hadeed 2016-08-11 07:55:26 -04:00
parent 2160a2d9e8
commit ecbe5faef8
5 changed files with 70 additions and 5 deletions

View File

@ -10,6 +10,7 @@ declare var cordova: any;
* Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/katzer/cordova-plugin-email-composer). * Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/katzer/cordova-plugin-email-composer).
* *
* DISCLAIMER: This plugin is experiencing issues with the latest versions of Cordova. Use at your own risk. Functionality is not guaranteed. Please stay tuned for a more stable version. * DISCLAIMER: This plugin is experiencing issues with the latest versions of Cordova. Use at your own risk. Functionality is not guaranteed. Please stay tuned for a more stable version.
* A good alternative to this plugin is the social sharing plugin.
* *
* @usage * @usage
* ```typescript * ```typescript

View File

@ -7,6 +7,20 @@ import { Observable } from 'rxjs/Observable';
* @description * @description
* Embedded httpd for Cordova apps. Light weight HTTP server. * Embedded httpd for Cordova apps. Light weight HTTP server.
* @usage * @usage
* ```typescript
* import {Httpd, HttpdOptions} from 'ionic-native';
*
* let options: HttpdOptions = {
* www_root: 'httpd_root', // relative path to app's www directory
* port: 80,
* localhost_only: false
* };
*
* Httpd.startServer(options).subscribe((data) => {
* console.log('Server is live');
* });
*
* ```
*/ */
@Plugin({ @Plugin({
plugin: 'https://github.com/floatinghotpot/cordova-httpd.git', plugin: 'https://github.com/floatinghotpot/cordova-httpd.git',
@ -25,7 +39,7 @@ export class Httpd {
observable: true, observable: true,
clearFunction: 'stopServer' clearFunction: 'stopServer'
}) })
static startServer(options: any): Observable<string> { return; } static startServer(options?: any): Observable<string> { return; }
/** /**
* Gets the URL of the running server * Gets the URL of the running server

View File

@ -40,8 +40,26 @@ export interface PrintOptions {
*/ */
bounds?: number[] | any; bounds?: number[] | any;
} }
/**
* @name Printer
* @description Prints documents or HTML rendered content
* @usage
* ```typescript
* import {Printer, PrintOptions} from 'ionic-native';
*
* Printer.isAvailable().then(onSuccess, onError);
*
* let options: PrintOptions = {
* name: 'MyDocument',
* printerId: 'printer007',
* duplex: true,
* landscape: true,
* grayscale: true
* };
*
* Printer.print(content, options).then(onSuccess, onError);
* ```
*/
@Plugin({ @Plugin({
plugin: 'de.appplant.cordova.plugin.printer', plugin: 'de.appplant.cordova.plugin.printer',
pluginRef: 'cordova.plugins.printer', pluginRef: 'cordova.plugins.printer',

View File

@ -2,7 +2,20 @@ import { Cordova, Plugin } from './plugin';
declare var navigator: any; declare var navigator: any;
/**
* @name Screenshot
* @description Captures a screen shot
* @usage
* ```typescript
* import {Screenshot} from 'ionic-native';
*
* // Take a screenshot and save to file
* Screneshot.save('jpg', 80, 'myscreenshot.jpg').then(onSuccess, onError);
*
* // Take a screenshot and get temporary file URI
* Screneshot.URI(80).then(onSuccess, onError);
* ```
*/
@Plugin({ @Plugin({
plugin: 'https://github.com/gitawego/cordova-screenshot.git', plugin: 'https://github.com/gitawego/cordova-screenshot.git',
pluginRef: 'navigator.screenshot', pluginRef: 'navigator.screenshot',

View File

@ -6,11 +6,30 @@ import { Plugin, Cordova } from './plugin';
* @description * @description
* Plugin to use Twitter Single Sign On * Plugin to use Twitter Single Sign On
* Uses Twitter's Fabric SDK * Uses Twitter's Fabric SDK
* ```typescript
* import {TwitterConnect} from 'ionic-native';
*
* function onSuccess(response) {
* console.log(response);
*
* // Will console log something like:
* // {
* // userName: 'myuser',
* // userId: '12358102',
* // secret: 'tokenSecret'
* // token: 'accessTokenHere'
* // }
* }
*
* TwitterConnect.login().then(onSuccess, onError);
*
* TwitterConnect.logout().then(onLogoutSuccess, onLogoutError);
* ```
*/ */
@Plugin({ @Plugin({
plugin: 'twitter-connect-plugin', plugin: 'twitter-connect-plugin',
pluginRef: 'TwitterConnect', pluginRef: 'TwitterConnect',
repo: '', repo: 'https://github.com/ManifestWebDesign/twitter-connect-plugin',
install: 'ionic plugin add twitter-connect-plugin --variable FABRIC_KEY=fabric_API_key' install: 'ionic plugin add twitter-connect-plugin --variable FABRIC_KEY=fabric_API_key'
}) })
export class TwitterConnect { export class TwitterConnect {