public Task<IEnumerable<Repository>> GetOrganizationRepositoriesAsync(string organization, RepositoryQueryType type, int pageSize) { if (type == RepositoryQueryType.Owner) { throw new NotSupportedException(); } return this.GetRepositoriesCore(string.Format("/orgs/{0}/repos?type={1}&per_page={2}", organization, queryTypes[type], pageSize)); }
private static object ReturnForRepository(EntityList list, RepositoryQueryType queryType) { switch (queryType) { case RepositoryQueryType.First: return DisconnectFirst(list); case RepositoryQueryType.Count: return list.TotalCount; case RepositoryQueryType.Table: throw new InvalidOperationException(); case RepositoryQueryType.List: default: return list; } }
internal void SetQueryType(RepositoryQueryType value) { _queryType = value; }
public Task<IEnumerable<Repository>> GetRepositoriesAsync(RepositoryQueryType type, RepositoryQuerySort sort, RepositoryQueryDirection direction) { return this.GetRepositoriesCore(string.Format("/user/repos?type={0}&sort={1}&direction={2}", queryTypes[type], querySorts[sort], queryDirections[direction])); }
public Task<IEnumerable<Repository>> GetRepositoriesAsync(RepositoryQueryType type) { return this.GetRepositoriesCore(string.Format("/user/repos?type={0}", queryTypes[type])); }
public Task<IEnumerable<Repository>> GetUserRepositoriesAsync(string username, RepositoryQueryType type) { if (type == RepositoryQueryType.Private && type == RepositoryQueryType.Public) { throw new NotSupportedException(); } return this.GetRepositoriesCore(string.Format("/users/{0}/repos?type={1}", username, queryTypes[type])); }