Use the /sync endpoing instead /initialSync
The /initialSync endpoint is deprecated. This renames the api:initial_sync() method to api:sync(), and uses the new endpoint.
This commit is contained in:
@@ -72,9 +72,27 @@ function API:__tostring()
|
|||||||
return self.__name .. "{" .. self.base_url .. "}"
|
return self.__name .. "{" .. self.base_url .. "}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
----
|
||||||
function API:initial_sync(limit)
|
-- | Option | Type | Default Value |
|
||||||
return self:_send("GET", "/initialSync", { limit = limit or 1 })
|
-- |:=========|:========|===============|
|
||||||
|
-- | filter | string | nil |
|
||||||
|
-- | since | string | nil |
|
||||||
|
-- | full | boolean | false |
|
||||||
|
-- | online | boolean | true |
|
||||||
|
-- | timeout | number | nil |
|
||||||
|
----
|
||||||
|
function API:sync(options)
|
||||||
|
local params
|
||||||
|
if options then
|
||||||
|
params = {
|
||||||
|
filter = options.filter,
|
||||||
|
ince = options.since,
|
||||||
|
full_state = options.full or false,
|
||||||
|
set_presence = online and nil or "offline",
|
||||||
|
timeout = options.timeout,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return self:_send("GET", "/sync", params)
|
||||||
end
|
end
|
||||||
|
|
||||||
function API:register(login_type, params)
|
function API:register(login_type, params)
|
||||||
|
|||||||
Reference in New Issue
Block a user