All URIs are relative to https://api.gitbook.com/v1
Method | HTTP request | Description |
---|---|---|
GenerateHiveAccessToken | Post /internal/hive/token | Returns a token to authenticate with Hive. |
GenerateSpaceHiveReadAccessToken | Post /spaces/{spaceId}/hive/token | Returns a token to authenticate with Hive to read content from a given space. |
HiveAccessToken GenerateHiveAccessToken(ctx).GenerateHiveAccessTokenRequest(generateHiveAccessTokenRequest).Execute()
Returns a token to authenticate with Hive.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
generateHiveAccessTokenRequest := *openapiclient.NewGenerateHiveAccessTokenRequest() // GenerateHiveAccessTokenRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HiveApi.GenerateHiveAccessToken(context.Background()).GenerateHiveAccessTokenRequest(generateHiveAccessTokenRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HiveApi.GenerateHiveAccessToken``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateHiveAccessToken`: HiveAccessToken
fmt.Fprintf(os.Stdout, "Response from `HiveApi.GenerateHiveAccessToken`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGenerateHiveAccessTokenRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
generateHiveAccessTokenRequest | GenerateHiveAccessTokenRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HiveAccessToken GenerateSpaceHiveReadAccessToken(ctx, spaceId).Execute()
Returns a token to authenticate with Hive to read content from 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.HiveApi.GenerateSpaceHiveReadAccessToken(context.Background(), spaceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HiveApi.GenerateSpaceHiveReadAccessToken``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateSpaceHiveReadAccessToken`: HiveAccessToken
fmt.Fprintf(os.Stdout, "Response from `HiveApi.GenerateSpaceHiveReadAccessToken`: %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 apiGenerateSpaceHiveReadAccessTokenRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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]