aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/search.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-09-02 16:08:13 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-09-29 22:00:06 +0900
commit1e6510790dab6b9141ae52993987b406399668cd (patch)
tree1a45c0ccfec8f5f7ba37eb4385cdc7f61afa0c97 /lib/csapi/search.h
parent4244cee8d5e0f760cccd2b45ad587670573ef03c (diff)
downloadlibquotient-1e6510790dab6b9141ae52993987b406399668cd.tar.gz
libquotient-1e6510790dab6b9141ae52993987b406399668cd.zip
Support CS API 0.4.0
Numerous changes in CS (and now also AS) API, including compatibility-breaking ones - see the diff for details.
Diffstat (limited to 'lib/csapi/search.h')
-rw-r--r--lib/csapi/search.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/csapi/search.h b/lib/csapi/search.h
index 18411975..85b0886b 100644
--- a/lib/csapi/search.h
+++ b/lib/csapi/search.h
@@ -6,12 +6,12 @@
#include "jobs/basejob.h"
-#include <QtCore/QJsonObject>
+#include "csapi/definitions/room_event_filter.h"
#include "converters.h"
#include <QtCore/QVector>
+#include "events/eventloader.h"
#include <unordered_map>
#include <QtCore/QHash>
-#include "events/eventloader.h"
namespace QMatrixClient
{
@@ -65,7 +65,7 @@ namespace QMatrixClient
/// The keys to search. Defaults to all.
QStringList keys;
/// This takes a `filter`_.
- QJsonObject filter;
+ Omittable<RoomEventFilter> filter;
/// The order in which to search for results.
/// By default, this is ``"rank"``.
QString orderBy;
@@ -146,7 +146,7 @@ namespace QMatrixClient
struct ResultRoomEvents
{
/// An approximate count of the total number of results found.
- Omittable<qint64> count;
+ Omittable<int> count;
/// List of words which should be highlighted, useful for stemming which may change the query terms.
QStringList highlights;
/// List of results in the requested order.
@@ -161,7 +161,7 @@ namespace QMatrixClient
/// Any groups that were requested.
///
/// The outer ``string`` key is the group key requested (eg: ``room_id``
- /// or ``sender``). The inner ``string`` key is the grouped value (eg:
+ /// or ``sender``). The inner ``string`` key is the grouped value (eg:
/// a room's ID or a user's ID).
QHash<QString, QHash<QString, GroupValue>> groups;
/// Token that can be used to get the next batch of
@@ -185,7 +185,7 @@ namespace QMatrixClient
* Describes which categories to search in and their criteria.
* \param nextBatch
* The point to return events from. If given, this should be a
- * `next_batch` result from a previous call to this endpoint.
+ * ``next_batch`` result from a previous call to this endpoint.
*/
explicit SearchJob(const Categories& searchCategories, const QString& nextBatch = {});
~SearchJob() override;