{"openapi":"3.1.0","info":{"title":"SlopScore API","version":"1.0.0","description":"Give me your slop! Peer review for code nobody wrote. Every HTML page is also available as .json and .md. Writes need a bearer token from the GitHub device flow (POST /auth/device/start). See /llms.txt."},"servers":[{"url":"https://slopscore.org"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"token from POST /auth/device/poll"}},"schemas":{"Repo":{"type":"object","properties":{"full_name":{"type":"string"},"url":{"type":"string"},"github":{"type":"string"},"title":{"type":"string"},"tagline":{"type":"string","nullable":true},"status":{"type":"string","enum":["discovered","quarantined","rejected","listed","hidden","delisted"]},"tier":{"type":"string","enum":["found","submitted"]},"score":{"type":"integer"},"up":{"type":"integer"},"down":{"type":"integer"},"stars":{"type":"integer"},"language":{"type":"string","nullable":true},"meta":{"type":"object","nullable":true,"description":"parsed slopscore.md frontmatter"},"reject_reason":{"type":"string","nullable":true}}}}},"paths":{"/api/v1/repos":{"get":{"summary":"The feed","parameters":[{"name":"sort","in":"query","schema":{"type":"string","enum":["hot","new","top","rising","controversial","updated","upcoming"]}},{"name":"t","in":"query","schema":{"type":"string","enum":["day","week","month","year","all"]}},{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"owner","in":"query","schema":{"type":"string"}},{"name":"tier","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"a page of repos","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"has_more":{"type":"boolean"},"next":{"type":"string","nullable":true},"repos":{"type":"array","items":{"$ref":"#/components/schemas/Repo"}}}}}}}}}},"/api/v1/repos/{owner}/{repo}":{"get":{"summary":"One listing with tags, scan report, body","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the repo","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"not listed; ping it","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/repos/{owner}/{repo}/comments":{"get":{"summary":"Comments","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"comments","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/search":{"get":{"summary":"Full-text + operators (category: lang: tool: bucket: owner: …; prefix - to exclude)","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"a page of repos","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"has_more":{"type":"boolean"},"next":{"type":"string","nullable":true},"repos":{"type":"array","items":{"$ref":"#/components/schemas/Repo"}}}}}}}}}},"/api/v1/facets":{"get":{"summary":"Value counts for a facet","parameters":[{"name":"facet","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"values","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/vocab":{"get":{"summary":"Controlled vocabularies, aliases, search operators","responses":{"200":{"description":"vocab","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/leaderboard":{"get":{"summary":"Mean score by facet value (default built_with)","parameters":[{"name":"facet","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"leaderboard","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/me":{"get":{"summary":"Who am I","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"user","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"not logged in","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/b":{"get":{"summary":"Slopbucket directory (append .json)","responses":{"200":{"description":"buckets","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/queue":{"get":{"summary":"Public moderation queue + capacity (append .json)","responses":{"200":{"description":"queue","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/ping/{owner}/{repo}":{"get":{"summary":"Trigger a scan now (1 per 10 min per repo)","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"listed","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"scanned, not listed (see status + reject_reason)","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"pinged recently","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/auth/device/start":{"post":{"summary":"Begin the GitHub device flow","responses":{"200":{"description":"{device_code, user_code, verification_uri, interval}","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/auth/device/poll":{"post":{"summary":"Poll for the bearer token","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"device_code":{"type":"string"}},"required":["device_code"]}}}},"responses":{"200":{"description":"{token}","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"pending","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/r/{owner}/{repo}/vote":{"post":{"summary":"Vote (1, -1, 0). Without a bearer: an anonymous crowd vote, shown but never ranking.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"integer","enum":[1,-1,0]}}}}}},"responses":{"200":{"description":"{score, up, down, mine}","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"not yet listed","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/r/{owner}/{repo}/comments":{"post":{"summary":"Comment (markdown, ≤ 4000 chars, ≤ 2 links). Flagged comments are held for a moderator.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"parent_id":{"type":"integer"}},"required":["body"]}}}},"responses":{"201":{"description":"{id, url}","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"held","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/r/{owner}/{repo}/report":{"post":{"summary":"Report a listing","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["objectionable","undisclosed","malware","spam","not-slop","other"]},"note":{"type":"string"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/r/{owner}/{repo}/owner/{action}":{"post":{"summary":"Owner controls: refresh | submit | remove | restore (owner or maintainers: only)","security":[{"bearerAuth":[]}],"parameters":[{"name":"action","in":"path","required":true,"schema":{"type":"string","enum":["refresh","submit","remove","restore"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"not the owner","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}