/// <summary> /// Removes a plot directory from the config, does not actually delete the directory. /// </summary> /// <returns></returns> public Task RemovePlotDirectoryAsync(string dirPath) => PostAsync(HarvesterRoutes.RemovePlotDirectory(ApiUrl), new Dictionary <string, string>() { ["dirname"] = dirPath });
/// <summary> /// Returns all of the plot directoried being farmed. /// </summary> /// <returns></returns> public async Task <string[]> GetPlotDirectoriesAsync() { var result = await PostAsync <GetPlotDirectoriesResult>(HarvesterRoutes.GetPlotDirectories(ApiUrl)); return(result.Directories); }
/// <summary> /// Refreshes the plots, forces the harvester to search for and load new plots. /// </summary> /// <returns></returns> public Task RefreshPlotsAsync() => PostAsync(HarvesterRoutes.RefreshPlots(ApiUrl));
/// <summary> /// Deletes a plot file and removes it from the harvester. /// </summary> /// <returns></returns> public Task DeletePlotAsync(string fileName) => PostAsync(HarvesterRoutes.DeletePlot(ApiUrl), new Dictionary <string, string>() { ["filename"] = fileName });
/// <summary> /// Gets a list of plots being farmed on this harvester. /// </summary> /// <returns></returns> public async Task <Plot[]> GetPlotsAsync() { var result = await PostAsync <GetPlotsResult>(HarvesterRoutes.GetPlots(ApiUrl)); return(result.Plots); }