Skip to content

Vagab0nd/AniDB.Api

Repository files navigation

GitHub Actions Workflow Status NuGet Version GitHub Repo stars GitHub Issues or Pull Requests GitHub License


Logo

AniDB.Api

.Net library that provides wrapper for AniDB API!

πŸ“₯ Getting Started

Install

Download and install library from NuGet Gallery:

dotnet add package AniDb.Api

or install separately nugets for either Http or Udp API:

dotnet add package AniDb.Api.Http
dotnet add package AniDb.Api.Udp

Usage examples

GetAnime

IAniDbHttpApi api = new AniDbHttpApi();

// Pass AniDB anime id.
Response<Anime> anime = await this.api.GetAnime(17709);

GetUserHints

IAniDbHttpApi api = new AniDbHttpApi();

// Pass AniDB username and password.
// This is main password, not the API password specified in the profile.
// Library doesn't store this data.
Response<HintCollection> userHints = await this.api.GetUserHints("MyUsername", "MyPassword");

GetAnimeTitles

IAniDbAnimeTitles animeTitlesDump = new AniDbAnimeTitles();

// Note: Remember to cache results! 
// Best strategy would be to call this method only from wrapper class
// that implements pernament (not in memory) caching.
AnimeTitlesCollection animeTitles = await this.animeTitlesDump.GetAnimeTitles();

Caching

All users of this API should employ heavy local caching. In case of data dumps (Anime titles) requesting the same dataset multiple times on a single day can get you banned. The same goes for Http API request flooding. You should not request more than one page every two seconds.

β˜‚οΈ Coverage

Coverage as of right now is:

πŸ“ Roadmap

  • Implement UDP API.
  • Use ISO 639 language codes.
  • Add more comprehensive integration tests that check data mapping/validity
  • Use DateOnly in models when migrating to .Net7 or higher - support for DateOnly conversion to/from XML.
  • Use required keyword instead of null collapse in DTOs when migrating to .Net7 or higher.

βž• Contributing

See Contributing doc.

βš– License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the LICENSE file for more details.

About

.Net library that provides wrapper for AniDB API.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages