All URIs are relative to https://api.reveng.ai
| Method | HTTP request | Description |
|---|---|---|
| GenerateBlockCommentsForBlockInFunction | Post /v2/functions/{function_id}/block-comments/single | Generate block comments for a specific block in a function |
| GenerateBlockCommentsForFunction | Post /v2/functions/{function_id}/block-comments | Generate block comments for a function |
| GenerateOverviewCommentForFunction | Post /v2/functions/{function_id}/block-comments/overview | Generate overview comment for a function |
BaseResponseBlockCommentsGenerationForFunctionResponse GenerateBlockCommentsForBlockInFunction(ctx, functionId).Block(block).Execute()
Generate block comments for a specific block in a function
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
functionId := int32(56) // int32 |
block := *revengai.NewBlock(int32(123)) // Block |
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsBlockCommentsAPI.GenerateBlockCommentsForBlockInFunction(context.Background(), functionId).Block(block).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsBlockCommentsAPI.GenerateBlockCommentsForBlockInFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateBlockCommentsForBlockInFunction`: BaseResponseBlockCommentsGenerationForFunctionResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsBlockCommentsAPI.GenerateBlockCommentsForBlockInFunction`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| functionId | int32 |
Other parameters are passed through a pointer to a apiGenerateBlockCommentsForBlockInFunctionRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
block | Block | |
BaseResponseBlockCommentsGenerationForFunctionResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponseBlockCommentsGenerationForFunctionResponse GenerateBlockCommentsForFunction(ctx, functionId).Execute()
Generate block comments for a function
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
functionId := int32(56) // int32 |
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsBlockCommentsAPI.GenerateBlockCommentsForFunction(context.Background(), functionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsBlockCommentsAPI.GenerateBlockCommentsForFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateBlockCommentsForFunction`: BaseResponseBlockCommentsGenerationForFunctionResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsBlockCommentsAPI.GenerateBlockCommentsForFunction`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| functionId | int32 |
Other parameters are passed through a pointer to a apiGenerateBlockCommentsForFunctionRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
BaseResponseBlockCommentsGenerationForFunctionResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponseBlockCommentsOverviewGenerationResponse GenerateOverviewCommentForFunction(ctx, functionId).Execute()
Generate overview comment for a function
package main
import (
"context"
"fmt"
"os"
revengai "github.com/RevEngAI/sdk-go/v3"
)
func main() {
functionId := int32(56) // int32 |
configuration := revengai.NewConfiguration()
apiClient := revengai.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsBlockCommentsAPI.GenerateOverviewCommentForFunction(context.Background(), functionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsBlockCommentsAPI.GenerateOverviewCommentForFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateOverviewCommentForFunction`: BaseResponseBlockCommentsOverviewGenerationResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsBlockCommentsAPI.GenerateOverviewCommentForFunction`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| functionId | int32 |
Other parameters are passed through a pointer to a apiGenerateOverviewCommentForFunctionRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
BaseResponseBlockCommentsOverviewGenerationResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]