-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
apiRelated to the smithed apiRelated to the smithed apiinvalidThis doesn't seem rightThis doesn't seem right
Description
The current schema of PackMetaData (at /api/:id/meta):
{
docId: string
rawId: string
stats: {
updated: number?
added: number
downloads: {
total: number
today: number
}
}
owner: string
contributors: string[]
}is missing 2 fields that actually get returned by the API:
stats.scorewhich contains the score used for trending sorting.stats.downloads.pastWeekwhich reports the amount of downloads in the past week.
Example API response:
{
"docId": "5BltfprJBHfrMF1SFZwJ",
"rawId": "bound",
"stats": {
"added": 1743969186740,
"updated": 1743969186740,
"downloads": {
"total": 3,
"today": 2,
"pastWeek": 3 // Not in the schema!
},
"score": 1813 // Not in the schema!
},
"owner": "Pz0dCLQTndM6corTKpg4jsk6fOx1",
"contributors": [
"Pz0dCLQTndM6corTKpg4jsk6fOx1"
]
}My thoughts
For score specifically, it should be documented since it's not self-explanatory what it does.
Metadata
Metadata
Assignees
Labels
apiRelated to the smithed apiRelated to the smithed apiinvalidThis doesn't seem rightThis doesn't seem right