/hastewrap

Hastebin Wrapper Library

Primary LanguageC#

hastewrap

Hastebin Wrapper Library

Cancelled

Hastebin now requires authentication token, which requires github account. It is pointless to use this library as now.

Installation

Add "HasteWRAP.dll" to references.

Solution Explorer > References > Add Reference > Pick up "HasteWRAP.dll"

Add required usings.

using HasteWRAP;

Uploading text

using HasteWRAP;

var Hastebin = new HasteBIN();
string UploadLink = Hastebin.Create("Hello world!");
Console.WriteLine(UploadLink); // output: # https://hastebin.com/raw/xxx

You can also read the whole content of text file then upload it with this code.

using HasteWRAP;

var Hastebin = new HasteBIN();
string UploadLink = Hastebin.CreateFromFile("C:\\somefile.txt");
Console.WriteLine(UploadLink);

Reading

using HasteWRAP;

var Hastebin = new HasteBIN();
string ReadedText = Hastebin.Get("https://hastebin.com/about.md"); // or Get("key")
Console.WriteLine(ReadedText);

Proxy Support

var Hastebin = new HasteBIN("192.168.1.1:8080");

Packages

Library made with Leaf.xNet library. Referances to here