Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ func NewApiServer(config config.Config) *ApiServer {
g.Get("/users/:userId/albums", app.v1UserAlbums)
g.Get("/users/:userId/playlists", app.v1UserPlaylists)
g.Get("/users/:userId/feed", app.v1UsersFeed)
g.Get("/users/:userId/feed/for-you", app.v1UsersFeedForYou)
g.Get("/users/:userId/connected_wallets", app.v1UsersConnectedWallets)
g.Get("/users/:userId/transactions/audio", app.v1UsersTransactionsAudio)
g.Get("/users/:userId/transactions/audio/count", app.v1UsersTransactionsAudioCount)
Expand Down Expand Up @@ -511,6 +512,9 @@ func NewApiServer(config config.Config) *ApiServer {
g.Get("/fan_club/feed", app.v1FanClubFeed)
g.Get("/fan-club/feed", app.v1FanClubFeed)

// For You feed (Twitter-style ranked feed)
g.Get("/feed/for-you", app.v1FeedForYou)

g.Get("/events/:eventId/comments", app.v1EventComments)
g.Get("/events/:eventId/followers", app.v1EventsFollowers)
g.Get("/events/:eventId/follow_state", app.v1EventFollowState)
Expand Down
124 changes: 124 additions & 0 deletions api/swagger/swagger-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,70 @@ paths:
"500":
description: Server error
content: {}
/feed/for-you:
get:
tags:
- feed
summary: Get For You feed
description:
Returns a personalized For You feed using Twitter-style multi-source
ranking (in-network, trending, underground, similar-artist candidates
scored by recency decay × engagement × social affinity).
operationId: Get For You Feed
security:
- {}
- OAuth2:
- read
parameters:
- name: user_id
in: query
description:
The user ID of the caller. Required — "For You" is personalized,
so the handler 400s without it.
required: true
schema:
type: string
- name: limit
in: query
description: The number of items to fetch
schema:
type: integer
default: 25
minimum: 1
maximum: 100
- name: offset
in: query
description:
The number of items to skip. Useful for pagination (page number
* limit)
schema:
type: integer
default: 0
minimum: 0
maximum: 200
- name: max_per_artist
in: query
description:
Maximum number of tracks per artist on a single page. Used by the
diversity pass to cap consecutive same-artist results.
schema:
type: integer
default: 3
minimum: 1
maximum: 10
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/tracks"
"400":
description: Bad request
content: {}
"500":
description: Server error
content: {}
/developer-apps:
post:
tags:
Expand Down Expand Up @@ -9375,6 +9439,66 @@ paths:
"500":
description: Server error
content: {}
/users/{id}/feed/for-you:
get:
tags:
- users
summary: Get For You feed for user
description:
Returns a personalized For You track feed for the user. Mirrors
the client-side blend of recommended, following originals, weekly
trending, and underground trending using a fixed 10-slot
interleave (60% recommended, 20% following, 10% trending, 10%
underground). Already-saved tracks are filtered out and results
are deduped by track ID.
operationId: Get User For You Feed
security:
- {}
- OAuth2:
- read
parameters:
- name: id
in: path
description: A User ID
required: true
schema:
type: string
- name: limit
in: query
description: The number of items to fetch
schema:
type: integer
default: 10
minimum: 1
maximum: 100
- name: offset
in: query
description:
The number of items to skip. Useful for pagination (page number
* limit)
schema:
type: integer
default: 0
minimum: 0
maximum: 200
- name: user_id
in: query
description: The user ID of the user making the request
schema:
type: string
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/tracks"
"400":
description: Bad request
content: {}
"500":
description: Server error
content: {}
/users/{id}/library/albums:
get:
tags:
Expand Down
Loading
Loading