Hastebin Wrapper Library
Hastebin now requires authentication token, which requires github account. It is pointless to use this library as now.
Add "HasteWRAP.dll" to references.
Solution Explorer > References > Add Reference > Pick up "HasteWRAP.dll"
Add required usings.
using HasteWRAP;
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);
using HasteWRAP;
var Hastebin = new HasteBIN();
string ReadedText = Hastebin.Get("https://hastebin.com/about.md"); // or Get("key")
Console.WriteLine(ReadedText);
var Hastebin = new HasteBIN("192.168.1.1:8080");