据我了解,如果我想将特定的“提及”标记为已读,我会这样做:
$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