-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
admob admob-free app-preferences app-rate app-version background-geolocation badge base64 base64-to-gallery battery-status file gyroscope in-app-browser local-notifications phonegap-local-notification push screen-orientation secure-storage
- Loading branch information
1 parent
1707b51
commit ac13895
Showing
20 changed files
with
3,071 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<a name="1.0.2"></a> | ||
## [1.0.2](https://github.com/chrisgriffith/ionic-native-mocks) (2017-07-05) | ||
|
||
### Features | ||
Inital Release | ||
- actions-sheets | ||
- barcode-scanner | ||
- ble | ||
- bluetooth-serial | ||
- calendar | ||
- camera | ||
- contacts | ||
- date-picker | ||
- db-meter | ||
- device-motion | ||
- device-orientation | ||
- device | ||
- dialog | ||
- email-composer | ||
- geolocation | ||
- globalization | ||
- image-picker | ||
- keyboard | ||
- network | ||
- social-sharing | ||
- splash-screen | ||
- sqlite | ||
- status-bar | ||
- toast | ||
- touch-id | ||
- vibration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ionic-native-mocks", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Mocks for Ionic Native for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support", | ||
"homepage": "https://ionicframework.com/", | ||
"author": "Chris Griffith <[email protected]> (https://aj-sofwtare.com)", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
import { AdMobFree } from '@ionic-native/admob-free'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import { Observer } from 'rxjs/Observer'; | ||
import 'rxjs/add/observable/fromEvent'; | ||
|
||
export interface AdMobFreeBannerConfig { | ||
/** | ||
* Ad Unit ID | ||
*/ | ||
id?: string; | ||
/** | ||
* Receiving test ad | ||
*/ | ||
isTesting?: boolean; | ||
/** | ||
* Auto show ad when loaded | ||
*/ | ||
autoShow?: boolean; | ||
/** | ||
* Set to true, to put banner at top | ||
*/ | ||
bannerAtTop?: boolean; | ||
/** | ||
* Set to true, to allow banner overlap WebView | ||
*/ | ||
overlap?: boolean; | ||
/** | ||
* Set to true to avoid ios7 status bar overlap | ||
*/ | ||
offsetTopBar?: boolean; | ||
/** | ||
* Banner size | ||
*/ | ||
size?: string; | ||
} | ||
export interface AdMobFreeInterstitialConfig { | ||
/** | ||
* Ad Unit ID | ||
*/ | ||
id?: string; | ||
/** | ||
* Receiving test ad | ||
*/ | ||
isTesting?: boolean; | ||
/** | ||
* Auto show ad when loaded | ||
*/ | ||
autoShow?: boolean; | ||
} | ||
export interface AdMobFreeRewardVideoConfig { | ||
/** | ||
* Ad Unit ID | ||
*/ | ||
id?: string; | ||
/** | ||
* Receiving test ad | ||
*/ | ||
isTesting?: boolean; | ||
/** | ||
* Auto show ad when loaded | ||
*/ | ||
autoShow?: boolean; | ||
} | ||
|
||
export class AdMobFreeMock extends AdMobFree { | ||
/** | ||
* Convenience object to get event names | ||
* @type {Object} | ||
*/ | ||
events: any; | ||
/** | ||
* Watch an event | ||
* @param event {string} event name | ||
* @return {Observable<any>} | ||
*/ | ||
on(event: string): Observable<any> { | ||
return Observable.create((observer: Observer<any>) => { | ||
observer.next(''); | ||
observer.complete(); | ||
}); | ||
}; | ||
/** | ||
* Returns the AdMobFreeBanner object | ||
* @type {AdMobFreeBanner} | ||
*/ | ||
banner: AdMobFreeBanner; | ||
/** | ||
* Returns the AdMobFreeInterstitial object | ||
* @type {AdMobFreeInterstitial} | ||
*/ | ||
interstitial: AdMobFreeInterstitial; | ||
/** | ||
* Returns the AdMobFreeRewardVideo object | ||
* @type {AdMobFreeRewardVideo} | ||
*/ | ||
rewardVideo: AdMobFreeRewardVideo; | ||
} | ||
/** | ||
* @hidden | ||
*/ | ||
export class AdMobFreeBanner { | ||
/** | ||
* Update config. | ||
* @param options | ||
* @return {AdMobFreeBannerConfig} | ||
*/ | ||
config(options: AdMobFreeBannerConfig): AdMobFreeBannerConfig { | ||
let config: AdMobFreeBannerConfig; | ||
return config; | ||
}; | ||
/** | ||
* Hide the banner. | ||
* @return {Promise<any>} | ||
*/ | ||
hide(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
/** | ||
* Create banner. | ||
* @return {Promise<any>} | ||
*/ | ||
prepare(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
/** | ||
* Remove the banner. | ||
* @return {Promise<any>} | ||
*/ | ||
remove(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
/** | ||
* Show the banner. | ||
* @return {Promise<any>} | ||
*/ | ||
show(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
} | ||
/** | ||
* @hidden | ||
*/ | ||
export class AdMobFreeInterstitial { | ||
/** | ||
* Update config. | ||
* @param options | ||
* @return {AdMobFreeInterstitialConfig} | ||
*/ | ||
config(options: AdMobFreeInterstitialConfig): AdMobFreeInterstitialConfig { | ||
let config: AdMobFreeInterstitialConfig; | ||
return config; | ||
}; | ||
/** | ||
* Check if interstitial is ready | ||
* @return {Promise<any>} | ||
*/ | ||
isReady(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
/** | ||
* Prepare interstitial | ||
* @return {Promise<any>} | ||
*/ | ||
prepare(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
/** | ||
* Show the interstitial | ||
* @return {Promise<any>} | ||
*/ | ||
show(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
} | ||
/** | ||
* @hidden | ||
*/ | ||
export class AdMobFreeRewardVideo { | ||
/** | ||
* Update config. | ||
* @param options | ||
* @return {AdMobFreeRewardVideoConfig} | ||
*/ | ||
config(options: AdMobFreeRewardVideoConfig): AdMobFreeRewardVideoConfig { | ||
let config: AdMobFreeRewardVideoConfig; | ||
return config; | ||
}; | ||
/** | ||
* Check if reward video is ready | ||
* @return {Promise<any>} | ||
*/ | ||
isReady(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
/** | ||
* Prepare reward video | ||
* @return {Promise<any>} | ||
*/ | ||
prepare(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
/** | ||
* Show the reward video | ||
* @return {Promise<any>} | ||
*/ | ||
show(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
resolve(); | ||
}); | ||
}; | ||
} |
Oops, something went wrong.