Skip to content

Commit

Permalink
docs(): add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Aug 11, 2016
1 parent 2160a2d commit ecbe5fa
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/plugins/emailcomposer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
* 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
* ```typescript
Expand Down
16 changes: 15 additions & 1 deletion src/plugins/httpd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ import { Observable } from 'rxjs/Observable';
* @description
* Embedded httpd for Cordova apps. Light weight HTTP server.
* @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: 'https://github.com/floatinghotpot/cordova-httpd.git',
Expand All @@ -25,7 +39,7 @@ export class Httpd {
observable: true,
clearFunction: 'stopServer'
})
static startServer(options: any): Observable<string> { return; }
static startServer(options?: any): Observable<string> { return; }

/**
* Gets the URL of the running server
Expand Down
22 changes: 20 additions & 2 deletions src/plugins/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,26 @@ export interface PrintOptions {
*/
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: 'de.appplant.cordova.plugin.printer',
pluginRef: 'cordova.plugins.printer',
Expand Down
15 changes: 14 additions & 1 deletion src/plugins/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@ import { Cordova, Plugin } from './plugin';


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: 'https://github.com/gitawego/cordova-screenshot.git',
pluginRef: 'navigator.screenshot',
Expand Down
21 changes: 20 additions & 1 deletion src/plugins/twitter-connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,30 @@ import { Plugin, Cordova } from './plugin';
* @description
* Plugin to use Twitter Single Sign On
* 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: 'twitter-connect-plugin',
pluginRef: 'TwitterConnect',
repo: '',
repo: 'https://github.com/ManifestWebDesign/twitter-connect-plugin',
install: 'ionic plugin add twitter-connect-plugin --variable FABRIC_KEY=fabric_API_key'
})
export class TwitterConnect {
Expand Down

0 comments on commit ecbe5fa

Please sign in to comment.