MetaGetBuilder

Tinode. MetaGetBuilder

new MetaGetBuilder(parent)

Helper class for constructing Tinode.GetQuery.
Source:
Parameters:
Name Type Description
parent Tinode.Topic topic which instantiated this builder.

Methods

build() → {Tinode.GetQuery}

Construct parameters
Source:
Returns:
Type:
Tinode.GetQuery
Get query

withCred() → {Tinode.MetaGetBuilder}

Add query parameters to fetch user's credentials. 'me' topic only.
Source:
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withData(sinceopt, beforeopt, limitopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch messages within explicit limits.
Source:
Parameters:
Name Type Attributes Description
since Number <optional>
messages newer than this (inclusive);
before Number <optional>
older than this (exclusive)
limit Number <optional>
number of messages to fetch
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withDel(sinceopt, limitopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch deleted messages within explicit limits. Any/all parameters can be null.
Source:
Parameters:
Name Type Attributes Description
since Number <optional>
ids of messages deleted since this 'del' id (inclusive)
limit Number <optional>
number of deleted message ids to fetch
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withDesc(imsopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch topic description if it's newer than the given timestamp.
Source:
Parameters:
Name Type Attributes Description
ims Date <optional>
fetch messages newer than this timestamp.
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withEarlierData(limitopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch messages older than the earliest saved message.
Source:
Parameters:
Name Type Attributes Description
limit Number <optional>
maximum number of messages to fetch.
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withLaterData(limitopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch messages newer than the latest saved message.
Source:
Parameters:
Name Type Attributes Description
limit Number <optional>
number of messages to fetch
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withLaterDel(limitopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch messages deleted after the saved 'del' id.
Source:
Parameters:
Name Type Attributes Description
limit Number <optional>
number of deleted message ids to fetch
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withLaterDesc() → {Tinode.MetaGetBuilder}

Add query parameters to fetch topic description if it's newer than the last update.
Source:
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withLaterOneSub(userOrTopicopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch a single subscription if it's been updated since the last update.
Source:
Parameters:
Name Type Attributes Description
userOrTopic String <optional>
user ID or topic name to fetch for fetching one subscription.
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withLaterSub(limitopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch subscriptions updated since the last update.
Source:
Parameters:
Name Type Attributes Description
limit Number <optional>
maximum number of subscriptions to fetch.
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withOneSub(imsopt, userOrTopicopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch a single subscription.
Source:
Parameters:
Name Type Attributes Description
ims Date <optional>
fetch subscriptions modified more recently than this timestamp
userOrTopic String <optional>
user ID or topic name to fetch for fetching one subscription.
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withSub(imsopt, limitopt, userOrTopicopt) → {Tinode.MetaGetBuilder}

Add query parameters to fetch subscriptions.
Source:
Parameters:
Name Type Attributes Description
ims Date <optional>
fetch subscriptions modified more recently than this timestamp
limit Number <optional>
maximum number of subscriptions to fetch.
userOrTopic String <optional>
user ID or topic name to fetch for fetching one subscription.
Returns:
Type:
Tinode.MetaGetBuilder
this object.

withTags() → {Tinode.MetaGetBuilder}

Add query parameters to fetch topic tags.
Source:
Returns:
Type:
Tinode.MetaGetBuilder
this object.