Class to hold the Link
-header.
More...
#include <easy.hpp>
|
| Link (const string &link_header) |
|
const uint_fast64_t | next () const |
| Returns max_id.
|
|
const uint_fast64_t | max_id () const |
| Returns max_id.
|
|
const uint_fast64_t | prev () const |
| Returns since_id.
|
|
const uint_fast64_t | since_id () const |
| Returns since_id.
|
|
Class to hold the Link
-header.
Extracts max_id and since_id from the Link
-header
◆ Link()
Easy::Link::Link |
( |
const string & |
link_header | ) |
|
|
explicit |
- Parameters
-
link_header | The content of the Link header |
122 std::regex renext(
"max_id=([[:digit:]]*)");
123 std::regex reprev(
"since_id=([[:digit:]]*)");
126 if (std::regex_search(link_header, match, renext))
128 _next = std::stoull(match[1].str());
130 if (std::regex_search(link_header, match, reprev))
132 _prev = std::stoull(match[1].str());
The documentation for this class was generated from the following files: