Skip to content

Latest commit

 

History

History
352 lines (222 loc) · 10.8 KB

PushCampaignsAPI.md

File metadata and controls

352 lines (222 loc) · 10.8 KB

\PushCampaignsAPI

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

Method HTTP request Description
ApiV1PublisherPushCampaignsGet Get /api/v1/publisher/push-campaigns List the caller's push campaigns.
ApiV1PublisherPushCampaignsIdDelete Delete /api/v1/publisher/push-campaigns/{id} Delete a push campaign.
ApiV1PublisherPushCampaignsIdPut Put /api/v1/publisher/push-campaigns/{id} Update a push campaign's notification content.
ApiV1PublisherPushCampaignsIdSendPost Post /api/v1/publisher/push-campaigns/{id}/send Queue a push campaign for delivery.
ApiV1PublisherPushCampaignsPost Post /api/v1/publisher/push-campaigns Create a push campaign.

ApiV1PublisherPushCampaignsGet

ApiV1PublisherPushCampaignsGet200Response ApiV1PublisherPushCampaignsGet(ctx).Execute()

List the caller's push campaigns.

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.PushCampaignsAPI.ApiV1PublisherPushCampaignsGet(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PushCampaignsAPI.ApiV1PublisherPushCampaignsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ApiV1PublisherPushCampaignsGet`: ApiV1PublisherPushCampaignsGet200Response
	fmt.Fprintf(os.Stdout, "Response from `PushCampaignsAPI.ApiV1PublisherPushCampaignsGet`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

ApiV1PublisherPushCampaignsGet200Response

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]

ApiV1PublisherPushCampaignsIdDelete

ApiV1PublisherPushCampaignsIdDelete200Response ApiV1PublisherPushCampaignsIdDelete(ctx, id).Execute()

Delete a push campaign.

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ApiV1PublisherPushCampaignsIdDelete200Response

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]

ApiV1PublisherPushCampaignsIdPut

ApiV1PublisherPushCampaignsPost200Response ApiV1PublisherPushCampaignsIdPut(ctx, id).ApiV1PublisherPushCampaignsPostRequest(apiV1PublisherPushCampaignsPostRequest).Execute()

Update a push campaign's notification content.

Example

package main

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

func main() {
	id := int32(56) // int32 | Campaign ID.
	apiV1PublisherPushCampaignsPostRequest := *openapiclient.NewApiV1PublisherPushCampaignsPostRequest("New offers just dropped") // ApiV1PublisherPushCampaignsPostRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

apiV1PublisherPushCampaignsPostRequest | ApiV1PublisherPushCampaignsPostRequest | |

Return type

ApiV1PublisherPushCampaignsPost200Response

Authorization

apiKey

HTTP request headers

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

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

ApiV1PublisherPushCampaignsIdSendPost

ApiV1PublisherPushCampaignsIdSendPost200Response ApiV1PublisherPushCampaignsIdSendPost(ctx, id).Execute()

Queue a push campaign for delivery.

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ApiV1PublisherPushCampaignsIdSendPost200Response

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]

ApiV1PublisherPushCampaignsPost

ApiV1PublisherPushCampaignsPost200Response ApiV1PublisherPushCampaignsPost(ctx).ApiV1PublisherPushCampaignsPostRequest(apiV1PublisherPushCampaignsPostRequest).Execute()

Create a push campaign.

Example

package main

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

func main() {
	apiV1PublisherPushCampaignsPostRequest := *openapiclient.NewApiV1PublisherPushCampaignsPostRequest("New offers just dropped") // ApiV1PublisherPushCampaignsPostRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
apiV1PublisherPushCampaignsPostRequest ApiV1PublisherPushCampaignsPostRequest

Return type

ApiV1PublisherPushCampaignsPost200Response

Authorization

apiKey

HTTP request headers

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

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