stacky / trunk / source / Stacky / StackyClient / BadgeMethods.cs

lfoust ba39825 


lfoust 846c496 




lfoust ba39825 
lfoust 846c496 
lfoust ba39825 

lfoust 846c496 

lfoust ba39825 
lfoust 3c39545 
lfoust ba39825 
lfoust 3c39545 
lfoust 65cbffa 
lfoust ba39825 





lfoust 65cbffa 
lfoust ba39825 




























lfoust 846c496 
using System;
using System.Collections.Generic;
using System.Linq;

namespace Stacky
{
    public partial class StackyClient
    {
        public virtual IPagedList<Badge> GetBadges(BadgeSort? sortBy = null, SortDirection? sortDirection = null, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, BadgeMinMax? min = null, BadgeMinMax? max = null, string filter = null)
        {
			return Execute<Badge, BadgeMinMax>("badges", null,
				sortBy, sortDirection, page, pageSize, fromDate, toDate, min, max, filter);
        }

		public virtual Badge GetBadge(int id, string filter = null)
		{
			return GetBadges(id.ToArray(), filter: filter).FirstOrDefault();
		}

		public virtual IPagedList<Badge> GetBadges(IEnumerable<int> ids, BadgeSort? sortBy = null, SortDirection? sortDirection = null, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, DateTime? min = null, DateTime? max = null, string filter = null)
		{
			ValidateVectorizedParameters(ids);
			return Execute<Badge>("badges", new string[] { ids.Vectorize() },
				sortBy, sortDirection, page, pageSize, fromDate, toDate, min, max, filter);
		}

		public virtual IPagedList<Badge> GetNamedBadges(BadgeSort? sortBy = null, SortDirection? sortDirection = null, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, BadgeMinMax? min = null, BadgeMinMax? max = null, string filter = null)
		{
			return Execute<Badge, BadgeMinMax>("badges", new string[] { "name" },
				sortBy, sortDirection, page, pageSize, fromDate, toDate, min, max, filter);
		}

		public virtual IPagedList<Badge> GetRecentlyAwardedBadges(int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, string filter = null)
		{
			return Execute<Badge, BadgeMinMax>("badges", new string[] { "recipients" },
				null, null, page, pageSize, fromDate, toDate, null, null, filter);
		}

		public virtual IPagedList<Badge> GetRecentlyAwardedBadges(int id, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, string filter = null)
		{
			return GetRecentlyAwardedBadges(id.ToArray(), page, pageSize, fromDate, toDate, filter);
		}

		public virtual IPagedList<Badge> GetRecentlyAwardedBadges(IEnumerable<int> ids, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, string filter = null)
		{
			ValidateVectorizedParameters(ids);
			return Execute<Badge, BadgeMinMax>("badges", new string[] { ids.Vectorize(), "recipients" },
				null, null, page, pageSize, fromDate, toDate, null, null, filter);
		}

		public virtual IPagedList<Badge> GetTagBasedBadges(BadgeSort? sortBy = null, SortDirection? sortDirection = null, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, BadgeMinMax? min = null, BadgeMinMax? max = null, string filter = null)
		{
			return Execute<Badge, BadgeMinMax>("badges", new string[] { "tags" },
				sortBy, sortDirection, page, pageSize, fromDate, toDate, min, max, filter);
		}
    }
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.