Documentation ¶
Overview ¶
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SwaggerInfo = &swag.Spec{ Version: "5.2.3", Host: "api.waifu.im", BasePath: "/", Schemes: []string{}, Title: "Waifu.im", Description: "WAIFU.IM is an easy to use API that allows you to get waifu pictures from an archive of over 4000 images and multiple tags!\n\n## Versioning\n\nYou can specify which version of the API you want to use by placing it in the `Accept-Version` header.\n\nIf the value doesn't match any version, the latest version is used.\n\nWe highly recommend using versioning to prevent your app from breaking if a new version with breaking changes is developed. You can check which version you are using in the `Version` response header.\n\nThe latest version of the API is `v5`.\n\n## Breaking Changes\n\n- `FAVOURITES` became `FAVORITES`.\n\n- `/fav/delete` and `/fav/insert` now return the same structure as `/fav/toggle` and return a `200` status code.\n\n- For more information, please join the Discord server or contact us by email.\n\n## Rate Limit\n\nNote: This rate limit only applies to the `api.waifu.im` domain.\n\nThe rate limit is **1** request every **200** milliseconds. If you exceed this limit, the request will be put in a queue (with a maximum size of **10**).\n\nIf the queue is full, the server will respond with a **429** status code.\n\nYou can check the `Retry-After` header to get the time to wait (in seconds) before making another request.\n\n## Resources\n\nHere are some useful resources related to the API:\n\n- [GitHub](https://github.com/Waifu-im)\n\n- [Python wrapper](https://github.com/Waifu-im/waifuim.py)\n\n- [C# wrapper](https://github.com/SoNearSonar/WaifuImAPI-NET)\n\n## Tags\n\nImages are classified by a tag system and can have multiple tags!\n\nThere are versatile tags that can describe both safe and lewd images, as well as NSFW tags that only describe lewd images.\n\nYou can get a list of all tags at the `/tags` endpoint.\n\n## Generate an Authorization Link\n\nThis part isn't directly related to the API, and the base URL is not the same.\n\nThis will allow you to generate a link asking a user to click on it and grant permissions over their Waifu.im account (you can also do the opposite with revoke).\n\nThis will be useful if you want to use the `user_id` query string when dealing with favorites.\n\n| URI | Request type |\n|--------------------------------------------|--------------|\n| https://www.waifu.im/authorization/ | GET |\n| https://www.waifu.im/authorization/revoke/ | GET |\n\n### Query strings\n\n| Name | Required | Type | Behavior |\n|-------------|----------|--------------|-----------------------------------------------------------------------------------------------------------|\n| user_id | Yes | Integer | The Discord user ID of the user that will receive the permissions |\n| permissions | Yes | String Array | The permissions that will be asked for. Available permissions are `view_favorites` and `manage_favorites` |\n\nTo take in an array of values, provide the query string again with different values.\n\n\n## ⚠️ Warning\nIf you want to try routes that require authentication, you need to include your token. You can find your token at [https://www.waifu.im/dashboard](https://www.waifu.im/dashboard).\n\nTo include your token:\n\n1. Click the `Authorize` button below.\n\n2. In the dialog that appears, enter your token in the `Value` field.\n\n3. Click `Authorize` to apply the token.\n\n**Note:** When filling the field, ensure that you include the word `Bearer ` (with the space) before your token to properly authenticate your requests.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, }
SwaggerInfo holds exported Swagger Info so clients can modify it
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.