Skip to content

Commit a6606c1

Browse files
authored
docs(account): reworked account api doc (#1583)
1 parent 398c378 commit a6606c1

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

api/account/v2/account_sdk.go

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -85,40 +85,40 @@ func (enum *ListProjectsRequestOrderBy) UnmarshalJSON(data []byte) error {
8585

8686
// ListProjectsResponse: list projects response.
8787
type ListProjectsResponse struct {
88-
// TotalCount: the total number of projects.
88+
// TotalCount: total number of Projects.
8989
TotalCount uint32 `json:"total_count"`
90-
// Projects: the paginated returned projects.
90+
// Projects: paginated returned Projects.
9191
Projects []*Project `json:"projects"`
9292
}
9393

9494
// Project: project.
9595
type Project struct {
96-
// ID: the ID of the project.
96+
// ID: ID of the Project.
9797
ID string `json:"id"`
98-
// Name: the name of the project.
98+
// Name: name of the Project.
9999
Name string `json:"name"`
100-
// OrganizationID: the organization ID of the project.
100+
// OrganizationID: organization ID of the Project.
101101
OrganizationID string `json:"organization_id"`
102-
// CreatedAt: the creation date of the project.
102+
// CreatedAt: creation date of the Project.
103103
CreatedAt *time.Time `json:"created_at"`
104-
// UpdatedAt: the update date of the project.
104+
// UpdatedAt: update date of the Project.
105105
UpdatedAt *time.Time `json:"updated_at"`
106-
// Description: the description of the project.
106+
// Description: description of the Project.
107107
Description string `json:"description"`
108108
}
109109

110110
// Service API
111111

112112
type CreateProjectRequest struct {
113-
// Name: the name of the project.
113+
// Name: name of the Project.
114114
Name string `json:"name"`
115-
// OrganizationID: the organization ID of the project.
115+
// OrganizationID: organization ID of the Project.
116116
OrganizationID string `json:"organization_id"`
117-
// Description: the description of the project.
117+
// Description: description of the Project.
118118
Description *string `json:"description"`
119119
}
120120

121-
// CreateProject: create project.
121+
// CreateProject: generate a new Project for an Organization, specifying its configuration including name and description.
122122
func (s *API) CreateProject(req *CreateProjectRequest, opts ...scw.RequestOption) (*Project, error) {
123123
var err error
124124

@@ -148,22 +148,22 @@ func (s *API) CreateProject(req *CreateProjectRequest, opts ...scw.RequestOption
148148
}
149149

150150
type ListProjectsRequest struct {
151-
// OrganizationID: the organization ID of the project.
151+
// OrganizationID: organization ID of the Project.
152152
OrganizationID string `json:"-"`
153-
// Name: the name of the project.
153+
// Name: name of the Project.
154154
Name *string `json:"-"`
155-
// Page: the page number for the returned projects.
155+
// Page: page number for the returned Projects.
156156
Page *int32 `json:"-"`
157-
// PageSize: the maximum number of project per page.
157+
// PageSize: maximum number of Project per page.
158158
PageSize *uint32 `json:"-"`
159-
// OrderBy: the sort order of the returned projects.
159+
// OrderBy: sort order of the returned Projects.
160160
// Default value: created_at_asc
161161
OrderBy ListProjectsRequestOrderBy `json:"-"`
162-
// ProjectIDs: filter out by a list of project ID.
162+
// ProjectIDs: project IDs to filter for. The results will be limited to any Projects with an ID in this array.
163163
ProjectIDs []string `json:"-"`
164164
}
165165

166-
// ListProjects: list projects.
166+
// ListProjects: list all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project.
167167
func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error) {
168168
var err error
169169

@@ -202,11 +202,11 @@ func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption)
202202
}
203203

204204
type GetProjectRequest struct {
205-
// ProjectID: the project ID of the project.
205+
// ProjectID: project ID of the Project.
206206
ProjectID string `json:"-"`
207207
}
208208

209-
// GetProject: get project.
209+
// GetProject: retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.
210210
func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Project, error) {
211211
var err error
212212

@@ -235,11 +235,11 @@ func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Pr
235235
}
236236

237237
type DeleteProjectRequest struct {
238-
// ProjectID: the project ID of the project.
238+
// ProjectID: project ID of the Project.
239239
ProjectID string `json:"-"`
240240
}
241241

242-
// DeleteProject: delete project.
242+
// DeleteProject: delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.
243243
func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption) error {
244244
var err error
245245

@@ -266,15 +266,15 @@ func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption
266266
}
267267

268268
type UpdateProjectRequest struct {
269-
// ProjectID: the project ID of the project.
269+
// ProjectID: project ID of the Project.
270270
ProjectID string `json:"-"`
271-
// Name: the name of the project.
271+
// Name: name of the Project.
272272
Name *string `json:"name"`
273-
// Description: the description of the project.
273+
// Description: description of the Project.
274274
Description *string `json:"description"`
275275
}
276276

277-
// UpdateProject: update project.
277+
// UpdateProject: update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
278278
func (s *API) UpdateProject(req *UpdateProjectRequest, opts ...scw.RequestOption) (*Project, error) {
279279
var err error
280280

0 commit comments

Comments
 (0)