Skip to content

Latest commit

 

History

History
164 lines (112 loc) · 6.89 KB

StatsPublisherSmartZonesAPI.md

File metadata and controls

164 lines (112 loc) · 6.89 KB

\StatsPublisherSmartZonesAPI

All URIs are relative to https://up.go-adserver.com

Method HTTP request Description
ApiV1PublisherSmartzonesStatsFiltersGet Get /api/v1/publisher/smartzones/stats/filters Filter values for smart-zone stats.
ApiV1PublisherSmartzonesStatsGet Get /api/v1/publisher/smartzones/stats SmartZone (waterfall) earnings.

ApiV1PublisherSmartzonesStatsFiltersGet

ApiV1PublisherSmartzonesStatsFiltersGet(ctx).Execute()

Filter values for smart-zone stats.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/goadserver/goadserver-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.StatsPublisherSmartZonesAPI.ApiV1PublisherSmartzonesStatsFiltersGet(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatsPublisherSmartZonesAPI.ApiV1PublisherSmartzonesStatsFiltersGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiApiV1PublisherSmartzonesStatsFiltersGetRequest struct via the builder pattern

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiV1PublisherSmartzonesStatsGet

StatsResponse ApiV1PublisherSmartzonesStatsGet(ctx).From(from).To(to).Interval(interval).GroupBy(groupBy).Metrics(metrics).FilterWebsite(filterWebsite).FilterAdzoneId(filterAdzoneId).FilterAdType(filterAdType).FilterDevice(filterDevice).FilterCountry(filterCountry).FilterSmartNetworkId(filterSmartNetworkId).Format(format).Page(page).PerPage(perPage).Sort(sort).Execute()

SmartZone (waterfall) earnings.

Example

package main

import (
	"context"
	"fmt"
	"os"
    "time"
	openapiclient "github.com/goadserver/goadserver-go"
)

func main() {
	from := time.Now() // string | ISO date — inclusive start. Defaults to 7 days ago. (optional)
	to := time.Now() // string | ISO date — inclusive end. Defaults to today. Max range 92 days. (optional)
	interval := "interval_example" // string |  (optional) (default to "sum")
	groupBy := []string{"GroupBy_example"} // []string | Dimensions to aggregate by. Multi-pick up to 8. (optional)
	metrics := []string{"Metrics_example"} // []string | Metrics to return. Multi-pick — leave empty for all. (optional)
	filterWebsite := int32(56) // int32 | Site ID — look up via `GET /api/v1/sites`. (optional)
	filterAdzoneId := "12345,12346" // string | Adspace ID, or comma-separated list. Look up via `GET /api/v1/adspaces`. (optional)
	filterAdType := int32(56) // int32 | Ad-type ID. Available types are tenant-specific (banner, popunder, native, video, push, …); the dropdown shows the types active on your system.  (optional)
	filterDevice := int32(56) // int32 | Device type:  | ID | Device | |----|--------| | 1  | Computer | | 2  | Tablet | | 3  | Phone | | 4  | Console | | 5  | Wearable | | 6  | TV |  (optional)
	filterCountry := "US" // string | ISO-3166 alpha-2 country code (e.g. `US`, `DE`, `BR`). (optional)
	filterSmartNetworkId := int32(56) // int32 | SmartZone network ID. (optional)
	format := "format_example" // string |  (optional) (default to "json")
	page := int32(56) // int32 |  (optional) (default to 1)
	perPage := int32(56) // int32 |  (optional) (default to 100)
	sort := "sort_example" // string | Field name. Prefix with `-` for descending (e.g. `-views`). (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.StatsPublisherSmartZonesAPI.ApiV1PublisherSmartzonesStatsGet(context.Background()).From(from).To(to).Interval(interval).GroupBy(groupBy).Metrics(metrics).FilterWebsite(filterWebsite).FilterAdzoneId(filterAdzoneId).FilterAdType(filterAdType).FilterDevice(filterDevice).FilterCountry(filterCountry).FilterSmartNetworkId(filterSmartNetworkId).Format(format).Page(page).PerPage(perPage).Sort(sort).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatsPublisherSmartZonesAPI.ApiV1PublisherSmartzonesStatsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ApiV1PublisherSmartzonesStatsGet`: StatsResponse
	fmt.Fprintf(os.Stdout, "Response from `StatsPublisherSmartZonesAPI.ApiV1PublisherSmartzonesStatsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiApiV1PublisherSmartzonesStatsGetRequest struct via the builder pattern

Name Type Description Notes
from string ISO date — inclusive start. Defaults to 7 days ago.
to string ISO date — inclusive end. Defaults to today. Max range 92 days.
interval string [default to "sum"]
groupBy []string Dimensions to aggregate by. Multi-pick up to 8.
metrics []string Metrics to return. Multi-pick — leave empty for all.
filterWebsite int32 Site ID — look up via `GET /api/v1/sites`.
filterAdzoneId string Adspace ID, or comma-separated list. Look up via `GET /api/v1/adspaces`.
filterAdType int32 Ad-type ID. Available types are tenant-specific (banner, popunder, native, video, push, …); the dropdown shows the types active on your system.
filterDevice int32 Device type: ID
filterCountry string ISO-3166 alpha-2 country code (e.g. `US`, `DE`, `BR`).
filterSmartNetworkId int32 SmartZone network ID.
format string [default to "json"]
page int32 [default to 1]
perPage int32 [default to 100]
sort string Field name. Prefix with `-` for descending (e.g. `-views`).

Return type

StatsResponse

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]