* Response: the archive of the pack with a 200 status code, 403 if the pack is not set as shared,
404 if the pack does not exist
-## `GET /api/v1/pleroma/accounts/:uid/now-playing`
+## `GET /api/v1/pleroma/accounts/:id/scrobbles`
### Requests a list of current and recent Listen activities for an account
* Method `GET`
* Authentication: not required
```json
[
{
+ "account": {...},
"id": "1234",
"title": "Some Title",
"artist": "Some Artist",
"album": "Some Album",
- "length": 180000
+ "length": 180000,
+ "created_at": "2019-09-28T12:40:45.000Z"
}
]
```
end
end
- def user_now_playing(%{assigns: %{user: reading_user}} = conn, params) do
+ def user_scrobbles(%{assigns: %{user: reading_user}} = conn, params) do
with %User{} = user <- User.get_cached_by_nickname_or_id(params["id"], for: reading_user) do
params = Map.put(params, "type", ["Listen"])
scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
pipe_through([:api, :oauth_read_or_public])
- get("/accounts/:id/now-playing", PleromaAPIController, :user_now_playing)
+ get("/accounts/:id/scrobbles", PleromaAPIController, :user_scrobbles)
end
scope "/api/v1", Pleroma.Web.MastodonAPI do