All URIs are relative to https://api.gitbook.com/v1
Method | HTTP request | Description |
---|---|---|
CreateChangeRequest | Post /spaces/{spaceId}/change-requests | Create a new change request for a space. |
CreateSpace | Post /orgs/{organizationId}/spaces | Create an organization space |
CreateSpaceRelation | Post /spaces/{spaceId}/relations | Create a new relation between a source space and a target space |
DeleteCommentInChangeRequest | Delete /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} | Delete a comment in a change request. |
DeleteCommentInSpace | Delete /spaces/{spaceId}/comments/{commentId} | Delete a comment in a space. |
DeleteCommentReplyInChangeRequest | Delete /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} | Delete a comment reply in a change request. |
DeleteCommentReplyInSpace | Delete /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} | Delete a comment reply in a space. |
DeleteSpaceRelation | Delete /spaces/{spaceId}/relations/{targetSpaceId} | Delete a relation between spaces |
DuplicateSpace | Post /spaces/{spaceId}/duplicate | Create a duplicate of the space. |
ExportToGitRepository | Post /spaces/{spaceId}/git/export | Export the space content to a Git repository. |
GetChangeRequestById | Get /spaces/{spaceId}/change-requests/{changeRequestId} | Get the change request with the given id. |
GetCommentInChangeRequest | Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} | Get a comment in a change request. |
GetCommentInSpace | Get /spaces/{spaceId}/comments/{commentId} | Get a comment in a space. |
GetCommentReplyInChangeRequest | Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} | Get a comment reply in a change request. |
GetCommentReplyInSpace | Get /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} | Get a comment reply in a space. |
GetContentAnalyticsForSpaceById | Get /spaces/{spaceId}/insights/content | Get content analytics for a given space. |
GetContributorsByChangeRequestId | Get /spaces/{spaceId}/change-requests/{changeRequestId}/contributors | Get all contributors for the change request with the given id. |
GetRequestedReviewersByChangeRequestId | Get /spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewers | Get all requested reviewers for a change request. |
GetReviewsByChangeRequestId | Get /spaces/{spaceId}/change-requests/{changeRequestId}/reviews | Get all reviews for a change request. |
GetSearchAnalyticsForSpaceById | Get /spaces/{spaceId}/insights/search | Get an overview of the top search queries in a space. |
GetSpaceById | Get /spaces/{spaceId} | Get the details about a space. |
GetSpaceCustomFields | Get /spaces/{spaceId}/custom-fields | Get the values of the custom fields set on a space |
GetSpaceGitInfo | Get /spaces/{spaceId}/git/info | Get metadata about the Git Sync provider currently set up on the space |
GetSpacePublishingAuthById | Get /spaces/{spaceId}/publishing/auth | Get the publishing authentication configuration for a space. |
GetSpaceRelation | Get /spaces/{spaceId}/relations/{targetSpaceId} | Get the relation between 2 spaces. |
GetTrafficAnalyticsForSpaceById | Get /spaces/{spaceId}/insights/traffic | Get traffic page views for a given space |
ImportGitRepository | Post /spaces/{spaceId}/git/import | Import a Git repository |
ListChangeRequestsForSpace | Get /spaces/{spaceId}/change-requests | List change requests for a space. |
ListCommentRepliesInChangeRequest | Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies | List all the replies to a comment in a change request. |
ListCommentRepliesInSpace | Get /spaces/{spaceId}/comments/{commentId}/replies | List all the replies to a comment in a space. |
ListCommentsInChangeRequest | Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments | List all the comments in a change request. |
ListCommentsInSpace | Get /spaces/{spaceId}/comments | List all the comments in a space. |
ListPermissionsAggregateInCollection | Get /collections/{collectionId}/permissions/aggregate | List permissions for all users in a collection. |
ListPermissionsAggregateInSpace | Get /spaces/{spaceId}/permissions/aggregate | List permissions for all users in a space. |
ListSpaceRelations | Get /spaces/{spaceId}/relations | List all relations for a space |
ListSpaceRelationsInOrganization | Get /orgs/{organizationId}/space-relations | List all relations between spaces in an organization |
ListSpacesForOrganizationMember | Get /orgs/{organizationId}/members/{userId}/spaces | List permissions accross all spaces for a member of an organization |
MergeChangeRequest | Post /spaces/{spaceId}/change-requests/{changeRequestId}/merge | Merge a change request in the primary content of a space. |
PostCommentInChangeRequest | Post /spaces/{spaceId}/change-requests/{changeRequestId}/comments | Post a new comment in a change request. |
PostCommentInSpace | Post /spaces/{spaceId}/comments | Post a new comment in a space. |
PostCommentReplyInChangeRequest | Post /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies | Post a new reply to a comment in a change request. |
PostCommentReplyInSpace | Post /spaces/{spaceId}/comments/{commentId}/replies | Post a new reply to a comment in a space. |
RequestReviewersForChangeRequest | Post /spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewers | Request reviewers on a change request. Note that requesting a review from teams is not yet supported. |
SubmitChangeRequestReview | Post /spaces/{spaceId}/change-requests/{changeRequestId}/reviews | Submit a review for a change request. |
TrackViewInSpaceById | Post /spaces/{spaceId}/insights/track_view | |
UpdateChangeRequest | Post /spaces/{spaceId}/change-requests/{changeRequestId}/update | Update a change-request with changes from primary content. |
UpdateCommentInChangeRequest | Put /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} | Update a comment in a change request. |
UpdateCommentInSpace | Put /spaces/{spaceId}/comments/{commentId} | Update a comment in a space. |
UpdateCommentReplyInChangeRequest | Put /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} | Update a comment reply in a change request. |
UpdateCommentReplyInSpace | Put /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} | Update a comment reply in a space. |
UpdateSpaceById | Patch /spaces/{spaceId} | Update the details of a space |
UpdateSpaceCustomFields | Patch /spaces/{spaceId}/custom-fields | Update the custom fields in a space |
UpdateSpacePublishingAuthById | Post /spaces/{spaceId}/publishing/auth | Update the publishing authentication configuration for a space. |
CreateChangeRequest201Response CreateChangeRequest(ctx, spaceId).RequestCreateChangeRequest(requestCreateChangeRequest).Execute()
Create a new change request for a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
requestCreateChangeRequest := *openapiclient.NewRequestCreateChangeRequest() // RequestCreateChangeRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.CreateChangeRequest(context.Background(), spaceId).RequestCreateChangeRequest(requestCreateChangeRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.CreateChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateChangeRequest`: CreateChangeRequest201Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.CreateChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiCreateChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestCreateChangeRequest | RequestCreateChangeRequest | |
CreateChangeRequest201Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Space CreateSpace(ctx, organizationId).RequestCreateSpace(requestCreateSpace).Execute()
Create an organization space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
organizationId := "organizationId_example" // string | The unique id of the organization
requestCreateSpace := *openapiclient.NewRequestCreateSpace() // RequestCreateSpace | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.CreateSpace(context.Background(), organizationId).RequestCreateSpace(requestCreateSpace).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.CreateSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSpace`: Space
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.CreateSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | The unique id of the organization |
Other parameters are passed through a pointer to a apiCreateSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestCreateSpace | RequestCreateSpace | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SpaceRelation CreateSpaceRelation(ctx, spaceId).CreateSpaceRelationRequest(createSpaceRelationRequest).Execute()
Create a new relation between a source space and a target space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
createSpaceRelationRequest := *openapiclient.NewCreateSpaceRelationRequest("Target_example", openapiclient.SpaceRelationType("dependsOn")) // CreateSpaceRelationRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.CreateSpaceRelation(context.Background(), spaceId).CreateSpaceRelationRequest(createSpaceRelationRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.CreateSpaceRelation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSpaceRelation`: SpaceRelation
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.CreateSpaceRelation`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiCreateSpaceRelationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createSpaceRelationRequest | CreateSpaceRelationRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCommentInChangeRequest(ctx, spaceId, changeRequestId, commentId).Execute()
Delete a comment in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.DeleteCommentInChangeRequest(context.Background(), spaceId, changeRequestId, commentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.DeleteCommentInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiDeleteCommentInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCommentInSpace(ctx, spaceId, commentId).Execute()
Delete a comment in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.DeleteCommentInSpace(context.Background(), spaceId, commentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.DeleteCommentInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiDeleteCommentInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCommentReplyInChangeRequest(ctx, spaceId, changeRequestId, commentId, commentReplyId).Execute()
Delete a comment reply in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
commentReplyId := "commentReplyId_example" // string | The unique id of the comment reply
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.DeleteCommentReplyInChangeRequest(context.Background(), spaceId, changeRequestId, commentId, commentReplyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.DeleteCommentReplyInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment | |
commentReplyId | string | The unique id of the comment reply |
Other parameters are passed through a pointer to a apiDeleteCommentReplyInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCommentReplyInSpace(ctx, spaceId, commentId, commentReplyId).Execute()
Delete a comment reply in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
commentReplyId := "commentReplyId_example" // string | The unique id of the comment reply
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.DeleteCommentReplyInSpace(context.Background(), spaceId, commentId, commentReplyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.DeleteCommentReplyInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment | |
commentReplyId | string | The unique id of the comment reply |
Other parameters are passed through a pointer to a apiDeleteCommentReplyInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSpaceRelation(ctx, spaceId, targetSpaceId).Execute()
Delete a relation between spaces
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
targetSpaceId := "targetSpaceId_example" // string | The ID of the other space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.DeleteSpaceRelation(context.Background(), spaceId, targetSpaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.DeleteSpaceRelation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
targetSpaceId | string | The ID of the other space |
Other parameters are passed through a pointer to a apiDeleteSpaceRelationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Space DuplicateSpace(ctx, spaceId).Execute()
Create a duplicate of the space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.DuplicateSpace(context.Background(), spaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.DuplicateSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DuplicateSpace`: Space
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.DuplicateSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiDuplicateSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExportToGitRepository(ctx, spaceId).RequestExportToGitRepository(requestExportToGitRepository).Execute()
Export the space content to a Git repository.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
requestExportToGitRepository := *openapiclient.NewRequestExportToGitRepository("Url_example", "Ref_example", "CommitMessage_example") // RequestExportToGitRepository |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.ExportToGitRepository(context.Background(), spaceId).RequestExportToGitRepository(requestExportToGitRepository).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ExportToGitRepository``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiExportToGitRepositoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestExportToGitRepository | RequestExportToGitRepository | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChangeRequest GetChangeRequestById(ctx, spaceId, changeRequestId).Execute()
Get the change request with the given id.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetChangeRequestById(context.Background(), spaceId, changeRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetChangeRequestById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetChangeRequestById`: ChangeRequest
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetChangeRequestById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiGetChangeRequestByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Comment GetCommentInChangeRequest(ctx, spaceId, changeRequestId, commentId).Format(format).Execute()
Get a comment in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetCommentInChangeRequest(context.Background(), spaceId, changeRequestId, commentId).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetCommentInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCommentInChangeRequest`: Comment
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetCommentInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiGetCommentInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
format | string | Output format for the content. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Comment GetCommentInSpace(ctx, spaceId, commentId).Format(format).Execute()
Get a comment in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetCommentInSpace(context.Background(), spaceId, commentId).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetCommentInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCommentInSpace`: Comment
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetCommentInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiGetCommentInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
format | string | Output format for the content. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentReply GetCommentReplyInChangeRequest(ctx, spaceId, changeRequestId, commentId, commentReplyId).Format(format).Execute()
Get a comment reply in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
commentReplyId := "commentReplyId_example" // string | The unique id of the comment reply
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetCommentReplyInChangeRequest(context.Background(), spaceId, changeRequestId, commentId, commentReplyId).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetCommentReplyInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCommentReplyInChangeRequest`: CommentReply
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetCommentReplyInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment | |
commentReplyId | string | The unique id of the comment reply |
Other parameters are passed through a pointer to a apiGetCommentReplyInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
format | string | Output format for the content. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentReply GetCommentReplyInSpace(ctx, spaceId, commentId, commentReplyId).Format(format).Execute()
Get a comment reply in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
commentReplyId := "commentReplyId_example" // string | The unique id of the comment reply
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetCommentReplyInSpace(context.Background(), spaceId, commentId, commentReplyId).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetCommentReplyInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCommentReplyInSpace`: CommentReply
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetCommentReplyInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment | |
commentReplyId | string | The unique id of the comment reply |
Other parameters are passed through a pointer to a apiGetCommentReplyInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
format | string | Output format for the content. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnalyticsContentPages GetContentAnalyticsForSpaceById(ctx, spaceId).Execute()
Get content analytics for a given space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetContentAnalyticsForSpaceById(context.Background(), spaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetContentAnalyticsForSpaceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContentAnalyticsForSpaceById`: AnalyticsContentPages
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetContentAnalyticsForSpaceById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiGetContentAnalyticsForSpaceByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContributorsByChangeRequestId200Response GetContributorsByChangeRequestId(ctx, spaceId, changeRequestId).Execute()
Get all contributors for the change request with the given id.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetContributorsByChangeRequestId(context.Background(), spaceId, changeRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetContributorsByChangeRequestId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContributorsByChangeRequestId`: GetContributorsByChangeRequestId200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetContributorsByChangeRequestId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiGetContributorsByChangeRequestIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetContributorsByChangeRequestId200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetRequestedReviewersByChangeRequestId200Response GetRequestedReviewersByChangeRequestId(ctx, spaceId, changeRequestId).Page(page).Limit(limit).Execute()
Get all requested reviewers for a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetRequestedReviewersByChangeRequestId(context.Background(), spaceId, changeRequestId).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetRequestedReviewersByChangeRequestId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRequestedReviewersByChangeRequestId`: GetRequestedReviewersByChangeRequestId200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetRequestedReviewersByChangeRequestId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiGetRequestedReviewersByChangeRequestIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page |
GetRequestedReviewersByChangeRequestId200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReviewsByChangeRequestId200Response GetReviewsByChangeRequestId(ctx, spaceId, changeRequestId).Format(format).Page(page).Limit(limit).Execute()
Get all reviews for a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
format := "format_example" // string | Output format for the content. (optional)
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetReviewsByChangeRequestId(context.Background(), spaceId, changeRequestId).Format(format).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetReviewsByChangeRequestId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReviewsByChangeRequestId`: GetReviewsByChangeRequestId200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetReviewsByChangeRequestId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiGetReviewsByChangeRequestIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
format | string | Output format for the content. | page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page |
GetReviewsByChangeRequestId200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnalyticsTopSearches GetSearchAnalyticsForSpaceById(ctx, spaceId).Period(period).Execute()
Get an overview of the top search queries in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
period := openapiclient.AnalyticsSearchPeriod("last_month") // AnalyticsSearchPeriod | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetSearchAnalyticsForSpaceById(context.Background(), spaceId).Period(period).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetSearchAnalyticsForSpaceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSearchAnalyticsForSpaceById`: AnalyticsTopSearches
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetSearchAnalyticsForSpaceById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiGetSearchAnalyticsForSpaceByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
period | AnalyticsSearchPeriod | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Space GetSpaceById(ctx, spaceId).Execute()
Get the details about a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetSpaceById(context.Background(), spaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetSpaceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSpaceById`: Space
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetSpaceById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiGetSpaceByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CustomFieldValuesInner GetSpaceCustomFields(ctx, spaceId).Execute()
Get the values of the custom fields set on a space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetSpaceCustomFields(context.Background(), spaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetSpaceCustomFields``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSpaceCustomFields`: []CustomFieldValuesInner
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetSpaceCustomFields`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiGetSpaceCustomFieldsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GitSyncState GetSpaceGitInfo(ctx, spaceId).Execute()
Get metadata about the Git Sync provider currently set up on the space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetSpaceGitInfo(context.Background(), spaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetSpaceGitInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSpaceGitInfo`: GitSyncState
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetSpaceGitInfo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiGetSpaceGitInfoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContentPublishingAuth GetSpacePublishingAuthById(ctx, spaceId).Execute()
Get the publishing authentication configuration for a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetSpacePublishingAuthById(context.Background(), spaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetSpacePublishingAuthById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSpacePublishingAuthById`: ContentPublishingAuth
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetSpacePublishingAuthById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiGetSpacePublishingAuthByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SpaceRelation GetSpaceRelation(ctx, spaceId, targetSpaceId).Execute()
Get the relation between 2 spaces.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
targetSpaceId := "targetSpaceId_example" // string | The ID of the other space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetSpaceRelation(context.Background(), spaceId, targetSpaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetSpaceRelation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSpaceRelation`: SpaceRelation
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetSpaceRelation`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
targetSpaceId | string | The ID of the other space |
Other parameters are passed through a pointer to a apiGetSpaceRelationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnalyticsTrafficPageViews GetTrafficAnalyticsForSpaceById(ctx, spaceId).Interval(interval).Execute()
Get traffic page views for a given space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
interval := openapiclient.AnalyticsTrafficInterval("daily") // AnalyticsTrafficInterval | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.GetTrafficAnalyticsForSpaceById(context.Background(), spaceId).Interval(interval).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.GetTrafficAnalyticsForSpaceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTrafficAnalyticsForSpaceById`: AnalyticsTrafficPageViews
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.GetTrafficAnalyticsForSpaceById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiGetTrafficAnalyticsForSpaceByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
interval | AnalyticsTrafficInterval | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ImportGitRepository(ctx, spaceId).RequestImportGitRepository(requestImportGitRepository).Execute()
Import a Git repository
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
requestImportGitRepository := *openapiclient.NewRequestImportGitRepository("Url_example", "Ref_example") // RequestImportGitRepository |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.ImportGitRepository(context.Background(), spaceId).RequestImportGitRepository(requestImportGitRepository).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ImportGitRepository``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiImportGitRepositoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestImportGitRepository | RequestImportGitRepository | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListChangeRequestsForSpace200Response ListChangeRequestsForSpace(ctx, spaceId).Page(page).Limit(limit).Status(status).Execute()
List change requests for a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
status := openapiclient.ChangeRequestStatus("draft") // ChangeRequestStatus | If defined, only change requests matching this status will be returned (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListChangeRequestsForSpace(context.Background(), spaceId).Page(page).Limit(limit).Status(status).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListChangeRequestsForSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListChangeRequestsForSpace`: ListChangeRequestsForSpace200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListChangeRequestsForSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiListChangeRequestsForSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | status | ChangeRequestStatus | If defined, only change requests matching this status will be returned |
ListChangeRequestsForSpace200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCommentRepliesInChangeRequest200Response ListCommentRepliesInChangeRequest(ctx, spaceId, changeRequestId, commentId).Page(page).Limit(limit).Format(format).Execute()
List all the replies to a comment in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListCommentRepliesInChangeRequest(context.Background(), spaceId, changeRequestId, commentId).Page(page).Limit(limit).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListCommentRepliesInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCommentRepliesInChangeRequest`: ListCommentRepliesInChangeRequest200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListCommentRepliesInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiListCommentRepliesInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | format | string | Output format for the content. |
ListCommentRepliesInChangeRequest200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCommentRepliesInChangeRequest200Response ListCommentRepliesInSpace(ctx, spaceId, commentId).Page(page).Limit(limit).Format(format).Execute()
List all the replies to a comment in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListCommentRepliesInSpace(context.Background(), spaceId, commentId).Page(page).Limit(limit).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListCommentRepliesInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCommentRepliesInSpace`: ListCommentRepliesInChangeRequest200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListCommentRepliesInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiListCommentRepliesInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | format | string | Output format for the content. |
ListCommentRepliesInChangeRequest200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCommentsInChangeRequest200Response ListCommentsInChangeRequest(ctx, spaceId, changeRequestId).Page(page).Limit(limit).Format(format).Status(status).Execute()
List all the comments in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
format := "format_example" // string | Output format for the content. (optional)
status := "status_example" // string | When provided, only comments with the given status are returned. Only \"all\" is supported for now. (optional) (default to "all")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListCommentsInChangeRequest(context.Background(), spaceId, changeRequestId).Page(page).Limit(limit).Format(format).Status(status).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListCommentsInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCommentsInChangeRequest`: ListCommentsInChangeRequest200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListCommentsInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiListCommentsInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | format | string | Output format for the content. | status | string | When provided, only comments with the given status are returned. Only "all" is supported for now. | [default to "all"]
ListCommentsInChangeRequest200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCommentsInChangeRequest200Response ListCommentsInSpace(ctx, spaceId).Page(page).Limit(limit).Status(status).Format(format).Execute()
List all the comments in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
status := "status_example" // string | When provided, only comments with the given status are returned. Only \"all\" is supported for now. (optional) (default to "all")
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListCommentsInSpace(context.Background(), spaceId).Page(page).Limit(limit).Status(status).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListCommentsInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCommentsInSpace`: ListCommentsInChangeRequest200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListCommentsInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiListCommentsInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | status | string | When provided, only comments with the given status are returned. Only "all" is supported for now. | [default to "all"] format | string | Output format for the content. |
ListCommentsInChangeRequest200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListPermissionsAggregateInSpace200Response ListPermissionsAggregateInCollection(ctx, collectionId).Page(page).Limit(limit).Role(role).Execute()
List permissions for all users in a collection.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
collectionId := "collectionId_example" // string | The unique id of the collection
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
role := openapiclient.MemberRole("admin") // MemberRole | If defined, only members with this role will be returned. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListPermissionsAggregateInCollection(context.Background(), collectionId).Page(page).Limit(limit).Role(role).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListPermissionsAggregateInCollection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPermissionsAggregateInCollection`: ListPermissionsAggregateInSpace200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListPermissionsAggregateInCollection`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | The unique id of the collection |
Other parameters are passed through a pointer to a apiListPermissionsAggregateInCollectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | role | MemberRole | If defined, only members with this role will be returned. |
ListPermissionsAggregateInSpace200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListPermissionsAggregateInSpace200Response ListPermissionsAggregateInSpace(ctx, spaceId).Page(page).Limit(limit).Role(role).Execute()
List permissions for all users in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
role := openapiclient.MemberRole("admin") // MemberRole | If defined, only members with this role will be returned. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListPermissionsAggregateInSpace(context.Background(), spaceId).Page(page).Limit(limit).Role(role).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListPermissionsAggregateInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPermissionsAggregateInSpace`: ListPermissionsAggregateInSpace200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListPermissionsAggregateInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiListPermissionsAggregateInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | role | MemberRole | If defined, only members with this role will be returned. |
ListPermissionsAggregateInSpace200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListSpaceRelations200Response ListSpaceRelations(ctx, spaceId).Page(page).Limit(limit).Execute()
List all relations for a space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListSpaceRelations(context.Background(), spaceId).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListSpaceRelations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSpaceRelations`: ListSpaceRelations200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListSpaceRelations`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiListSpaceRelationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page |
integration, integration-installation, user-internal, user, user-staff
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListSpaceRelationsInOrganization200Response ListSpaceRelationsInOrganization(ctx, organizationId).Page(page).Limit(limit).Execute()
List all relations between spaces in an organization
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
organizationId := "organizationId_example" // string | The unique id of the organization
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListSpaceRelationsInOrganization(context.Background(), organizationId).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListSpaceRelationsInOrganization``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSpaceRelationsInOrganization`: ListSpaceRelationsInOrganization200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListSpaceRelationsInOrganization`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | The unique id of the organization |
Other parameters are passed through a pointer to a apiListSpaceRelationsInOrganizationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page |
ListSpaceRelationsInOrganization200Response
integration, integration-installation, user-internal, user, user-staff
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListSpacesForOrganizationMember200Response ListSpacesForOrganizationMember(ctx, organizationId, userId).Page(page).Limit(limit).Execute()
List permissions accross all spaces for a member of an organization
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
organizationId := "organizationId_example" // string | The unique id of the organization
userId := "userId_example" // string | The unique ID of the User
page := "page_example" // string | Identifier of the page results to fetch. (optional)
limit := float32(8.14) // float32 | The number of results per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.ListSpacesForOrganizationMember(context.Background(), organizationId, userId).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.ListSpacesForOrganizationMember``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSpacesForOrganizationMember`: ListSpacesForOrganizationMember200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.ListSpacesForOrganizationMember`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | The unique id of the organization | |
userId | string | The unique ID of the User |
Other parameters are passed through a pointer to a apiListSpacesForOrganizationMemberRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page |
ListSpacesForOrganizationMember200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MergeChangeRequest200Response MergeChangeRequest(ctx, spaceId, changeRequestId).Execute()
Merge a change request in the primary content of a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.MergeChangeRequest(context.Background(), spaceId, changeRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.MergeChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MergeChangeRequest`: MergeChangeRequest200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.MergeChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiMergeChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Comment PostCommentInChangeRequest(ctx, spaceId, changeRequestId).PostCommentSchema(postCommentSchema).Execute()
Post a new comment in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
postCommentSchema := *openapiclient.NewPostCommentSchema(openapiclient.Document{JSONDocument: openapiclient.NewJSONDocument(*openapiclient.NewJSONDocumentDocument([]map[string]interface{}{map[string]interface{}(123)}))}) // PostCommentSchema |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.PostCommentInChangeRequest(context.Background(), spaceId, changeRequestId).PostCommentSchema(postCommentSchema).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.PostCommentInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostCommentInChangeRequest`: Comment
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.PostCommentInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiPostCommentInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postCommentSchema | PostCommentSchema | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Comment PostCommentInSpace(ctx, spaceId).PostCommentSchema(postCommentSchema).Execute()
Post a new comment in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
postCommentSchema := *openapiclient.NewPostCommentSchema(openapiclient.Document{JSONDocument: openapiclient.NewJSONDocument(*openapiclient.NewJSONDocumentDocument([]map[string]interface{}{map[string]interface{}(123)}))}) // PostCommentSchema |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.PostCommentInSpace(context.Background(), spaceId).PostCommentSchema(postCommentSchema).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.PostCommentInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostCommentInSpace`: Comment
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.PostCommentInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiPostCommentInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postCommentSchema | PostCommentSchema | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentReply PostCommentReplyInChangeRequest(ctx, spaceId, changeRequestId, commentId).PostCommentReplySchema(postCommentReplySchema).Format(format).Execute()
Post a new reply to a comment in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
postCommentReplySchema := *openapiclient.NewPostCommentReplySchema(openapiclient.Document{JSONDocument: openapiclient.NewJSONDocument(*openapiclient.NewJSONDocumentDocument([]map[string]interface{}{map[string]interface{}(123)}))}) // PostCommentReplySchema |
format := "format_example" // string | Output format for the content. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.PostCommentReplyInChangeRequest(context.Background(), spaceId, changeRequestId, commentId).PostCommentReplySchema(postCommentReplySchema).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.PostCommentReplyInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostCommentReplyInChangeRequest`: CommentReply
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.PostCommentReplyInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiPostCommentReplyInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postCommentReplySchema | PostCommentReplySchema | | format | string | Output format for the content. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentReply PostCommentReplyInSpace(ctx, spaceId, commentId).PostCommentReplySchema(postCommentReplySchema).Execute()
Post a new reply to a comment in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
postCommentReplySchema := *openapiclient.NewPostCommentReplySchema(openapiclient.Document{JSONDocument: openapiclient.NewJSONDocument(*openapiclient.NewJSONDocumentDocument([]map[string]interface{}{map[string]interface{}(123)}))}) // PostCommentReplySchema |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.PostCommentReplyInSpace(context.Background(), spaceId, commentId).PostCommentReplySchema(postCommentReplySchema).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.PostCommentReplyInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostCommentReplyInSpace`: CommentReply
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.PostCommentReplyInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiPostCommentReplyInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postCommentReplySchema | PostCommentReplySchema | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RequestReviewersForChangeRequest200Response RequestReviewersForChangeRequest(ctx, spaceId, changeRequestId).RequestReviewersForChangeRequestRequest(requestReviewersForChangeRequestRequest).Execute()
Request reviewers on a change request. Note that requesting a review from teams is not yet supported.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
requestReviewersForChangeRequestRequest := *openapiclient.NewRequestReviewersForChangeRequestRequest([]string{"Users_example"}) // RequestReviewersForChangeRequestRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.RequestReviewersForChangeRequest(context.Background(), spaceId, changeRequestId).RequestReviewersForChangeRequestRequest(requestReviewersForChangeRequestRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.RequestReviewersForChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RequestReviewersForChangeRequest`: RequestReviewersForChangeRequest200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.RequestReviewersForChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiRequestReviewersForChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestReviewersForChangeRequestRequest | RequestReviewersForChangeRequestRequest | |
RequestReviewersForChangeRequest200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChangeRequestReview SubmitChangeRequestReview(ctx, spaceId, changeRequestId).SubmitChangeRequestReviewRequest(submitChangeRequestReviewRequest).Execute()
Submit a review for a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
submitChangeRequestReviewRequest := *openapiclient.NewSubmitChangeRequestReviewRequest(openapiclient.ChangeRequestReviewStatus("changes-requested")) // SubmitChangeRequestReviewRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.SubmitChangeRequestReview(context.Background(), spaceId, changeRequestId).SubmitChangeRequestReviewRequest(submitChangeRequestReviewRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.SubmitChangeRequestReview``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SubmitChangeRequestReview`: ChangeRequestReview
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.SubmitChangeRequestReview`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiSubmitChangeRequestReviewRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
submitChangeRequestReviewRequest | SubmitChangeRequestReviewRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TrackViewInSpaceById(ctx, spaceId).RequestSpaceTrackPageView(requestSpaceTrackPageView).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
requestSpaceTrackPageView := *openapiclient.NewRequestSpaceTrackPageView("PageId_example", *openapiclient.NewRequestSpaceTrackPageViewVisitor("AnonymousId_example", map[string]string{"key": "Inner_example"}, "UserAgent_example"), "Url_example", "Referrer_example") // RequestSpaceTrackPageView |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.TrackViewInSpaceById(context.Background(), spaceId).RequestSpaceTrackPageView(requestSpaceTrackPageView).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.TrackViewInSpaceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiTrackViewInSpaceByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestSpaceTrackPageView | RequestSpaceTrackPageView | |
(empty response body)
integration, integration-installation, user-internal, user, user-staff
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateChangeRequest200Response UpdateChangeRequest(ctx, spaceId, changeRequestId).Execute()
Update a change-request with changes from primary content.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.UpdateChangeRequest(context.Background(), spaceId, changeRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateChangeRequest`: UpdateChangeRequest200Response
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.UpdateChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space |
Other parameters are passed through a pointer to a apiUpdateChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
UpdateChangeRequest200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Comment UpdateCommentInChangeRequest(ctx, spaceId, changeRequestId, commentId).UpdateCommentSchema(updateCommentSchema).Execute()
Update a comment in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
updateCommentSchema := *openapiclient.NewUpdateCommentSchema() // UpdateCommentSchema |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.UpdateCommentInChangeRequest(context.Background(), spaceId, changeRequestId, commentId).UpdateCommentSchema(updateCommentSchema).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateCommentInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCommentInChangeRequest`: Comment
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.UpdateCommentInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiUpdateCommentInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateCommentSchema | UpdateCommentSchema | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Comment UpdateCommentInSpace(ctx, spaceId, commentId).UpdateCommentSchema(updateCommentSchema).Execute()
Update a comment in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
updateCommentSchema := *openapiclient.NewUpdateCommentSchema() // UpdateCommentSchema |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.UpdateCommentInSpace(context.Background(), spaceId, commentId).UpdateCommentSchema(updateCommentSchema).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateCommentInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCommentInSpace`: Comment
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.UpdateCommentInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment |
Other parameters are passed through a pointer to a apiUpdateCommentInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateCommentSchema | UpdateCommentSchema | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentReply UpdateCommentReplyInChangeRequest(ctx, spaceId, changeRequestId, commentId, commentReplyId).UpdateCommentSchema(updateCommentSchema).Execute()
Update a comment reply in a change request.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
changeRequestId := openapiclient.getChangeRequestById_changeRequestId_parameter{Int32: new(int32)} // GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space
commentId := "commentId_example" // string | The unique id of the comment
commentReplyId := "commentReplyId_example" // string | The unique id of the comment reply
updateCommentSchema := *openapiclient.NewUpdateCommentSchema() // UpdateCommentSchema |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.UpdateCommentReplyInChangeRequest(context.Background(), spaceId, changeRequestId, commentId, commentReplyId).UpdateCommentSchema(updateCommentSchema).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateCommentReplyInChangeRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCommentReplyInChangeRequest`: CommentReply
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.UpdateCommentReplyInChangeRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
changeRequestId | GetChangeRequestByIdChangeRequestIdParameter | The unique ID of the change request or its number identifier in the space | |
commentId | string | The unique id of the comment | |
commentReplyId | string | The unique id of the comment reply |
Other parameters are passed through a pointer to a apiUpdateCommentReplyInChangeRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateCommentSchema | UpdateCommentSchema | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentReply UpdateCommentReplyInSpace(ctx, spaceId, commentId, commentReplyId).UpdateCommentReplySchema(updateCommentReplySchema).Execute()
Update a comment reply in a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
commentId := "commentId_example" // string | The unique id of the comment
commentReplyId := "commentReplyId_example" // string | The unique id of the comment reply
updateCommentReplySchema := *openapiclient.NewUpdateCommentReplySchema() // UpdateCommentReplySchema |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.UpdateCommentReplyInSpace(context.Background(), spaceId, commentId, commentReplyId).UpdateCommentReplySchema(updateCommentReplySchema).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateCommentReplyInSpace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCommentReplyInSpace`: CommentReply
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.UpdateCommentReplyInSpace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space | |
commentId | string | The unique id of the comment | |
commentReplyId | string | The unique id of the comment reply |
Other parameters are passed through a pointer to a apiUpdateCommentReplyInSpaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateCommentReplySchema | UpdateCommentReplySchema | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Space UpdateSpaceById(ctx, spaceId).UpdateSpaceByIdRequest(updateSpaceByIdRequest).Execute()
Update the details of a space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
updateSpaceByIdRequest := *openapiclient.NewUpdateSpaceByIdRequest() // UpdateSpaceByIdRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.UpdateSpaceById(context.Background(), spaceId).UpdateSpaceByIdRequest(updateSpaceByIdRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateSpaceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSpaceById`: Space
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.UpdateSpaceById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiUpdateSpaceByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateSpaceByIdRequest | UpdateSpaceByIdRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateSpaceCustomFields(ctx, spaceId).UpdateCustomFieldValues(updateCustomFieldValues).Execute()
Update the custom fields in a space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
updateCustomFieldValues := *openapiclient.NewUpdateCustomFieldValues(map[string]UpdateCustomFieldValuesValuesValue{"key": *openapiclient.NewUpdateCustomFieldValuesValuesValue(openapiclient.CustomFieldValue{ArrayOfString: new([]string)})}) // UpdateCustomFieldValues |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SpacesApi.UpdateSpaceCustomFields(context.Background(), spaceId).UpdateCustomFieldValues(updateCustomFieldValues).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateSpaceCustomFields``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiUpdateSpaceCustomFieldsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateCustomFieldValues | UpdateCustomFieldValues | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContentPublishingAuth UpdateSpacePublishingAuthById(ctx, spaceId).RequestUpdateContentPublishingAuth(requestUpdateContentPublishingAuth).Execute()
Update the publishing authentication configuration for a space.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
spaceId := "spaceId_example" // string | The unique id of the space
requestUpdateContentPublishingAuth := *openapiclient.NewRequestUpdateContentPublishingAuth() // RequestUpdateContentPublishingAuth |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SpacesApi.UpdateSpacePublishingAuthById(context.Background(), spaceId).RequestUpdateContentPublishingAuth(requestUpdateContentPublishingAuth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SpacesApi.UpdateSpacePublishingAuthById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSpacePublishingAuthById`: ContentPublishingAuth
fmt.Fprintf(os.Stdout, "Response from `SpacesApi.UpdateSpacePublishingAuthById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
spaceId | string | The unique id of the space |
Other parameters are passed through a pointer to a apiUpdateSpacePublishingAuthByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestUpdateContentPublishingAuth | RequestUpdateContentPublishingAuth | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]