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
5 changes: 5 additions & 0 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ func NewApiServer(config config.Config) *ApiServer {
g.Get("/users/handle/:handle/tracks/count", app.v1UserTracksCount)
g.Get("/users/handle/:handle/albums", app.v1UserAlbums)
g.Get("/users/handle/:handle/playlists", app.v1UserPlaylists)
g.Get("/users/handle/:handle/contests", app.v1UserContests)
g.Get("/users/handle/:handle/tracks/ai_attributed", app.v1UserTracksAiAttributed)
g.Get("/users/handle/:handle/tracks/ai-attributed", app.v1UserTracksAiAttributed)
g.Get("/users/handle/:handle/reposts", app.v1UsersReposts)
Expand Down Expand Up @@ -425,6 +426,7 @@ func NewApiServer(config config.Config) *ApiServer {
g.Get("/users/:userId/tracks/remixed", app.v1UserTracksRemixed)
g.Get("/users/:userId/albums", app.v1UserAlbums)
g.Get("/users/:userId/playlists", app.v1UserPlaylists)
g.Get("/users/:userId/contests", app.v1UserContests)
g.Get("/users/:userId/feed", app.v1UsersFeed)
g.Get("/users/:userId/connected_wallets", app.v1UsersConnectedWallets)
g.Get("/users/:userId/transactions/audio", app.v1UsersTransactionsAudio)
Expand Down Expand Up @@ -511,6 +513,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
121 changes: 121 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 @@ -5134,6 +5198,63 @@ paths:
"500":
description: Server error
content: {}
/users/{id}/contests:
get:
tags:
- users
summary: Get contests hosted by user
description:
Gets the remix contests hosted by a user, ordered with currently-active
contests first (by soonest-ending end_date), followed by ended contests
(most-recently-ended first). Active contests are those whose end_date
is null or in the future.
operationId: Get Contests by User
security:
- {}
- OAuth2:
- read
parameters:
- name: id
in: path
description: A User ID
required: true
schema:
type: string
- name: offset
in: query
description:
The number of items to skip. Useful for pagination (page number
* limit)
schema:
type: integer
- name: limit
in: query
description: The number of items to fetch
schema:
type: integer
- name: status
in: query
description: Filter contests by status
schema:
type: string
default: all
enum:
- active
- ended
- all
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/remix_contests_response"
"400":
description: Bad request
content: {}
"500":
description: Server error
content: {}
/users/{id}/developer-apps:
get:
tags:
Expand Down
Loading
Loading