Interface IMeteor

Index

Properties

Methods

Properties

public Errors: IMeteorErrors

For Error contributed package *

public Router: IMeteorRouter

For Router or Iron-Router contributed package *

public isClient: boolean

Core *

public isServer: boolean

public release: string

public settings: Object

public users: IMeteorUserCollection

Methods

public Collection(name: string, options?: { connection?: Object; idGeneration?: string; transform?: Function; })

Collections *

Parameters

  • name: string
  • options?: { connection?: Object; idGeneration?: string; transform?: Function; } optional

public Error(error: number, reason?: string, details?: string)

Parameters

  • error: number
  • reason?: string optional
  • details?: string optional

public Template()

public absoluteUrl(path: string, options: { secure?: boolean; replaceLocalhost?: boolean; rootUrl?: string; })

Parameters

  • path: string
  • options: { secure?: boolean; replaceLocalhost?: boolean; rootUrl?: string; }

public apply(name: string, options: Array<any>, asyncCallback?: Function)

Parameters

  • name: string
  • options: Array<any>
  • asyncCallback?: Function optional

public call(name: string, param1?: Object, param2?: Object, param3?: Object, param4?: Object, asyncCallback?: Function)

Parameters

  • name: string
  • param1?: Object optional
  • param2?: Object optional
  • param3?: Object optional
  • param4?: Object optional
  • asyncCallback?: Function optional

public clearInterval(id: number)

Parameters

  • id: number

public clearTimeout(id: number)

Parameters

  • id: number

public defer(callback: Function)

Parameters

  • callback: Function

public disconnect()

public loggingIn(): boolean

Returns

boolean

public loginWithExternalService(options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; }, callback?: Function)

Parameters

  • options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; } optional
  • callback?: Function optional

public loginWithFacebook(options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; }, callback?: Function)

Parameters

  • options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; } optional
  • callback?: Function optional

public loginWithGithub(options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; }, callback?: Function)

Parameters

  • options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; } optional
  • callback?: Function optional

public loginWithGoogle(options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; }, callback?: Function)

Parameters

  • options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; } optional
  • callback?: Function optional

public loginWithMeetup(options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; }, callback?: Function)

Parameters

  • options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; } optional
  • callback?: Function optional

public loginWithPassword(user: Object, password: string, callback?: Function)

Parameters

  • user: Object
  • password: string
  • callback?: Function optional

public loginWithTwitter(options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; }, callback?: Function)

Parameters

  • options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; } optional
  • callback?: Function optional

public loginWithWeibo(options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; }, callback?: Function)

Parameters

  • options?: { requestPermissions?: string[]; requestOfflineToken?: boolean; forceApprovalPrompt?: boolean; } optional
  • callback?: Function optional

public logout(callback?: Function)

Parameters

  • callback?: Function optional

public methods(methods: Object)

Methods *

Parameters

  • methods: Object

public publish(name: string, func: Function): any

Publish a record set.

Parameters

  • name: string

    Name of the attribute set. If null, the set has no name, and the record set is automatically sent to all connected clients.

  • func: Function

    Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same arguments.

Returns

any

public reconnect()

public render(htmlFunc: Function): DocumentFragment

Templates *

Parameters

  • htmlFunc: Function

Returns

DocumentFragment

public renderList(observable: IMeteorCursor, docFunc: Function, elseFunc?: Function): DocumentFragment

Parameters

  • observable: IMeteorCursor
  • docFunc: Function
  • elseFunc?: Function optional

Returns

DocumentFragment

public setInterval(func: Function, delay: number)

Parameters

  • func: Function
  • delay: number

public setTimeout(func: Function, delay: number)

Timers *

Parameters

  • func: Function
  • delay: number

public startup(func: Function)

Parameters

  • func: Function

public status(): { connected: boolean; status: string; retryCount: number; retryTime: number; reason: string; }

ServerConnections *

Returns

{ connected: boolean; status: string; retryCount: number; retryTime: number; reason: string; }

public subscribe(name: string, arg1?: any, arg2?: any, ars3?: any, arg4?: any, callbacks?: Object): IMeteorHandle

Subscribe to a record set. Returns a handle that provides stop() and ready() methods.

Parameters

  • name: string

    Name of the subscription. Matches name of server's publish() call.

  • arg1?: any optional
  • arg2?: any optional
  • ars3?: any optional
  • arg4?: any optional
  • callbacks?: Object optional

    Optional. May include onError and onReady callbacks. Can be Object or Function. If a function is passed instead of an object, it is interpreted as an onReady callback.

Returns

IMeteorHandle

public subscribeWithPagination(collection: string, limit: number): IMeteorHandle

For Paginated-Subscription contributed package *

Parameters

  • collection: string
  • limit: number

Returns

IMeteorHandle

public user(): IMeteorUser

Accounts *

Returns

IMeteorUser

public userId(): string

Returns

string