libkazv
|
Download device identity keys. More...
#include <keys.hpp>
Classes | |
struct | DeviceInformation |
Returns the current devices and identity keys for the given users. More... | |
class | JobResponse |
struct | UnsignedDeviceInfo |
Additional data added to the device key information by intermediate servers, and not covered by the signatures. More... | |
Public Member Functions | |
QueryKeysJob (std::string serverUrl, std::string _accessToken, immer::map< std::string, immer::array< std::string >> deviceKeys, std::optional< int > timeout=std::nullopt, std::optional< std::string > token=std::nullopt) | |
Download device identity keys. More... | |
QueryKeysJob | withData (JsonWrap j) && |
QueryKeysJob | withData (JsonWrap j) const & |
![]() | |
BaseJob (std::string serverUrl, std::string requestUrl, Method method, std::string jobId, std::string token={}, ReturnType returnType=ReturnType::Json, Body body=EmptyBody{}, Query query={}, Header header={}, std::optional< FileDesc > responseFile=std::nullopt) | |
~BaseJob () | |
bool | shouldReturnJson () const |
std::string | url () const |
Body | requestBody () const |
Header | requestHeader () const |
ReturnType | returnType () const |
Query | requestQuery () const |
returns the non-encoded query as an array of pairs More... | |
Method | requestMethod () const |
Response | genResponse (Response r) const |
BaseJob | withData (JsonWrap j) && |
BaseJob | withData (JsonWrap j) const & |
BaseJob | withQueue (std::string id, JobQueuePolicy policy=AlwaysContinue) && |
BaseJob | withQueue (std::string id, JobQueuePolicy policy=AlwaysContinue) const & |
json | dataJson (const std::string &key) const |
std::string | dataStr (const std::string &key) const |
std::string | jobId () const |
std::optional< std::string > | queueId () const |
JobQueuePolicy | queuePolicy () const |
std::optional< FileDesc > | responseFile () const |
Static Public Member Functions | |
static constexpr auto | needsAuth () |
static BaseJob::Query | buildQuery () |
static BaseJob::Body | buildBody (immer::map< std::string, immer::array< std::string >> deviceKeys, std::optional< int > timeout, std::optional< std::string > token) |
![]() | |
static bool | contentTypeMatches (immer::array< std::string > expected, std::string actual) |
Additional Inherited Members | |
![]() | |
enum | ReturnType { Json, File } |
using | Method = std::variant< Get, Post, Put, Delete > |
using | Body = ::Kazv::Body |
using | BytesBody = ::Kazv::BytesBody |
using | JsonBody = ::Kazv::JsonBody |
using | EmptyBody = ::Kazv::EmptyBody |
using | Header = ::Kazv::Header |
using | Response = ::Kazv::Response |
![]() | |
static Get | GET {} |
static Post | POST {} |
static Put | PUT {} |
static Delete | DELETE {} |
![]() | |
void | attachData (JsonWrap data) |
Download device identity keys.
Returns the current devices and identity keys for the given users.
|
explicit |
Download device identity keys.
deviceKeys | The keys to be downloaded. A map from user ID, to a list of device IDs, or to an empty list to indicate all devices for the corresponding user. |
timeout | The time (in milliseconds) to wait when downloading keys from remote servers. 10 seconds is the recommended default. |
token | If the client is fetching keys as a result of a device update received in a sync request, this should be the 'since' token of that sync request, or any later sync token. This allows the server to ensure its response contains the keys advertised by the notification in that sync. |
|
static |
|
static |
|
inlinestaticconstexpr |
QueryKeysJob Kazv::Api::QueryKeysJob::withData | ( | JsonWrap | j | ) | && |
QueryKeysJob Kazv::Api::QueryKeysJob::withData | ( | JsonWrap | j | ) | const & |