public ReportEntryEnumerator(IWufooDataProvider provider, string reportHash, int pageSize, int pageStart, FilterBuilder filters, Sort sort)
     : base(provider, reportHash, pageSize, pageStart, filters, sort)
 {
 }
Beispiel #2
0
 public string GetEntriesByReportId(string reportHash, int pageStart, int pageSize, FilterBuilder filters, Sort sort)
 {
     string url = _baseUrl + "reports/{0}/entries.json".FormatWith(reportHash);
     return GetEntries(url, pageStart, pageSize, filters, sort);
 }
Beispiel #3
0
 private string GetEntries(string url, int pageStart, int pageSize, FilterBuilder filters, Sort sort)
 {
     Dictionary<string, object> param = new Dictionary<string, object>() { { "pageStart", pageStart }, { "pageSize", pageSize } };
     foreach (var kvp in GetQueryParams(sort))
     {
         param[kvp.Key] = kvp.Value;
     }
     foreach (var kvp in GetQueryParams(filters))
     {
         param[kvp.Key] = kvp.Value;
     }
     return GetData(url, param);
 }
Beispiel #4
0
 private IEnumerable<KeyValuePair<string, object>> GetQueryParams(Sort sort)
 {
     var ret = new Dictionary<string, object>();
     if (sort != null)
     {
         ret["sortDirection"] = sort.Direction.ToString().ToUpper();
         ret["sort"] = sort.Field;
     }
     return ret;
 }
 public FormEntryEnumerator(IWufooDataProvider provider, string formHash, int pageSize, int pageStart, FilterBuilder filters, Sort sort)
     : base(provider, formHash, pageSize, pageStart, filters, sort)
 {
 }