Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Nekidev/anime-api
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekidev committed Jan 17, 2023
2 parents 6ad034d + 5617f38 commit f5267cc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ These are the currently supported and planned to add support for APIs:
| Catboys | [Documentation](https://catboys.com/api) ||
| Anime Character Database | [Documentation](http://wiki.animecharactersdatabase.com/index.php?title=API_Access) ||
| AniBase | Not released ||
<<<<<<< HEAD
| Nekos API | [Documentation](https://nekos.nekidev.com/docs/rest-api/endpoints) ||
=======
| Nekos API | [Documentation](https://nekos.nekidev.com/docs) ||
>>>>>>> 7e61f35252454f28ba9e7fe52d1ab7defed957ad


### APIs by feature
Expand Down
28 changes: 27 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,32 @@ The `Artist` class represents an illustrator which has images in the API. It has
- `url`: (`Optional[str]`) A link to the artist's official website/social media account.
- `images`: (`Optional[int]`) The amount of images uploaded to the API. This property is only present when fetching the artist by ID.

### `get_categories(limit: int = 10, offset: int = 0)`

The `get_categories` method returns a list of all available categories. Pagination can be done with the `limit` and `offset` arguments.

```python3
from anime_api.apis import NekosAPI

api = NekosAPI()

categories = api.get_categories(limit=10, offset=0)
```

This method returns a list of `anime_api.apis.nekos_api.objects.Category` objects.

### The `Category` class

The category class represents an image category and stores it's information. It has the following properties:

- `id`: (`str`) The category's ID.
- `name`: (`str`) The category's name.
- `description`: (`str`) A short description that says what characteristics the images that have it share.
- `nsfw`: (`bool`) Wether the images with that category are necessarily nsfw or not.
- `images`: (`Optional[int]`) The amount of images that the category has. This will only be set if the category is fetched by its ID.

*The documentation for Nekos API is incomplete*

## Anime Facts Rest API

The Anime Facts Rest API is an API written in Node.js to get anime facts. The project is mantained by [Chadan-02](https://github.com/chandan-02) and the API documentation can be found [here](https://chandan-02.github.io/anime-facts-rest-api/).
Expand Down Expand Up @@ -1787,4 +1813,4 @@ for image in images:
print(image.url)
```

**Endpoints that require authorization have not yet been implemented.**
**Endpoints that require authorization have not yet been implemented.**

0 comments on commit f5267cc

Please sign in to comment.