User favorites endpoint change
Following the marketplace migration to D9 the way favorites are stored changed. They now live on the marketplace website. Followup from eclipsefdn/it/websites/marketplace.eclipse.org#212 (closed)
Previous url request:
GET https://api.eclipse.org/marketplace/favorites?name=rhoettger&page=1&pagesize=10
New url:
GET https://marketplace.eclipse.org/user/rhoettger/favorites
Response example (click to expand)
{
"mpc_favorites": [
{
"content_id": "1963651",
"count": "207",
"timestamp": "1698346502"
},
{
"content_id": "5012014",
"count": "199",
"timestamp": "1681995052"
},
{
"content_id": "321859",
"count": "449",
"timestamp": "1627043142"
},
{
"content_id": "1336",
"count": "1975",
"timestamp": "1627042472"
},
{
"content_id": "2925771",
"count": "202",
"timestamp": "1627042195"
},
{
"content_id": "393519",
"count": "60",
"timestamp": "1528301770"
},
{
"content_id": "3130970",
"count": "110",
"timestamp": "1528301764"
},
{
"content_id": "2799080",
"count": "46",
"timestamp": "1528301749"
},
{
"content_id": "29591",
"count": "564",
"timestamp": "1506608561"
},
{
"content_id": "3528014",
"count": "7",
"timestamp": "1506608558"
},
{
"content_id": "3530420",
"count": "11",
"timestamp": "1504711487"
},
{
"content_id": "3274405",
"count": "5257",
"timestamp": "1496952380"
},
{
"content_id": "192",
"count": "21",
"timestamp": "1477927645"
},
{
"content_id": "3035189",
"count": "22",
"timestamp": "1472576814"
},
{
"content_id": "150453",
"count": "72",
"timestamp": "1472008656"
},
{
"content_id": "87",
"count": "1022",
"timestamp": "1461185677"
}
],
"mpc_list_name": "Favorites for Eclipse Web",
"user": {
"uid": "1",
"name": "webdev",
"full_name": "webdev",
"picture": "https:\/\/accounts.eclipse.org\/user\/webdev\/picture",
"account_url": "https:\/\/api.eclipse.org\/account\/profile\/webdev",
"html_profile_url": "https:\/\/accounts.eclipse.org\/users\/webdev",
"mpc_favorites_url": "https:\/\/marketplace.eclipse.org\/user\/webdev\/favorites",
"html_mpc_favorites_url": "https:\/\/marketplace.eclipse.org\/user\/webdev\/favorites"
},
"result": {
"count": 16,
"range": {
"since": 0,
"until": "1698346502"
}
}
}
The new API does not have any pagination, There are about 50 users who have more than 50 favorites (one person have 210) so I guess I'll leave the pagination to the frontend? I can make one on the backend if necessary.