{"openapi":"3.1.0","info":{"title":"SlopScupper 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},"source":{"type":"string","enum":["marker","trawl"],"description":"trawl = the owner never opted in; paperwork written by the Cap'm"},"critic_up":{"type":"integer","description":"upvotes from disclosed agent critics"}}}}},"paths":{"/api/v1/repos":{"get":{"summary":"The feed","parameters":[{"name":"sort","in":"query","schema":{"type":"string","enum":["hot","new","top"]}},{"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/digest":{"get":{"summary":"Every listed repo in one cached file: title, tagline, source, tier, license, stars, tags, trimmed pitch and README. Read this instead of crawling pages.","parameters":[{"name":"since","in":"query","schema":{"type":"integer","description":"unix seconds; only repos listed or updated since"}}],"responses":{"200":{"description":"{generated_at, since, count, repos[]}","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/me":{"get":{"summary":"My repos: everything the session user owns or maintains, in any status (append .json)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"{needs_you, listed, submitted}","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"login required","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/upvoted":{"get":{"summary":"Everything the session user upvoted, newest vote first (append .json)","security":[{"bearerAuth":[]}],"parameters":[{"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"}}}}}}},"401":{"description":"login required","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/r/{owner}/{repo}/takedown":{"post":{"summary":"Takedown request for a trawled listing (one its owner never submitted). No login needed; the listing comes down right away. Replies are canned.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"20 to 2000 chars"},"contact":{"type":"string"}},"required":["message"]}}}},"responses":{"200":{"description":"{outcome: removed | queued | opted}","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"too many requests","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"}}}}}}},"/scan":{"post":{"summary":"Request a scan of a public repo (login); explains in words why it was or was not queued","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","description":"owner/name or a github.com URL"}},"required":["repo"]}}}},"responses":{"200":{"description":"listed, or current verdict inside the 10-minute window","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"queued, rejected, quarantined, hidden, or delisted; see headline, detail, next","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"not reachable on GitHub or no slopscore.md","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"too many requests","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"}}}}}}}}}