Esempio n. 1
0
 /// <summary>
 /// Perform asynchronous post requests returning generic success / error data
 /// </summary>
 /// <param name="cgiPath">Path of the cgi handling the request</param>
 /// <param name="api">Name of the API handling the request</param>
 /// <param name="parameters">Parameters of the request</param>
 /// <returns>Result of the request</returns>
 internal async Task <ResultData> PostDataAsync(string cgiPath, string api, SynologyPostParameters parameters) => await Connection.PostDataFromApiAsync(cgiPath, api, parameters.Version, parameters.Method, parameters.Additional);
Esempio n. 2
0
 /// <summary>
 /// Performs asynchronous post request with specific response
 /// </summary>
 /// <typeparam name="T">Type of the result data</typeparam>
 /// <param name="parameters">Parameters used for the request</param>
 /// <returns>Specific result data</returns>
 protected async Task <ResultData <T> > PostDataAsync <T>(SynologyPostParameters parameters) => await Api.PostDataAsync <T>(CgiPath, ApiName, parameters);
Esempio n. 3
0
 /// <summary>
 /// Perform post requests returning generic success / error data
 /// </summary>
 /// <param name="cgiPath">Path of the cgi handling the request</param>
 /// <param name="api">Name of the API handling the request</param>
 /// <param name="parameters">Parameters of the request</param>
 /// <returns>Result of the request</returns>
 internal ResultData PostData(string cgiPath, string api, SynologyPostParameters parameters) => Connection.PostDataFromApi(cgiPath, api, parameters.Version, parameters.Method, parameters.Additional);
Esempio n. 4
0
 /// <summary>
 /// Performs synchronous post request
 /// </summary>
 /// <param name="parameters">Parameters used for the request</param>
 /// <returns>Generic result data</returns>
 protected ResultData PostData(SynologyPostParameters parameters) => Api.PostData(CgiPath, ApiName, parameters);
Esempio n. 5
0
 /// <summary>
 /// Perform post requests returning specific data
 /// </summary>
 /// <typeparam name="T">Result return data type</typeparam>
 /// <param name="cgiPath">Path of the cgi handling the request</param>
 /// <param name="api">Name of the API handling the request</param>
 /// <param name="parameters">Parameters of the request</param>
 /// <returns>Result of the request and its data</returns>
 public ResultData <T> PostData <T>(string cgiPath, string api, SynologyPostParameters parameters) => Connection.PostDataFromApi <T>(cgiPath, api, parameters.Version, parameters.Method, parameters.Additional);
Esempio n. 6
0
 /// <summary>
 /// Perform asynchronous post requests returning generic success / error data
 /// </summary>
 /// <param name="api"></param>
 /// <param name="cgiPath">Path of the cgi handling the request</param>
 /// <param name="apiName">Name of the API handling the request</param>
 /// <param name="parameters">Parameters of the request</param>
 /// <returns>Result of the request</returns>
 internal static async Task <ResultData> PostDataAsync(this ISynologyApi api, string cgiPath, string apiName, SynologyPostParameters parameters) => await api.Connection.PostDataFromApiAsync(cgiPath, apiName, parameters.Version, parameters.Method, parameters.Additional);
Esempio n. 7
0
 /// <summary>
 /// Perform post requests returning generic success / error data
 /// </summary>
 /// <param name="api"></param>
 /// <param name="cgiPath">Path of the cgi handling the request</param>
 /// <param name="apiName">Name of the API handling the request</param>
 /// <param name="parameters">Parameters of the request</param>
 /// <returns>Result of the request</returns>
 internal static ResultData PostData(this ISynologyApi api, string cgiPath, string apiName, SynologyPostParameters parameters) => api.Connection.PostDataFromApi(cgiPath, apiName, parameters.Version, parameters.Method, parameters.Additional);
Esempio n. 8
0
 /// <summary>
 /// Posts the data async.
 /// </summary>
 /// <returns>The data async.</returns>
 /// <param name="request">Request.</param>
 /// <param name="parameters">Parameters.</param>
 internal static async Task <ResultData> PostDataAsync(this ISynologyRequest request, SynologyPostParameters parameters) => await request.Api.PostDataAsync(await request.CgiPathAsync(), request.ApiName, parameters);