public Command BuildFileCommand() { var command = new Command("file"); var builder = new FileRequestBuilder(PathParameters, RequestAdapter); command.AddCommand(builder.BuildDeleteCommand()); command.AddCommand(builder.BuildGetCommand()); command.AddCommand(builder.BuildLocalizationsCommand()); command.AddCommand(builder.BuildPatchCommand()); return(command); }
public HiDriveClient(IHiDriveAuthenticator authenticator) { Authenticator = authenticator ?? throw new ArgumentNullException(nameof(authenticator)); _httpClient = new HttpClient { BaseAddress = new Uri(ApiUrl), Timeout = Timeout.InfiniteTimeSpan }; _httpClient.DefaultRequestHeaders.AcceptCharset.Add(new StringWithQualityHeaderValue("utf-8")); _httpClient.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json")); Directory = new DirectoryRequestBuilder(this); File = new FileRequestBuilder(this); Meta = new MetaRequestBuilder(this); User = new UserRequestBuilder(this); }