@@ -30,7 +30,7 @@ type OrganizationsService interface {
3030 Invitations (context.Context , string , * InvitationOptions ) ([]* Invitation , * Response , error )
3131 Get (context.Context , string ) (* Organization , * Response , error )
3232 Invitation (context.Context , string , string ) (* Invitation , * Response , error )
33- Projects (context.Context , string , * ListOptions ) (* Projects , * Response , error )
33+ Projects (context.Context , string , * ProjectsListOptions ) (* Projects , * Response , error )
3434 Users (context.Context , string , * ListOptions ) (* AtlasUsersResponse , * Response , error )
3535 Delete (context.Context , string ) (* Response , error )
3636 InviteUser (context.Context , string , * Invitation ) (* Invitation , * Response , error )
@@ -51,6 +51,12 @@ type OrganizationsListOptions struct {
5151 ListOptions
5252}
5353
54+ // ProjectsListOptions filtering options for projects.
55+ type ProjectsListOptions struct {
56+ Name string `url:"name,omitempty"`
57+ ListOptions
58+ }
59+
5460// Organization represents the structure of an organization.
5561type Organization struct {
5662 ID string `json:"id,omitempty"`
@@ -120,7 +126,7 @@ func (s *OrganizationsServiceOp) Get(ctx context.Context, orgID string) (*Organi
120126// Projects gets all projects for the given organization ID.
121127//
122128// See more: https://docs.atlas.mongodb.com/reference/api/organization-get-all-projects/
123- func (s * OrganizationsServiceOp ) Projects (ctx context.Context , orgID string , opts * ListOptions ) (* Projects , * Response , error ) {
129+ func (s * OrganizationsServiceOp ) Projects (ctx context.Context , orgID string , opts * ProjectsListOptions ) (* Projects , * Response , error ) {
124130 if orgID == "" {
125131 return nil , nil , NewArgError ("orgID" , "must be set" )
126132 }
0 commit comments