diff --git a/confluence/internal/attachment_impl.go b/confluence/internal/attachment_impl.go index 41b03c8f..c71e9a37 100644 --- a/confluence/internal/attachment_impl.go +++ b/confluence/internal/attachment_impl.go @@ -56,6 +56,8 @@ func (a *AttachmentService) Gets(ctx context.Context, entityID int, entityType s // Delete deletes an attachment by id. // // DELETE /wiki/api/v2/attachments/{id} +// +// https://docs.go-atlassian.io/confluence-cloud/v2/attachments#delete-attachment func (a *AttachmentService) Delete(ctx context.Context, attachmentID string) (*model.ResponseScheme, error) { return a.internalClient.Delete(ctx, attachmentID) } diff --git a/confluence/internal/attachment_version_impl.go b/confluence/internal/attachment_version_impl.go index d9686bcc..b344d8ff 100644 --- a/confluence/internal/attachment_version_impl.go +++ b/confluence/internal/attachment_version_impl.go @@ -25,6 +25,8 @@ type AttachmentVersionService struct { // Gets returns the versions of specific attachment. // // GET /wiki/api/v2/attachments/{id}/versions +// +// https://docs.go-atlassian.io/confluence-cloud/v2/attachments/versions#get-attachment-versions func (a *AttachmentVersionService) Gets(ctx context.Context, attachmentID, cursor, sort string, limit int) (*model.AttachmentVersionPageScheme, *model.ResponseScheme, error) { return a.internalClient.Gets(ctx, attachmentID, cursor, sort, limit) } @@ -32,6 +34,8 @@ func (a *AttachmentVersionService) Gets(ctx context.Context, attachmentID, curso // Get retrieves version details for the specified attachment and version number. // // GET /wiki/api/v2/attachments/{attachment-id}/versions/{version-number} +// +// https://docs.go-atlassian.io/confluence-cloud/v2/attachments/versions#get-attachment-version func (a *AttachmentVersionService) Get(ctx context.Context, attachmentID string, versionID int) (*model.DetailedVersionScheme, *model.ResponseScheme, error) { return a.internalClient.Get(ctx, attachmentID, versionID) } diff --git a/confluence/internal/custom_content_impl.go b/confluence/internal/custom_content_impl.go index 72a77578..b5489ac9 100644 --- a/confluence/internal/custom_content_impl.go +++ b/confluence/internal/custom_content_impl.go @@ -25,11 +25,9 @@ type CustomContentService struct { // Gets returns all custom content for a given type. // -// # The number of results is limited by the limit parameter and additional results (if available) will be available -// -// through the next URL present in the Link response header. -// // GET /wiki/api/v2/custom-content +// +// https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#get-custom-content-by-type func (c *CustomContentService) Gets(ctx context.Context, type_ string, options *model.CustomContentOptionsScheme, cursor string, limit int) (*model.CustomContentPageScheme, *model.ResponseScheme, error) { return c.internalClient.Gets(ctx, type_, options, cursor, limit) } @@ -37,6 +35,8 @@ func (c *CustomContentService) Gets(ctx context.Context, type_ string, options * // Create creates a new custom content in the given space, page, blogpost or other custom content. // // POST /wiki/api/v2/custom-content +// +// https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#create-custom-content func (c *CustomContentService) Create(ctx context.Context, payload *model.CustomContentPayloadScheme) (*model.CustomContentScheme, *model.ResponseScheme, error) { return c.internalClient.Create(ctx, payload) } @@ -44,6 +44,8 @@ func (c *CustomContentService) Create(ctx context.Context, payload *model.Custom // Get returns a specific piece of custom content. // // GET /wiki/api/v2/custom-content/{id} +// +// https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#get-custom-content-by-id func (c *CustomContentService) Get(ctx context.Context, customContentID int, format string, versionID int) (*model.CustomContentScheme, *model.ResponseScheme, error) { return c.internalClient.Get(ctx, customContentID, format, versionID) } @@ -55,6 +57,8 @@ func (c *CustomContentService) Get(ctx context.Context, customContentID int, for // or customContentId is allowed in the request body // // PUT /wiki/api/v2/custom-content/{id} +// +// https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#update-custom-content func (c *CustomContentService) Update(ctx context.Context, customContentID int, payload *model.CustomContentPayloadScheme) (*model.CustomContentScheme, *model.ResponseScheme, error) { return c.internalClient.Update(ctx, customContentID, payload) } @@ -62,6 +66,8 @@ func (c *CustomContentService) Update(ctx context.Context, customContentID int, // Delete deletes a custom content by id. // // DELETE /wiki/api/v2/custom-content/{id} +// +// https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#delete-custom-content func (c *CustomContentService) Delete(ctx context.Context, customContentID int) (*model.ResponseScheme, error) { return c.internalClient.Delete(ctx, customContentID) } diff --git a/service/confluence/attachment.go b/service/confluence/attachment.go index 81768b07..5989b1df 100644 --- a/service/confluence/attachment.go +++ b/service/confluence/attachment.go @@ -69,6 +69,8 @@ type AttachmentConnector interface { // Delete deletes an attachment by id. // // DELETE /wiki/api/v2/attachments/{id} + // + // https://docs.go-atlassian.io/confluence-cloud/v2/attachments#delete-attachment Delete(ctx context.Context, attachmentID string) (*model.ResponseScheme, error) } @@ -77,10 +79,14 @@ type AttachmentVersionConnector interface { // Gets returns the versions of specific attachment. // // GET /wiki/api/v2/attachments/{id}/versions + // + // https://docs.go-atlassian.io/confluence-cloud/v2/attachments/versions#get-attachment-versions Gets(ctx context.Context, attachmentID, cursor, sort string, limit int) (*model.AttachmentVersionPageScheme, *model.ResponseScheme, error) // Get retrieves version details for the specified attachment and version number. // // GET /wiki/api/v2/attachments/{attachment-id}/versions/{version-number} + // + // https://docs.go-atlassian.io/confluence-cloud/v2/attachments/versions#get-attachment-version Get(ctx context.Context, attachmentID string, versionID int) (*model.DetailedVersionScheme, *model.ResponseScheme, error) } diff --git a/service/confluence/custom-content.go b/service/confluence/custom-content.go index e47d5baa..6ae411c7 100644 --- a/service/confluence/custom-content.go +++ b/service/confluence/custom-content.go @@ -9,22 +9,24 @@ type CustomContentConnector interface { // Gets returns all custom content for a given type. // - // The number of results is limited by the limit parameter and additional results (if available) will be available - // - // through the next URL present in the Link response header. - // // GET /wiki/api/v2/custom-content + // + // https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#get-custom-content-by-type Gets(ctx context.Context, type_ string, options *models.CustomContentOptionsScheme, cursor string, limit int) ( *models.CustomContentPageScheme, *models.ResponseScheme, error) // Create creates a new custom content in the given space, page, blogpost or other custom content. // // POST /wiki/api/v2/custom-content + // + // https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#create-custom-content Create(ctx context.Context, payload *models.CustomContentPayloadScheme) (*models.CustomContentScheme, *models.ResponseScheme, error) // Get returns a specific piece of custom content. // // GET /wiki/api/v2/custom-content/{id} + // + // https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#get-custom-content-by-id Get(ctx context.Context, customContentID int, format string, versionID int) (*models.CustomContentScheme, *models.ResponseScheme, error) // Update updates a custom content by id. @@ -34,10 +36,14 @@ type CustomContentConnector interface { // or customContentId is allowed in the request body // // PUT /wiki/api/v2/custom-content/{id} + // + // https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#update-custom-content Update(ctx context.Context, customContentID int, payload *models.CustomContentPayloadScheme) (*models.CustomContentScheme, *models.ResponseScheme, error) // Delete deletes a custom content by id. // // DELETE /wiki/api/v2/custom-content/{id} + // + // https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#delete-custom-content Delete(ctx context.Context, customContentID int) (*models.ResponseScheme, error) }