Skip to content

MarkenJaden/Nekos.Fun.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎉 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"));        
    }
}

Releases

No releases published

Packages

No packages published

Languages