[Feature Enhancement]: Add `sort` parameter to `getQuotes`

オープン 初心者向け
#346 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

@KC-2001MS がすでに取り組んでいます。

2026年11月16日 から。

  • #347 @KC-2001MS による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
swift
領域
api

調査の方向性

既存のメソッド getQuotes(from:postCID:limit:cursor:) と、型 SortRanking を含む searchPosts(matching:sortRanking:...) の実装を見つけます。この API のパターンに従って、latest と top の値を取る省略可能な sort パラメーターを追加します。呼び出し側が引用のどちらの順序も指定でき、sort を省略した場合は既存のデフォルトが変わらない状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement
Summary

The app.bsky.feed.getQuotes lexicon now has an optional sort parameter (knownValues: ["latest", "top"]), added in bluesky-social/atproto#5552. getQuotes(from:postCID:limit:cursor:) does not expose it, so quote posts can only be fetched in the default newest-first order.

Pain points

Callers cannot fetch quote posts ordered by like count (top), which the Bluesky app now offers as a "Top" tab alongside "Latest" on the quotes screen.

Considered Alternatives

Building the app.bsky.feed.getQuotes request manually with the sort query item and decoding AppBskyLexicon.Feed.GetQuotesOutput — viable but bypasses the existing method.

Is this a breaking change?

No

Additional Context

The lexicon definition is at app/bsky/feed/getQuotes.json:

"sort": {
  "type": "string",
  "knownValues": ["latest", "top"],
  "description": "Ordering of results. 'latest' (default when unset) is newest first; 'top' orders quotes by their like count."
}

Proposed change, following searchPosts(matching:sortRanking:...) and AppBskyLexicon.Feed.SearchPosts.SortRanking:

extension AppBskyLexicon.Feed {

    public struct GetQuotes: Sendable, Codable {

        public enum Sort: String, Sendable, Codable {
            case latest
            case top
        }
    }
}

public func getQuotes(
    from postURI: String,
    postCID: String?,
    sort: AppBskyLexicon.Feed.GetQuotes.Sort? = nil,
    limit: Int? = 50,
    cursor: String? = nil
) async throws -> AppBskyLexicon.Feed.GetQuotesOutput
主要言語
Swift
スター
226
フォーク
40
平均マージ
2時間 56分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MasterJ93/ATProtoKit のほかの issue

MasterJ93/ATProtoKit の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。