Skip to content

Latest commit

 

History

History
386 lines (244 loc) · 9.02 KB

PublicAPI.md

File metadata and controls

386 lines (244 loc) · 9.02 KB

\PublicAPI

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

Method HTTP request Description
ApiPublicDemoGet Get /api/public/demo The network's ad format demo pages.
ApiPublicDemoSlugGet Get /api/public/demo/{slug} One ad format demo page (HTML).
ApiPublicOfferwallIdGet Get /api/public/offerwall/{id} Offerwall list of an offer zone.
ApiPublicOpenapiJsonGet Get /api/public/openapi.json OpenAPI spec as JSON.
ApiPublicOpenapiYamlGet Get /api/public/openapi.yaml Raw OpenAPI spec (this document).
ApiPublicRoutesTxtGet Get /api/public/routes.txt Flat list of public routes — agent-friendly.

ApiPublicDemoGet

ApiPublicDemoGet200Response ApiPublicDemoGet(ctx).Execute()

The network's ad format demo pages.

Example

package main

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

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PublicAPI.ApiPublicDemoGet(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ApiPublicDemoGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ApiPublicDemoGet`: ApiPublicDemoGet200Response
	fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ApiPublicDemoGet`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

ApiPublicDemoGet200Response

Authorization

No authorization required

HTTP request headers

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

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

ApiPublicDemoSlugGet

string ApiPublicDemoSlugGet(ctx, slug).Execute()

One ad format demo page (HTML).

Example

package main

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

func main() {
	slug := "native" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PublicAPI.ApiPublicDemoSlugGet(context.Background(), slug).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ApiPublicDemoSlugGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ApiPublicDemoSlugGet`: string
	fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ApiPublicDemoSlugGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
slug string

Other Parameters

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

Name Type Description Notes

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

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

ApiPublicOfferwallIdGet

ApiPublicOfferwallIdGet200Response ApiPublicOfferwallIdGet(ctx, id).Execute()

Offerwall list of an offer zone.

Example

package main

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

func main() {
	id := int32(56) // int32 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PublicAPI.ApiPublicOfferwallIdGet(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ApiPublicOfferwallIdGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ApiPublicOfferwallIdGet`: ApiPublicOfferwallIdGet200Response
	fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ApiPublicOfferwallIdGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32

Other Parameters

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

Name Type Description Notes

Return type

ApiPublicOfferwallIdGet200Response

Authorization

No authorization required

HTTP request headers

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

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

ApiPublicOpenapiJsonGet

ApiPublicOpenapiJsonGet(ctx).Execute()

OpenAPI spec as JSON.

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.PublicAPI.ApiPublicOpenapiJsonGet(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ApiPublicOpenapiJsonGet``: %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 apiApiPublicOpenapiJsonGetRequest struct via the builder pattern

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ApiPublicOpenapiYamlGet

ApiPublicOpenapiYamlGet(ctx).Execute()

Raw OpenAPI spec (this document).

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.PublicAPI.ApiPublicOpenapiYamlGet(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ApiPublicOpenapiYamlGet``: %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 apiApiPublicOpenapiYamlGetRequest struct via the builder pattern

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ApiPublicRoutesTxtGet

ApiPublicRoutesTxtGet(ctx).Execute()

Flat list of public routes — agent-friendly.

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.PublicAPI.ApiPublicRoutesTxtGet(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ApiPublicRoutesTxtGet``: %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 apiApiPublicRoutesTxtGetRequest struct via the builder pattern

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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