From b4d86d07dcce428f2513c0722e2101a26663f5e4 Mon Sep 17 00:00:00 2001 From: Sarmad Date: Sun, 7 Feb 2016 19:15:31 +0500 Subject: [PATCH] added new parameters to RepositoryRequest.cs --- Octokit/Models/Request/RepositoryRequest.cs | 84 +++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/Octokit/Models/Request/RepositoryRequest.cs b/Octokit/Models/Request/RepositoryRequest.cs index f22b881f..7806171f 100644 --- a/Octokit/Models/Request/RepositoryRequest.cs +++ b/Octokit/Models/Request/RepositoryRequest.cs @@ -37,6 +37,24 @@ namespace Octokit /// public SortDirection Direction { get; set; } + /// + /// Gets or sets the visibility property. + /// + /// + /// The public. + /// + + public RepositoryVisibility Visibility { get; set; } + + /// + /// Gets or sets the affiliation property. + /// + /// + /// The owner. + /// + + public RepositoryAffiliation Affiliation { get; set; } + internal string DebuggerDisplay { get @@ -103,4 +121,70 @@ namespace Octokit [Parameter(Value = "full_name")] FullName } + + + public enum RepositoryVisibility + { + /// + /// Returns only public repositories + /// + Public, + + /// + /// Returns only private repositories + /// + Private, + + /// + /// Return both public and private repositories + /// + All, + + } + + + public enum RepositoryAffiliation + { + /// + /// Repositories that are owned by the authenticated user + /// + Owner, + + /// + /// Repositories that the user has been added to as a collaborator. + /// + Collaborator, + + /// + /// Repositories that the user has access to through being a member of an organization. + /// This includes every repository on every team that the user is on. + /// + [Parameter(Value = "organization_member")] + OrganizationMember, + + /// + /// Return repositories that are owned by authenticated user and added to as a collaborator. + /// + [Parameter(Value = "owner, collaborator")] + OwnerAndCollaborator, + + /// + /// Return repositories that are owned by authenticated user and user is a member of organization. + /// + [Parameter(Value = "owner, organization_member")] + OwnerAndOrganizationMember, + + /// + /// Return repositories that user has been added as collaborator and user is a member of organization. + /// + [Parameter(Value = "collaborator, organization_member")] + CollaboratorAndOrganizationMember, + + /// + /// Returns all repositories where user is owner,collaborator and organization member. + /// + [Parameter(Value = "owner, collaborator, organization_member")] + All + + } }