diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-11 19:42:08 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-11 21:33:54 +0200 |
commit | ed05d9d589fe3d36bd3714e648016352179afbef (patch) | |
tree | b86c1c9417d1037f02011cc9b651ab3acb3c77cb /lib/csapi/space_hierarchy.h | |
parent | 3a2e7f19c97289fb962b1c0ba4439870bbd0f31d (diff) | |
download | libquotient-ed05d9d589fe3d36bd3714e648016352179afbef.tar.gz libquotient-ed05d9d589fe3d36bd3714e648016352179afbef.zip |
Regenerate API files using latest matrix-spec
New:
- refresh tokens support (changes in login.* and registration.*;
RefreshJob);
- GetRelatingEvents[WithRelType[AndEventType]]Job
Changed space_hierarchy.*:
- childrenState is of type StateEvents now; limit and maxDepth are
(omittable) integers, not doubles.
- no more unused `stripped_state.h` file inclusion.
Diffstat (limited to 'lib/csapi/space_hierarchy.h')
-rw-r--r-- | lib/csapi/space_hierarchy.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/csapi/space_hierarchy.h b/lib/csapi/space_hierarchy.h index 5b3c1f80..7a421be8 100644 --- a/lib/csapi/space_hierarchy.h +++ b/lib/csapi/space_hierarchy.h @@ -4,8 +4,7 @@ #pragma once -#include "csapi/../../event-schemas/schema/core-event-schema/stripped_state.h" - +#include "events/eventloader.h" #include "jobs/basejob.h" namespace Quotient { @@ -66,7 +65,7 @@ public: /// added `origin_server_ts` key. /// /// If the room is not a space-room, this should be empty. - QVector<QJsonObject> childrenState; + StateEvents childrenState; }; // Construction/destruction @@ -103,8 +102,8 @@ public: */ explicit GetSpaceHierarchyJob(const QString& roomId, Omittable<bool> suggestedOnly = none, - Omittable<double> limit = none, - Omittable<double> maxDepth = none, + Omittable<int> limit = none, + Omittable<int> maxDepth = none, const QString& from = {}); /*! \brief Construct a URL without creating a full-fledged job object @@ -114,16 +113,16 @@ public: */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, Omittable<bool> suggestedOnly = none, - Omittable<double> limit = none, - Omittable<double> maxDepth = none, + Omittable<int> limit = none, + Omittable<int> maxDepth = none, const QString& from = {}); // Result properties /// The rooms for the current page, with the current filters. - QVector<ChildRoomsChunk> rooms() const + std::vector<ChildRoomsChunk> rooms() { - return loadFromJson<QVector<ChildRoomsChunk>>("rooms"_ls); + return takeFromJson<std::vector<ChildRoomsChunk>>("rooms"_ls); } /// A token to supply to `from` to keep paginating the responses. Not |