IPushPullApi

View as Markdown

The ipushpull plugin: login, the current report, and sending a snapshot or live data.

TypeScript
export interface

Methods

MethodReturnsDescription
addNewIPushPullPage(folder, page)voidAdds a new page to ipushpull using given name in the supplied folder
getAutoLogin()booleanRetrieves AutoLogin from ipushpull options; if true AdapTable will automatically log user in to ipushpull at start-up
getCurrentIPushPullPassword()string | undefinedRetrieves Password from ipushpull state -- AFTER someone logs in
getCurrentIPushPullUsername()string | undefinedRetrieves Username from ipushpull state - AFTER someone logs in
getCurrentLiveIPushPullReport()IPushPullReport | undefinedRetrieves current ipushpull Report from ipushpull state; A Report contains Name, Folder and ipushpull Page
getFolderIdForName(folderName)numberGets the Id of the ipushpull folder / Domain with the given name
getIPushPullDomains()IPushPullDomain[]Retrieves all the ipushpull domain to which the current user has access

An IPushPullDomain contains 3 properties:

- Name: the name of the Domain / Folder

- FolderId: the number of the Domain / Folder

- Pages: a string array containing the names of all the Pages in the Folder
getIPushPullInstance()anyRetrieves the current ipushpull instance (if one has been provided by the User at design time in ipushpull state)
getIPushPullPassword()string | undefinedRetrieves Password from ipushpull options (if provided)
getIPushPullThrottleTime()number | undefinedRetrieves Throttle Time from ipushpull State; how often a Live report will update ipushpull (if data changes)
getIPushPullUsername()string | undefinedRetrieves Username from ipushpull options (if provided)
getPagesForIPushPullDomain(domain)string[]Retrieves all pages in given ipushpull domain
includeSystemReports()booleanWhether to display System Reports in ipushpull toolbar
isIPushPullAvailable()boolean | undefinedChecks if an ipushpull instance has been provided by the user
isIPushPullLiveDataRunning()boolean | undefinedChecks if a report is sending Live Data to ipushpull
isIPushPullReportLive(report)booleanChecks if given report is currently 'live' (i.e. sending updates as data changes)
isIPushPullRunning()boolean | undefinedChecks to see if ipushpull is running (i.e. a user has successfully logged in)
loginToIPushPull(userName, password)voidLogins in user to ipushpull with given credentials; if successful ipushpull toolbar will display full set of controls
logoutFromIPushPull()voidLogs out the current user from ipushpull (changes ipushpull toolbar to show Login button)
sendSnapshot(iPushPullReport)voidPublishes an ipushpull Report as a one-off export (i.e. with no live data)
setIPushPullDomains(IPushPullDomains)voidSets given Domains as those for the current User
setIPushPullInstance(ippInstance)voidReplaces the ipushpull instance AdapTable is using. Prefer the login methods.
setIPushPullThrottleTime(throttleTime)voidSets Throttle time for ipushpull; how often a Live report will update ipushpull (if data changes)
showIPushPullPopup()voidOpens iPushPullPopup (though its currently empty!)
startLiveData(iPushPullReport)voidPublishes ipushpull Report as Live Data; any changes to underlying data in report will be sent to ipushpull

When this happens the 'play' button in the ipushpull toolbar changes to a red 'pause' button
stopLiveData()voidPauses current Live Data report

When this happens the 'pause' button in the ipushpull toolbar changes back to a 'play' button

Method Details

addNewIPushPullPage

Adds a new page to ipushpull using given name in the supplied folder

TypeScript
addNewIPushPullPage(folder: string, page: string): void;
Parameters
ParameterTypeDescription
folderstringthe name of the folder where the page will be added
pagestringtbe name of the page to add
Returns

void

getAutoLogin

Retrieves AutoLogin from ipushpull options; if true AdapTable will automatically log user in to ipushpull at start-up

TypeScript
getAutoLogin(): boolean;
Returns

AutoLogin from ipushpull options; if true AdapTable will automatically log user in to ipushpull at start-up

boolean

getCurrentIPushPullPassword

Retrieves Password from ipushpull state -- AFTER someone logs in

TypeScript
getCurrentIPushPullPassword(): string | undefined;
Returns

Password from ipushpull state -- AFTER someone logs in

string | undefined

getCurrentIPushPullUsername

Retrieves Username from ipushpull state - AFTER someone logs in

TypeScript
getCurrentIPushPullUsername(): string | undefined;
Returns

Username from ipushpull state - AFTER someone logs in

string | undefined

getCurrentLiveIPushPullReport

Retrieves current ipushpull Report from ipushpull state; A Report contains Name, Folder and ipushpull Page

TypeScript
getCurrentLiveIPushPullReport(): IPushPullReport | undefined;
Returns

Current ipushpull Report from ipushpull state; A Report contains Name, Folder and ipushpull Page

IPushPullReport | undefined

getFolderIdForName

Gets the Id of the ipushpull folder / Domain with the given name

TypeScript
getFolderIdForName(folderName: string): number;
Parameters
ParameterTypeDescription
folderNamestringthe ipushpull folder name
Returns

The Id of the ipushpull folder / Domain with the given name

number

getIPushPullDomains

Retrieves all the ipushpull domain to which the current user has access

