All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
CreateAdUnitRequestLog | Post /ads/request-logs/ | Create ad unit request log |
ListAdPlacements | Get /ads/placements/ | Get ad placement list |
CreateAdUnitRequestLogRequest CreateAdUnitRequestLog(ctx).CreateAdUnitRequestLogRequest(createAdUnitRequestLogRequest).Execute()
Create ad unit request log
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
createAdUnitRequestLogRequest := *openapiclient.NewCreateAdUnitRequestLogRequest("Unit_example", time.Now(), "PT0.125S - 125ms") // CreateAdUnitRequestLogRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AdsApi.CreateAdUnitRequestLog(context.Background()).CreateAdUnitRequestLogRequest(createAdUnitRequestLogRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdsApi.CreateAdUnitRequestLog``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAdUnitRequestLog`: CreateAdUnitRequestLogRequest
fmt.Fprintf(os.Stdout, "Response from `AdsApi.CreateAdUnitRequestLog`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateAdUnitRequestLogRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createAdUnitRequestLogRequest | CreateAdUnitRequestLogRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AdPlacement ListAdPlacements(ctx).Execute()
Get ad placement list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AdsApi.ListAdPlacements(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdsApi.ListAdPlacements``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAdPlacements`: []AdPlacement
fmt.Fprintf(os.Stdout, "Response from `AdsApi.ListAdPlacements`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListAdPlacementsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]