Skip to content
Snippets Groups Projects
Unverified Commit 883b9fcd authored by Nicolas Werner's avatar Nicolas Werner Committed by GitHub
Browse files

Merge pull request #26 from jevolk/jevolk/sync-properties-optional

prev_batch and limited fields are not required; defaults added.
parents 8841d5f0 4a3d668b
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@ from_json(const json &obj, State &state)
void
from_json(const json &obj, Timeline &timeline)
{
timeline.prev_batch = obj.at("prev_batch");
timeline.limited = obj.at("limited");
timeline.prev_batch = obj.value("prev_batch", std::string{});
timeline.limited = obj.value("limited", false);
utils::parse_timeline_events(obj.at("events"), timeline.events);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment