public RootViewController() : base(null) { Api = new CloudDriveApi("ClientID", "ClientSecret"); Root = new RootElement("Cloud Drive") { new Section() { new StringElement("Sign in", async() => { var account = await Api.Authenticate("Userid"); new UIAlertView("Logged in", account.ToString(), null, "Ok").Show(); }), new StringElement("Get Account Info", async() => { var accountInfo = await Api.GetAccountInfo(); new UIAlertView("User info", accountInfo.ToString(), null, "Ok").Show(); }), }, new Section("Files") { new StringElement("List files", async() => { var files = await Api.GetNodeList(new CloudNodeRequest { Limit = 10, }); var fileRoot = new RootElement("Files") { new Section() { files.Data.Select(x => new StringElement(x.Name)), } }; this.NavigationController.PushViewController(new DialogViewController(fileRoot, true), true); }), new StringElement("Upload File", async() => { var file = "TestUploadFile.txt"; var upload = await Api.UploadFile(new FileUploadData(file), file); Console.WriteLine(upload); }), }, }; }
public AmazonMusicProvider(CloudDriveApi api) : base(api) { }