我刚刚用 C#编写了一个简单的PasteBin 客户端。
您可以按如下方式使用它:
string apiKey = "<your api key>";
var client = new PasteBinClient(apiKey);
// Optional; will publish as a guest if not logged in
client.Login(userName, password);
var entry = new PasteBinEntry
{
Title = "PasteBin client test",
Text = "Console.WriteLine(\"Hello PasteBin\");",
Expiration = PasteBinExpiration.OneDay,
Private = true,
Format = "csharp"
};
string pasteUrl = client.Paste(entry);
Console.WriteLine("Your paste is published at this URL: " + pasteUrl);
Run Code Online (Sandbox Code Playgroud)
您可以在此页面上获取您的 API 密钥(您需要登录)。
| 归档时间: |
|
| 查看次数: |
2205 次 |
| 最近记录: |