- Refreshing poll results for remote polls
- Admin API: Add ability to require password reset
- Mastodon API: Account entities now include `follow_requests_count` (planned Mastodon 3.x addition)
-- Pleroma API: `GET /api/v1/pleroma/accounts/:id/now-playing` to get a list of recently scrobbled items
-- Pleroma API: `POST /api/v1/pleroma/now-playing` to scrobble a media item
+- Pleroma API: `GET /api/v1/pleroma/accounts/:id/scrobbles` to get a list of recently scrobbled items
+- Pleroma API: `POST /api/v1/pleroma/scrobble` to scrobble a media item
### Changed
- **Breaking:** Elixir >=1.8 is now required (was >= 1.7)
]
```
-## `POST /api/v1/pleroma/now-playing`
+## `POST /api/v1/pleroma/scrobble`
### Creates a new Listen activity for an account
* Method `POST`
* Authentication: required
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.StatusView
- def update_now_playing(%{assigns: %{user: user}} = conn, %{"title" => _} = params) do
+ def new_scrobble(%{assigns: %{user: user}} = conn, %{"title" => _} = params) do
params =
if !params["length"] do
params
scope [] do
pipe_through(:oauth_write)
- post("/now-playing", ScrobbleController, :update_now_playing)
+ post("/scrobble", ScrobbleController, :new_scrobble)
end
end
alias Pleroma.Web.CommonAPI
import Pleroma.Factory
- describe "POST /api/v1/pleroma/now-playing" do
+ describe "POST /api/v1/pleroma/scrobble" do
test "works correctly", %{conn: conn} do
user = insert(:user)
conn =
conn
|> assign(:user, user)
- |> post("/api/v1/pleroma/now-playing", %{
+ |> post("/api/v1/pleroma/scrobble", %{
"title" => "lain radio episode 1",
"artist" => "lain",
"album" => "lain radio",