public GetRecordsRequest(YastAuthToken token) : base(token.User, token.Hash) { TypeId = new List<int>(); ProjectId = new List<int>(); ParentId = new List<int>(); }
public GetProjectsResponse GetProjects(YastAuthToken token) { var request = new GetProjectsRequest(token); var response = Post(request); return new GetProjectsResponse(response); }
public AddRecordsResponse AddRecords(YastAuthToken token, params YastElement[] records) { var request = new AddRecordsRequest(token, records); var response = Post(request); return new AddRecordsResponse(response); }
public GetRecordTypesResponse GetRecordTypes(YastAuthToken token) { var request = new GetRecordTypesRequest(token); var response = Post(request); return new GetRecordTypesResponse(response); }
public GetReportRequest(YastAuthToken token, string reportFormat) : base(token.User, token.Hash) { ReportFormat = reportFormat; TypeId = new List<int>(); ParentId = new List<int>(); GroupBy = new List<string>(); Constraints = new List<string>(); }
public Uri GetDownloadUrl(Uri baseUri, YastAuthToken token) { return new Uri( baseUri, string.Format("/file.php?type=report&id={0}&hash={1}&user={2}&userhash={3}", ReportId, ReportHash, HttpUtility.UrlEncode(token.User), token.Hash)); }
public GetRecordsResponse GetRecords(YastAuthToken token, DateTime? timeFrom = null, DateTime? timeTo = null, int? requestId = null) { var request = new GetRecordsRequest(token) { RequestId = requestId }; if (timeFrom.HasValue) request.TimeFrom = timeFrom; if (timeTo.HasValue) request.TimeTo = timeTo; var response = Post(request); return new GetRecordsResponse(response); }
public GetReportResponse GetReport(YastAuthToken token, string reportFormat, DateTime? timeFrom = null, DateTime? timeTo = null, List<string> groupBy = null, int? requestId = null) { var request = new GetReportRequest(token, reportFormat) { RequestId = requestId }; if (timeFrom.HasValue) request.TimeFrom = timeFrom; if (timeTo.HasValue) request.TimeTo = timeTo; if (groupBy != null) request.GroupBy = groupBy; var response = Post(request); return new GetReportResponse(response); }
public AddRecordsRequest(YastAuthToken token, params YastElement[] objects) : base(token.User, token.Hash) { Objects = new List<YastElement>(objects); }
public GetUserInfoRequest(YastAuthToken token) : base(token.User, token.Hash) { }
public DeleteRecordsRequest(YastAuthToken token) : base(token.User, token.Hash) { }
public GetFoldersRequest(YastAuthToken token) : base(token.User, token.Hash) { }
public GetUserSettingsRequest(YastAuthToken token) : base(token.User, token.Hash) { }
public GetProjectsRequest(YastAuthToken token) : base(token.User, token.Hash) { }
public GetUserSettingsResponse GetUserSettings(YastAuthToken token) { var request = new GetUserSettingsRequest(token); var response = Post(request); return new GetUserSettingsResponse(response); }
public GetUserInfoResponse GetUserInfo(YastAuthToken token, int? requestId = null) { var request = new GetUserInfoRequest(token) { RequestId = requestId }; var response = Post(request); return new GetUserInfoResponse(response); }
public GetRecordTypesRequest(YastAuthToken token) : base(token.User, token.Hash) { }