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
extract(what) → {Object}
Extract subquery: get an object that contains specified subquery.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
what |
string
|
subquery to return: one of 'data', 'sub', 'desc', 'tags', 'cred', 'del'. |
Returns:
- Type:
-
Object
requested subquery or
undefined
.
withCred() → {Tinode.MetaGetBuilder}
Add query parameters to fetch user's credentials.
'me'
topic only.
- Source:
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 |
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 |
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. |
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. |
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 |
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 |
withLaterDesc() → {Tinode.MetaGetBuilder}
Add query parameters to fetch topic description if it's newer than the last update.
- Source:
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. |
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. |
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. |
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. |