Skip to content

MrNatanael/PastebinAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PastebinAPI

Code Usage

Import PastebinAPI

using PastebinAPI.API;
using PastebinAPI.API.APIObject;

Connect with pastebin

PasteKey key = await PasteKeyBuilder.GenerateKeyAsync("your_developer_key", "your_username", "your_password");
Pastebin pastebin = new Pastebin(key);

Create new paste

PasteBuilder paste = new PasteBuilder();
paste.Title = "Your paste title.cs";
paste.Text = "Your paste content";
paste.Visibility = Visibility.Public;
paste.ExpireTime = ExpireTimer.Never;
paste.Format = "csharp";

string pasteUrl = await pastebin.CreateNewPasteAsync(paste);

Read paste

string content = await pastebin.ReadOwnPasteAsync(pasteUrl);

//public pastes
string content = await pastebin.ReadPasteAsync(pasteUrl);

Delete paste

await pastebin.DeletePasteAsync(pasteUrl);

Get list of your pastes

List<Paste> pastes = await pastebin.GetPastesAsync(limit: 100);

About

C# wrapper for Pastebin API

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages