Skip to content

Commit 94adebb

Browse files
hitalinclaude
andcommitted
feat: search_channels APIを追加
channels/searchエンドポイントを使用したチャンネル検索メソッド。 クエリ文字列で大規模サーバーのチャンネルを絞り込み検索できる。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5455284 commit 94adebb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/api.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,24 @@ impl MisskeyClient {
365365
Ok(channels)
366366
}
367367

368+
pub async fn search_channels(
369+
&self,
370+
host: &str,
371+
token: &str,
372+
query: &str,
373+
) -> Result<Vec<Channel>, NoteDeckError> {
374+
let data = self
375+
.request(
376+
host,
377+
token,
378+
"channels/search",
379+
json!({"query": query, "limit": 100}),
380+
)
381+
.await?;
382+
let channels: Vec<Channel> = serde_json::from_value(data)?;
383+
Ok(channels)
384+
}
385+
368386
#[allow(clippy::too_many_arguments)]
369387
pub async fn get_channel_notes(
370388
&self,

0 commit comments

Comments
 (0)