Skip to content

MarkenJaden/Neko-Love.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎉 Welcome to Neko-Love.Net repository

wakatime GH_UserCount NG_LatestVersion NG_DLCount Discord_MemberCount

Neko-Love.Net is an asynchronous library to interact with Neko-Love 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"));        
    }
}