An IPushPullDomain contains 3 properties:

  • Name: the name of the Domain / Folder

  • FolderId: the number of the Domain / Folder

  • Pages: a string array containing the names of all the Pages in the Folder

TypeScript
getIPushPullDomains(): IPushPullDomain[];
Returns

All the ipushpull domain to which the current user has access An IPushPullDomain contains 3 properties: - Name: the name of the Domain / Folder - FolderId: the number of the Domain / Folder - Pages: a string array containing the names of all the Pages in the Folder

IPushPullDomain[]

getIPushPullInstance

Retrieves the current ipushpull instance (if one has been provided by the User at design time in ipushpull state)

TypeScript
getIPushPullInstance(): any;
Returns

The current ipushpull instance (if one has been provided by the User at design time in ipushpull state)

any

getIPushPullPassword

Retrieves Password from ipushpull options (if provided)

TypeScript
getIPushPullPassword(): string | undefined;
Returns

Password from ipushpull options (if provided)

string | undefined

getIPushPullThrottleTime

Retrieves Throttle Time from ipushpull State; how often a Live report will update ipushpull (if data changes)

TypeScript
getIPushPullThrottleTime(): number | undefined;
Returns

Throttle Time from ipushpull State; how often a Live report will update ipushpull (if data changes)

number | undefined

getIPushPullUsername

Retrieves Username from ipushpull options (if provided)

TypeScript
getIPushPullUsername(): string | undefined;
Returns

Username from ipushpull options (if provided)

string | undefined

getPagesForIPushPullDomain

Retrieves all pages in given ipushpull domain

TypeScript
getPagesForIPushPullDomain(domain: string): string[];
Parameters
ParameterTypeDescription
domainstringipushpull folder which contains the pages
Returns

All pages in given ipushpull domain

string[]

includeSystemReports

Whether to display System Reports in ipushpull toolbar

TypeScript
includeSystemReports(): boolean;
Returns

true when to display System Reports in ipushpull toolbar

boolean

isIPushPullAvailable

Checks if an ipushpull instance has been provided by the user

TypeScript
isIPushPullAvailable(): boolean | undefined;
Returns

true when an ipushpull instance has been provided by the user

boolean | undefined

isIPushPullLiveDataRunning

Checks if a report is sending Live Data to ipushpull

TypeScript
isIPushPullLiveDataRunning(): boolean | undefined;
Returns

true when a report is sending Live Data to ipushpull

boolean | undefined

isIPushPullReportLive

Checks if given report is currently 'live' (i.e. sending updates as data changes)

TypeScript
isIPushPullReportLive(report: IPushPullReport): boolean;
Parameters
ParameterTypeDescription
reportIPushPullReportthe report to check
Returns

true when given report is currently 'live' (i.e. sending updates as data changes)

boolean

isIPushPullRunning

Checks to see if ipushpull is running (i.e. a user has successfully logged in)

TypeScript
isIPushPullRunning(): boolean | undefined;
Returns

true when a user is logged in to ipushpull

boolean | undefined

loginToIPushPull

Logins in user to ipushpull with given credentials; if successful ipushpull toolbar will display full set of controls

TypeScript
loginToIPushPull(userName: string, password: string): void;
Parameters
ParameterTypeDescription
userNamestringuserName to send to ipushpull
passwordstringpassword to send to ipushpull
Returns

void

logoutFromIPushPull

Logs out the current user from ipushpull (changes ipushpull toolbar to show Login button)

TypeScript
logoutFromIPushPull(): void;
Returns

void

sendSnapshot

Publishes an ipushpull Report as a one-off export (i.e. with no live data)

TypeScript
sendSnapshot(iPushPullReport: IPushPullReport): void;
Parameters
ParameterTypeDescription
iPushPullReportIPushPullReportthe report to publish
Returns

void

setIPushPullDomains

Sets given Domains as those for the current User

TypeScript
setIPushPullDomains(IPushPullDomains: IPushPullDomain[]): void;
Parameters
ParameterTypeDescription
IPushPullDomainsIPushPullDomain[]the ipushpull Domains to set
Returns

void

setIPushPullInstance

Replaces the ipushpull instance AdapTable is using. Prefer the login methods.

TypeScript
setIPushPullInstance(ippInstance: any): void;
Parameters
ParameterTypeDescription
ippInstanceanyipushpull instance to use
Returns

void

setIPushPullThrottleTime

Sets Throttle time for ipushpull; how often a Live report will update ipushpull (if data changes)

TypeScript
setIPushPullThrottleTime(throttleTime: number): void;
Parameters
ParameterTypeDescription
throttleTimenumbernew throttle time to use
Returns

void

showIPushPullPopup

Opens iPushPullPopup (though its currently empty!)

TypeScript
showIPushPullPopup(): void;
Returns

void

startLiveData

Publishes ipushpull Report as Live Data; any changes to underlying data in report will be sent to ipushpull

When this happens the 'play' button in the ipushpull toolbar changes to a red 'pause' button

TypeScript
startLiveData(iPushPullReport: IPushPullReport): void;
Parameters
ParameterTypeDescription
iPushPullReportIPushPullReportthe report to publish
Returns

void

stopLiveData

Pauses current Live Data report

When this happens the 'pause' button in the ipushpull toolbar changes back to a 'play' button

TypeScript
stopLiveData(): void;
Returns

void