Idevision API Version 3.6
Beta documentation available at /newdocs
tokens are required for certain endpoints, such as the private endpoints, cdn access (fetching images is available
to everyone at https://cdn.idevision.net, uploading images and viewing statistic endpoints requires a token), the OCR API, and so on.
You can apply for a token to the OCR API by using the idevision apply
command on the BOB (dev)#0346
bot on discord.
You will be denied if your name contains any sort of zalgo or otherwise not url-safe characters. This is done at my discretion.
For any other endpoints, please message IAmTomahawkx#1000 on discord.
Support is available via discord
This Endpoint indexes a python module, and returns links to the source on github for functions and classes closest to the query provided.
If you have a module you wish to be included in the rtfs index, please contact me on discord: IAmTomahawkx#1000
3 requests per 5 seconds (3/5s).
Exceeding this api by double (6/5s) will result in an automatic api ban (and disabling of your account, if you are using an API token). If you are using an API token, the rates above are doubled.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
(These are not strictly required, but are required to preform a search)
- query : The actual query
- library : The library to find source for
links
(returns links to the github source) or source
(returns the source itself). Defaults to links
Response 200 (when query and library parameters passed)
{
"nodes": {"Node name": "URL to source"},
"query_time": "1.0"
}
Response 200 (when no query parameters passed)
{
"libraries": {
"discord.py": "1.7.1",
"twitchio": "1.2.2",
"wavelink": "0.9.9",
"aiohttp": "3.7.4.post0"
},
"notice": "The 'query' and 'lib' parameters must be provided to preform a search"
}
This endpoint indexes sphinx repositories and returns documentation locations for items closest to the query provided.
3 requests per 5 seconds (3/5s).
Exceeding this api by double (6/5s) will result in an automatic api ban (and disabling of your account, if you are using an API token). If you are using an API token, the rates above are doubled.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
true
label:
prepended to them. Does nothing when show-labels is false. Defaults to false
Response 200
{
"nodes": {"Node name": "URL of the documentation"},
"query_time": "1.0",
"_cache_indexed": "2021-04-07T05:54:47.939360",
"_cache_expires": "2021-04-07T05:54:47.939360"
}
This endpoint indexes rust crates and returns documentation locations for items closest to the query provided.
pass std
as the crate query parameter to index the std instead of an external crate
3 requests per 5 seconds (3/5s).
Exceeding this api by double (6/5s) will result in an automatic api ban (and disabling of your account, if you are using an API token). If you are using an API token, the rates above are doubled.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
std
to use the latest stable build.Response 200
{
"nodes": {"Node name": "URL of the documentation"},
"query_time": "1.0"
}
public.ocr
permission groupThis endpoint takes an image as a bytes stream, and returns the contents of the image as text.
this endpoint may take longer to respond, depending on the amount of traffic flowing through the endpoint.
Only two images are processed at a time (globally).
Note that this model currently does not work well with dark backgrounds. Inverting dark backgrounds before uploading will lead to much better results
2 requests per 10 seconds (2/10s).
Exceeding this api by double (4/10s) will result in an automatic api ban (and disabling of your account, if you are using an API token). If you are using an API token, the rates above are doubled.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
Response 200
{
"data": "Content here"
}
Allows you to search for xkcd webcomics by name.
10 requests per 10 seconds (10/10s).
Exceeding this api by double (20/10s) will result in an automatic api ban (and disabling of your account, if you are using an API token). If you are using an API token, the rates above are doubled.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
Response 200
{
"nodes": [
{
"num": 123,
"posted": "2007-06-06T00:00:00",
"safe_title": "A Title",
"title": "A Title",
"alt": "Witty Comment",
"transcript": "Sometimes has a transcript of the comic",
"news": "Sometimes has site news",
"image_url": "https://imgs.xkcd.com/comics/...",
"url": "https://xkcd.com/123"
}
],
"query_time": 0.011
}
Allows you to add a tag to a comic number, which will change search results for the word.
A tag may only exist once across all comics.
2 requests per 10 seconds (2/10s).
Exceeding this api by double (4/10s) will result in an automatic api ban.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
{
"tag": "myword",
"num": 123
}
num is the number of the comic to add the tag to.
Response 204
[Empty]
This endpoint allows you to set up a customized homepage, viewable at https://idevision.net/homepage?user=
Anyone may access this, so don't put private links that do not require authorization.
5 requests per 30 seconds (5/30s).
Exceeding this api by double (10/30s) will result in an automatic api ban (and disabling of your account, if you are using an API token). If you are using an API token, the rates above are doubled.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
{
"link1": "https://duckduckgo.com",
"link1_name": "DuckDuckGo",
"link2": "https://github.com",
"link2_name": "GitHub",
"link3": "https://discord.com",
"link3_name": "Discord",
"link4": "https://idevision.net",
"link4_name": "IDevision"
}
Response 204
[empty]
games.chess
permission groupThis endpoint returns a new chess board. This board should be passed to the other chess endpoints.
5 requests per 10 seconds (5/10).
Exceeding this api by double (10/10) will result in an automatic api ban and disabling of your account.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
{
"white-theme": "wood",
"black-theme": "wood",
"board-theme": "walnut"
}
valid white/black themes are:
- 8_bit
- bases
- classic
- game_room
- glass
- graffiti
- lolz
- neo
- neo_wood
- ocean
- wood
valid board themes are:
- 8_bit
- glass
- graffiti
- green
- lolz
- neon
- overlay
- parchment
- walnut
This returns a board
object, which is purposefully undocumented, as it is subject to change
games.chess
permission groupThis endpoint renders a given board
5 requests per 10 seconds (5/10).
Exceeding this api by double (10/10) will result in an automatic api ban and disabling of your account.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
{
"board": {...},
"arrow": null
}
board should be a board object returned from /api/games/chess or /api/games/chess/turn.
Arrow is an optional value, if passed, it should be the arrow
value returned from the /api/games/chess/turn endpoint
[PNG file]
games.chess
permission groupthis endpoint takes a board, a move, and a player, and returns the updated board
5 requests per 10 seconds (5/10).
Exceeding this api by double (10/10) will result in an automatic api ban and disabling of your account.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
{
"board": {...},
"move": "a2-a4",
"move-turn": "white"
}
board should be a board object returned from /api/games/chess or /api/games/chess/turn.
turn should be a from position - to position
move-turn should be one of white
or black
.
{
"board": {...},
"arrow": "string"
}
this payload can be passed directly to /api/games/chess/render
games.chess
permission groupThis endpoint takes a board object, and returns a human-readable transcript of the game
5 requests per 10 seconds (5/10).
Exceeding this api by double (10/10) will result in an automatic api ban and disabling of your account.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
{
"board": ...
}
A plaintext list of moves, one per line
cdn
permission groupThis endpoint allows you to upload content to the idevision cdn.
6 requests per 7 seconds (6/7).
Exceeding this api by double (12/60) will result in an automatic api ban and disabling of your account.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
cdn.manage
permission to be effectivecdn.manage
permission to be effectiveThis endpoint expects either a multipart form containing the image to upload, or a bytes stream of the file.
You should pass a File-Name
header that specifies the name of the file, as the file extension will be pulled from this header.
It will default to .jpg if no File-Name
header is passed.
Response 201
{
"url": "https://cdn.idevision.net/node/slug",
"slug": "somename.filetype",
"node": "node the file is on"
}
This endpoint fetches basic statistics on the cdn.
20 requests per 60 seconds (20/60s).
Exceeding this api by double (40/60) will result in an automatic api ban (and disabling of your account, if you are using an API token). If you are using an API token, the rates above are doubled.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
{
"upload_count": 1234,
"uploaded_today": 1234,
"last_upload": "https://cdn.idevision.net/node/slug"
}
cdn
permission groupFetches info on a specific upload.
30 requests per 60 seconds (30/60s).
Exceeding this api by double (60/60) will result in an automatic api ban and disabling of your account.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
Response 200
{
"url": "https://cdn.idevision.net/node/slug",
"timestamp": 12345,
"author": "tom",
"views": 5,
"node": "node",
"size": 12345
}
size is in bytes
cdn
permission groupDeletes a file from the cdn. If you do not have the cdn.manage
permission group, you may only delete your own images.
14 requests per 60 seconds (14/60s).
Exceeding this api by double (10/30) will result in an automatic api ban and disabling of your account.
Please follow the ratelimit-retry-after headers when you receive a 429 response code.
Response 204
No content.
I reserve the right to deny access of anyone to this service at any time, for any reason.
I reserve the right to remove images from the cdn at any time, for any reason.
By using this service, you agree that I may collect usage info.
Any images uploaded to this cdn are public.
These policies may change at any time, without warning.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SERVICE OR THE
USE OR OTHER DEALINGS IN THE SERVICE.