KaiDevrim / XKCD.Net

C# API Wrapper for XKCD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XKCD.Net

XKCD.Net is a C# library for getting Comics from the famous web-series XKCD!

Installation

Use the any dotnet package manager like Nuget or just the default dotnet to install the package.

dotnet add package KaiDevrim.XkcdApi

Usage

To get the latest Comic, just instantiate a Comic class like so,

Comic comic = new Comic(0);

To get a random Comic, just use -1 instead,

Comic comic = new Comic(-1);

And to get a specific Comic, just insert the Comic's number,

Comic comic = new Comic(606);

From there you can get the following information about the Comic,

comic.Month (string)
comic.Num (int)
comic.Link (string)
comic.Year (string)
comic.News (string)
comic.SafeTitle (string)
comic.Transcript (string)
comic.Alt (string)
comic.Title (string)
comic.Img (Uri)
comic.Day (string)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

C# API Wrapper for XKCD

License:MIT License


Languages

Language:C# 100.0%