· 5 years ago · Dec 16, 2019, 02:46 PM
1 private string _accessToken = string.Empty;
2 private static string _baseURL = "https://api.put.io/v2/files/";
3 private static string _baseEventURL = "https://api.put.io/v2/events/";
4 private static string _baseUploadURL = "https://upload.put.io/v2/files/";
5 private putSharpWebClient _client = new putSharpWebClient();
6
7 public FileListResult List(long parentID = 0)
8 {
9 string url = _baseURL + "list?parent_id="+ parentID +"&oauth_token=" + _accessToken;
10
11 string json = _client.DownloadString(url);
12
13 return FileListParser(json);
14 }