GET Public
Returns the like count for an item and whether the current user has liked it.
Handler: get_status()
No parameters declared in the route registration.
curl Copycurl "https://example.com/wp-json/davo/v1/likes/{type}/{id}" POST Access check: require_login
Adds the current user's like to an item. Subject to the like rate limit.
Handler: add_like()
No parameters declared in the route registration.
curl Copycurl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/likes/{type}/{id}" DELETE Access check: require_login
Removes the current user's like from an item. Subject to the like rate limit.
Handler: remove_like()
No parameters declared in the route registration.
curl Copycurl -X DELETE -u "user:application-password" "https://example.com/wp-json/davo/v1/likes/{type}/{id}" src/domains/likes/routes.php:96
GET Public
Lists the members who liked an item, with pagination. Totals are returned in the X-WP- Total and X-WP-TotalPages headers.
Handler: get_likers()
No parameters declared in the route registration.
curl Copycurl "https://example.com/wp-json/davo/v1/likes/{type}/{id}/likers" src/domains/likes/routes.php:148
POST Access check: require_login
POST /likes/{type}/{id}/toggle New — parity with Bookmarks_Routes::toggle_bookmark().
Handler: toggle_like()
No parameters declared in the route registration.
curl Copycurl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/likes/{type}/{id}/toggle" src/domains/likes/routes.php:128
GET Access check: require_login
Lists the items the current user has liked, optionally by type, with pagination.
Handler: get_my_liked()
Parameters of GET /likes/me Parameter Type Required Default or allowed values type string — (empty) page integer — 1 per_page integer — —
curl Copycurl -u "user:application-password" "https://example.com/wp-json/davo/v1/likes/me" src/domains/likes/routes.php:186
GET Public
Returns the most-liked items, by type, count and period.
Handler: get_most_liked()
Parameters of GET /likes/most-liked Parameter Type Required Default or allowed values type string Yes — count integer — 5 period integer — 30
curl Copycurl "https://example.com/wp-json/davo/v1/likes/most-liked?type=…" src/domains/likes/routes.php:228
GET Public
Returns trending items, by type and count.
Handler: get_trending()
Parameters of GET /likes/trending Parameter Type Required Default or allowed values type string Yes — count integer — 5
curl Copycurl "https://example.com/wp-json/davo/v1/likes/trending?type=…" src/domains/likes/routes.php:307