public static T Delete <T>(string path, string resourceId, string presetName = "maestrano") { var request = new RestRequest(); request.Resource = path; request.Method = Method.DELETE; request.AddUrlSegment("id", resourceId); return(MnoClient.ProjectSingleObject <T>(request, presetName)); }
public static T Retrieve <T>(string path, string resourceId) { var request = new RestRequest(); request.Resource = path; request.Method = Method.GET; request.AddUrlSegment("id", resourceId); return(MnoClient.ProjectSingleObject <T>(request)); }
public static T Create <T>(string path, NameValueCollection parameters, string presetName = "maestrano") { var request = new RestRequest(); request.Resource = path; request.Method = Method.POST; foreach (var k in parameters.AllKeys) { request.AddParameter(StringExtensions.ToSnakeCase(k), parameters[k]); } return(MnoClient.ProjectSingleObject <T>(request, presetName)); }