All URIs are relative to https://up.go-adserver.com
| Method | HTTP request | Description |
|---|---|---|
| ApiV1CampaignsDirectdealIdCancelPut | Put /api/v1/campaigns/directdeal/{id}/cancel | Cancel a direct deal. |
| ApiV1DirectDealsAdzonesGet | Get /api/v1/direct-deals/adzones | Ad zones a direct deal can be booked on. |
| ApiV1DirectDealsGet | Get /api/v1/direct-deals | List direct deals with their derived status. |
ApiV1CampaignsDirectdealIdCancelPut(ctx, id).Execute()
Cancel a direct deal.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 | The direct deal (campaign) id.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DirectDealsAPI.ApiV1CampaignsDirectdealIdCancelPut(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectDealsAPI.ApiV1CampaignsDirectdealIdCancelPut``: %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. | |
| id | int32 | The direct deal (campaign) id. |
Other parameters are passed through a pointer to a apiApiV1CampaignsDirectdealIdCancelPutRequest 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]
ApiV1DirectDealsAdzonesGet(ctx).WebsiteId(websiteId).Execute()
Ad zones a direct deal can be booked on.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
websiteId := int32(56) // int32 | Only zones on this site. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DirectDealsAPI.ApiV1DirectDealsAdzonesGet(context.Background()).WebsiteId(websiteId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectDealsAPI.ApiV1DirectDealsAdzonesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiApiV1DirectDealsAdzonesGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| websiteId | int32 | Only zones on this site. |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1DirectDealsGet(ctx).Page(page).PerPage(perPage).Status(status).WebsiteIds(websiteIds).AdType(adType).TagIds(tagIds).FilterName(filterName).SortBy(sortBy).SortDir(sortDir).Execute()
List direct deals with their derived status.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
page := int32(56) // int32 | (optional) (default to 1)
perPage := int32(56) // int32 | (optional) (default to 20)
status := "status_example" // string | CSV of active, paused, pending, completed, ended, cancelled, rejected. (optional)
websiteIds := "websiteIds_example" // string | CSV of site ids (the booked zone's site). (optional)
adType := "adType_example" // string | CSV of ad type ids. (optional)
tagIds := "tagIds_example" // string | CSV of tag ids; a folder tag also matches its sub-tags. (optional)
filterName := "filterName_example" // string | Name substring. (optional)
sortBy := "sortBy_example" // string | (optional) (default to "id")
sortDir := "sortDir_example" // string | (optional) (default to "desc")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DirectDealsAPI.ApiV1DirectDealsGet(context.Background()).Page(page).PerPage(perPage).Status(status).WebsiteIds(websiteIds).AdType(adType).TagIds(tagIds).FilterName(filterName).SortBy(sortBy).SortDir(sortDir).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectDealsAPI.ApiV1DirectDealsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiApiV1DirectDealsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int32 | [default to 1] | |
| perPage | int32 | [default to 20] | |
| status | string | CSV of active, paused, pending, completed, ended, cancelled, rejected. | |
| websiteIds | string | CSV of site ids (the booked zone's site). | |
| adType | string | CSV of ad type ids. | |
| tagIds | string | CSV of tag ids; a folder tag also matches its sub-tags. | |
| filterName | string | Name substring. | |
| sortBy | string | [default to "id"] | |
| sortDir | string | [default to "desc"] |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]