An implementation of the Memerator API in C#.
To install and use the SDK, follow the steps below.
Memerator for C# depends on .NET Core version 2.1 or above, and requires NuGet package Newtonsoft.Json 12.0.3 or later.
As of now, you can download the .dll from the Actions tab.
- Go to here
- Click the latest (highest) workflow
- Click
Memerator.API.dll
to download the only artifact.
Here is some sample code.
To get an API Key, go to the API Authentication page
using System;
using Memerator.API;
using Memerator.API.Objects;
namespace TestApp
{
class Program
{
static void Main(string[] args)
{
// Instantiate MemeratorAPI
MemeratorAPI api = new MemeratorAPI("[your api key]");
// Get meme "aaaaaaa"
Meme meme = api.GetMeme("aaaaaaa");
// Return caption
Console.WriteLine("Caption for meme aaaaaaa: " + meme.Caption());
// To access the API directly
JObject data = JObject.Parse(API.get("some/route"));
Console.WriteLine("Check out: " + data["response"].Value<string>());
// Change Key
api.SetToken("MyNewToken");
}
}
}
- .NET Core 2.1 - The framework used
- Newtonsoft.Json - Handling JSON
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Chew - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details