Contents
On this page

Update My List - Plugixa Stream

POST /plugixa-stream/v1/me/list

Put a title on the caller’s My List or take it off, or like and unlike it.

Any signed-in user (an Application Password, or the login cookie with an X-WP-Nonce header). Signed out, it answers 401 plugixa_stream_login_required. It always acts on the caller’s own account.

Request

POST https://your-site.example/wp-json/plugixa-stream/v1/me/list

Request body

Content type: application/json

Field Type Required Description
series_id integer Yes A published title.
kind string No list (the default) or like. Anything else reads as list.
on boolean No true to add (the default), false to remove.
{
  "series_id": 2681,
  "kind": "list",
  "on": true
}

Responses

200 OK.

{
  "success": true,
  "data": {
    "flags": ["list"]
  }
}
Field Type Meaning
data.flags string[] What the caller now has on this title: list, like, both or none

Errors

Status Code When
401 plugixa_stream_login_required Signed out.
404 plugixa_stream_not_found series_id is not a published title.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-stream/v1/me/list" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"series_id":2681,"kind":"list","on":true}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/me/list');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'series_id' => 2681,
        'kind'      => 'list',
        'on'        => true,
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-stream/v1/me/list', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ series_id: 2681, kind: 'list', on: true }),
});
const { data } = await response.json();

Quick Links

Share