Add Link::min_id() and allow for alphanumeric IDs.
This commit is contained in:
parent
8b197134ab
commit
c3a5df62e5
|
@ -101,8 +101,8 @@ Easy::Link::Link(const string &link_header)
|
|||
: _next()
|
||||
, _prev()
|
||||
{
|
||||
std::regex renext("max_id=([[:digit:]]*)");
|
||||
std::regex reprev("since_id=([[:digit:]]*)");
|
||||
std::regex renext("max_id=([[:alnum:]]*)");
|
||||
std::regex reprev("(?:since|min)_id=([[:alnum:]]*)");
|
||||
std::smatch match;
|
||||
|
||||
if (std::regex_search(link_header, match, renext))
|
||||
|
@ -134,3 +134,8 @@ const string Easy::Link::since_id() const
|
|||
{
|
||||
return _prev;
|
||||
}
|
||||
|
||||
const string Easy::Link::min_id() const
|
||||
{
|
||||
return _prev;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,13 @@ namespace Easy
|
|||
*/
|
||||
const string since_id() const;
|
||||
|
||||
/*!
|
||||
* @brief Returns min_id.
|
||||
*
|
||||
* @since 0.111.0
|
||||
*/
|
||||
const string min_id() const;
|
||||
|
||||
private:
|
||||
string _next;
|
||||
string _prev;
|
||||
|
|
Reference in New Issue