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
IAniDbHttpApi api = new AniDbHttpApi();
// Pass AniDB anime id.
Response<Anime> anime = await this.api.GetAnime(17709);
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");
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();
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 as of right now is:
- 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 forDateOnly
conversion to/from XML. - Use
required
keyword instead of null collapse in DTOs when migrating to .Net7 or higher.
See Contributing doc.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the LICENSE file for more details.