You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8de2e37
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,8 @@ A signed profile also says `is_muting` and has the web's `achievements`, with th
93
93
94
94
`POST /api/v1/commits` takes a `body`, and either a `parent_id` to reply to a commit or a `quoted_commit_id` to quote one, but not both. Returns a `201` on successful commit creation.
95
95
96
+
`GET /api/v1/scheduled-commits` lists the commits the user scheduled, as the web's Scheduled commits page does, which only they see: the ones still waiting first, then the submitted ones, each by when it was due, 20 a page. Canceled ones aren't listed. Each has its `id`, `body`, `body_segments` and `preview_segments` as a commit has them, its `poll_options` (or `null`) and `image_count`, `scheduled_at` in UTC, `submitted_at`, `status` (`scheduled` until it is submitted, then its commit's status, or `deleted`) and `commit_id`. Once submitted, the body is the commit's, so it is `null` here. `PUT /api/v1/scheduled-commits/{id}` gives a waiting one a new `body` and `scheduled_at`, with the rules it was scheduled with, and answers with it. Like posting, it is a `403` with `timed_out` while the user is in a timeout, though they can still cancel. Its images and poll stay, and its link preview becomes the first link in the new body. `DELETE /api/v1/scheduled-commits/{id}` cancels it, as the web's Cancel does, and answers `204`. Once it was submitted or canceled, both are a `409` with `scheduled_commit_submitted`, and someone else's is a `404`.
97
+
96
98
`POST /api/v1/commits/{id}/reports` reports a commit to the moderators, privately, as the web's Report button does. It takes a `reason`, one of `spam`, `harassment`, `unsafe` or `other`, and optional `details` of up to 500 characters, and answers `204`. Reporting doesn't hide the commit. Only someone else's published commit can be reported: the user's own is a `403` with `own_commit`, and one that is pending, rejected, deleted, missing or across a block is a `404` with `commit_unavailable`. Reporting a commit again also answers `204` and keeps the first report. Each user can send 5 reports a minute.
97
99
98
100
`GET /api/v1/me` also has what only the user sees in the web's profile settings: `preferred_lane` (a lane, a custom `#rrggbb` color, or `null` for Automatic), the `automatic_lane` Automatic picks for them, their `sponsors_url` (or `null`), and `github_synced_at`, when their profile was last synced from GitHub (`null` if it only was when they signed in). `PUT /api/v1/me/github` syncs it from GitHub again, like Sync from GitHub on the web, and shares its limit of one sync a minute. `PUT /api/v1/me/lane` saves their color, with a `lane` from `0` to `5`, or `null` for Automatic, or a custom `color` as lowercase `#rrggbb` with a `null` lane, as the web's color picker does. Both answer like `GET /api/v1/me`.
@@ -138,6 +140,7 @@ An error is JSON with a `message` to show the user. The errors the app has to te
138
140
|`403`|`user_unavailable`| The profile isn't available to the user, because it blocked them. |
139
141
|`403`|`own_commit`| The user tried to report their own commit. |
140
142
|`404`|`commit_unavailable`| The commit to report doesn't exist, was deleted, isn't published, or is across a block. |
143
+
|`409`|`scheduled_commit_submitted`|`PUT` and `DELETE /api/v1/scheduled-commits/{id}` only: the scheduled commit was already submitted or canceled. Nothing changed. |
141
144
|`422`|`pasteis_exhausted`|`POST /api/v1/commits/{id}/pasteis` only: the user gave all 10 of today's pastéis. They come back at 00:00 UTC. |
142
145
|`429`|`rate_limited`| Over 120 signed requests a minute for the user, 10 commits a minute, 30 follows and unfollows a minute, 60 stars and unstars a minute, 60 saves and unsaves a minute, 5 reports a minute, 60 pastéis a minute, one profile sync a minute, or 60 failed signatures a minute from one IP. `Retry-After` says when to try again. |
143
146
|`503`|`github_sync_failed`|`PUT /api/v1/me/github` only: GitHub couldn't be reached, or didn't answer as expected. Nothing changed. |
0 commit comments