Beispiel #1
0
        public virtual IPagedList <TagSynonym> GetAllTagSynonyms(TagSynonymSort sortBy = TagSynonymSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, int?min = null, int?max = null)
        {
            var response = MakeRequest <TagSynonymResponse>("tags", new string[] { "synonyms" }, new
            {
                key      = apiKey,
                page     = page ?? null,
                pagesize = pageSize ?? null,
                sort     = sortBy.ToString(),
                order    = GetSortDirection(sortDirection),
                max      = max,
                min      = min
            });

            return(new PagedList <TagSynonym>(response.TagSynonyms, response));
        }
Beispiel #2
0
        public virtual IPagedList <TagSynonym> GetTagSynonyms(IEnumerable <string> tags, TagSynonymSort sortBy = TagSynonymSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, int?min = null, int?max = null, DateTime?fromDate = null, DateTime?toDate = null)
        {
            var response = MakeRequest <TagSynonymResponse>("tags", new string[] { tags.Vectorize(), "synonyms" }, new
            {
                key      = apiKey,
                page     = page ?? null,
                pagesize = pageSize ?? null,
                sort     = sortBy.ToString(),
                order    = GetSortDirection(sortDirection),
                max      = max,
                min      = min,
                fromdate = fromDate.HasValue ? (long?)fromDate.Value.ToUnixTime() : null,
                todate   = toDate.HasValue ? (long?)toDate.Value.ToUnixTime() : null
            });

            return(new PagedList <TagSynonym>(response.TagSynonyms, response));
        }
Beispiel #3
0
 public virtual IPagedList <TagSynonym> GetTagSynonyms(string tag, TagSynonymSort sortBy = TagSynonymSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, int?min = null, int?max = null, DateTime?fromDate = null, DateTime?toDate = null)
 {
     return(GetTagSynonyms(new string[] { tag }, sortBy, sortDirection, page, pageSize, min, max, fromDate, toDate));
 }
Beispiel #4
0
 public virtual void GetTagSynonyms(Action <IPagedList <TagSynonym> > onSuccess, Action <ApiException> onError, IEnumerable <string> tags, TagSynonymSort sortBy = TagSynonymSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, int?min = null, int?max = null, DateTime?fromDate = null, DateTime?toDate = null)
 {
     MakeRequest <TagSynonymResponse>("tags", new string[] { tags.Vectorize(), "synonyms" }, new
     {
         key      = apiKey,
         page     = page ?? null,
         pagesize = pageSize ?? null,
         sort     = sortBy.ToString(),
         order    = GetSortDirection(sortDirection),
         max      = max,
         min      = min,
         fromdate = fromDate.HasValue ? (long?)fromDate.Value.ToUnixTime() : null,
         todate   = toDate.HasValue ? (long?)toDate.Value.ToUnixTime() : null
     }, (items) => onSuccess(new PagedList <TagSynonym>(items.TagSynonyms, items)), onError);
 }
Beispiel #5
0
 public virtual void GetTagSynonyms(Action <IPagedList <TagSynonym> > onSuccess, Action <ApiException> onError, string tag, TagSynonymSort sortBy = TagSynonymSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, int?min = null, int?max = null, DateTime?fromDate = null, DateTime?toDate = null)
 {
     GetTagSynonyms(onSuccess, onError, new string[] { tag }, sortBy, sortDirection, page, pageSize, min, max, fromDate, toDate);
 }
Beispiel #6
0
 public virtual void GetAllTagSynonyms(Action <IPagedList <TagSynonym> > onSuccess, Action <ApiException> onError, TagSynonymSort sortBy = TagSynonymSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, int?min = null, int?max = null)
 {
     MakeRequest <TagSynonymResponse>("tags", new string[] { "synonyms" }, new
     {
         key      = apiKey,
         page     = page ?? null,
         pagesize = pageSize ?? null,
         sort     = sortBy.ToString(),
         order    = GetSortDirection(sortDirection),
         max      = max,
         min      = min
     }, (items) => onSuccess(new PagedList <TagSynonym>(items.TagSynonyms, items)), onError);
 }