Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.71 KB

README.md

File metadata and controls

44 lines (38 loc) · 1.71 KB

🎉 Welcome to Nekos.Fun.NET repository

wakatime GH_UserCount NG_LatestVersion NG_DLCount Discord_MemberCount

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

❓ How to use

Version 1

namespace Hello.There.Nekos;

public class Program
{
    public async Task ExecuteMeAsync()
    {
        NekoV1Client client = new();
        var neko = await client.RequestSfwResultsAsync(SfwEndpoint.Hug);
        var imageUrl = neko.First().Url;
    }
}

With logging (+Serilog)

namespace Hello.There.Nekos;

public class Program
{
    private NekosV2Client _clientWithLogging;

    public void CreateAClientWithLogger()
    {
        Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .WriteTo.Console()
            .CreateLogger();
            
        _clientWithLogging = new(new SerilogLoggerProvider(Log.Logger).CreateLogger("Nekos"));        
    }
}