没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > net-nzbmatrixapi |
net-nzbmatrixapi
|
0 | 0 | 0 |
贡献者 | 讨论 | 代码提交 |
.NET NZBMatrixAPINZBMatrix recently opened some functionality to their VIP users in the form of a text-based API.
For my own experimentation, and now for yours, I decided to write a .NET implementation of the API in C#.
SpecificationThe API is written in C# using .NET Framework 3.5.
UsageImport the NZBMatrixAPI reference to your project.
using NZBMatrixAPI;
//...
NZBMatrix nzb = new NZBMatrix("foo", "bar"); //your credentials
// Search
NZB[] results = nzb.Search("Ubuntu");
foreach(NZB result in results)
{
Console.WriteLine(result.Name + " -> " + result.ID);
}
// Download NZB file
string fileLocation = @"C:\\";
System.IO.StreamReader reader = new StreamReader(nzb.GetNZBFile(result0.ID));
System.IO.File.WriteAllText(fileLocation + result0.Name + ".nzb", reader.ReadToEnd());NotesApologies for the lack of documentation at the moment (both here and in the source), the work has been focused on primarily getting the thing working. There is, however, XML documentation associated with all public members. Full documentation is a top priority, and should be finished in the very near future.