Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Latest commit

 

History

History
37 lines (31 loc) · 1.21 KB

README.md

File metadata and controls

37 lines (31 loc) · 1.21 KB

FaceApp.Net

A lightweight wrapper for the FaceApp API.

Note

This library does not implement ratelimit to prevent you from getting blocked from the API, so I would be careful while using it.

How to use?

Don't

//Create a new instance of the FaceAppClient and pass an instance of HttpClient to its constructor (you generally want to only have one instance of the HttpClient).
//Note: Using Dependency Injection is recommended because it handles everything for you.

//_faceApp: FaceAppClient, url: string url
if (Uri.TryCreate(url, UriKind.Absolute, out Uri uri))
{
    try
    {
        var code = await _faceApp.GetCodeAsync(uri);
        using (var imgStream = await _faceApp.ApplyFilterAsync(code, FilterType.Old))
        {
            //do stuff.
        }
    }
    catch (FaceException ex)
    {
        Console.WriteLine(ex.ToString());
    }            
}

Example

Normal Zucc Happy Zucc

Credits

I used Faces, a python wrapper, to figure out the endpoint as it was not documented.