MarkenJaden / NekosAPI.NET

.NET wrapper for the NekosAPI

Home Page:https://www.nuget.org/packages/NekosAPI.NET/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🎉 Welcome to NekosAPI.NET repository

wakatime GH_UserCount NG_LatestVersion NG_DLCount Discord_MemberCount

NekosAPI.NET is an asynchronous library to interact with NekosAPI API, currently supporting v3 API. If you love this repo, consider giving it a star ⭐

❓ How to use

Version 3

ApiClient

namespace Hello.There.Nekos;

public class Program
{
    public async Task ExecuteMeAsync()
    {
        ApiNekoClient _client = new(new HttpClient());

        //for more infos about the possible options check https://nekosapi.com/docs/images/random#parameters
        //tag 8 = catgirls
        var images = await _client.ImagesAsync(rating: ["safe"], tag: [8], limit: 3);
        foreach (var item in images.Items)
        {
            //Do whatever you want to do with this
            Console.WriteLine(item.Image_url);
        }
    }
}

In addition there are ImageNekoClient, ArtistNekoClient, CharacterNekoClient and RandomNekoClient. Just play around with it a bit.

About

.NET wrapper for the NekosAPI

https://www.nuget.org/packages/NekosAPI.NET/

License:MIT License


Languages

Language:C# 100.0%