ここで API を使用: https://dev.mention.com/resources/alert_mentions/#put-accounts-id-alerts-alert-id-mentions-mention-id
私が理解していることから、特定の「言及」を既読としてマークしたい場合は、次のようにします。
$browser = new \Buzz\Browser(new \Buzz\Client\Curl);
$params = ['read' => true]; //tried this
$url = "https://api.mention.net/api/accounts/" . $this->getAccountId() . "/alerts/{$alert_id}/mentions/{$mention_id}";
if(!empty($params))
{
$url .= '?' . http_build_query($params); //i think this isnt needed because i pass $params below to the $browser->put but it was worth a try.
}
$response = $browser->put($url, array(
"Authorization: Bearer {$this->getAccessToken()}",
"Accept: application/json",
), $params);
if (200 != $response->getStatusCode()) {
return false;
}
ただし、コードを実行すると、エラーは発生せず、実際には有効な応答が返されますが、「読み取り」フラグはまだ false に設定されています。
また試しました:
$params = ['read' => 'true']; //tried this
$params = ['read' => 1]; //tried this