campaign

package
v0.0.0-...-92b9631 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Campaign

type Campaign interface {
	Create(userID string, req *Request) (*entities.Campaign, error)
}

Campaign methods for facebook

func New

func New(sess *session.Session, config ...func(*facebook)) Campaign

New campaign facebook interface

type Constructor

type Constructor interface {
	GenerateChromosome(adSetID, accessToken string) (*genetic.Chromosome, error)
}

Constructor used to create a chromosome given an ad set

func NewConstructor

func NewConstructor(config ...func(*constructor)) Constructor

NewConstructor creates a new constructor interface

type Request

type Request struct {
	// Campaign data
	Name              string   `json:"name"`
	Objective         string   `json:"objective"`
	Budget            string   `json:"budget"`
	SpecialAdCategory []string `json:"special_ad_categories"`
	// Population and optimization data
	Segment      string  `json:"segment"`
	MutationRate float64 `json:"mutation_rate"`
	// Ad set data
	PixelID   string      `json:"pixel_id"`
	StartTime string      `json:"start"`
	EndTime   string      `json:"end"`
	Location  geolocation `json:"locations"`
	Gender    [2]int      `json:"gender"`
	AgeMin    int         `json:"age_min"`
	AgeMax    int         `json:"age_max"`
	// Creative data
	Page         entities.Page `json:"page"`
	CreativeName string        `json:"creative_name"`
	ImageHash    string        `json:"image_hash"`
	MediaURL     string        `json:"media_url"`
	VideoID      string        `json:"video_id"`
	Title        string        `json:"title"`
	Message      string        `json:"message"`
	CallToAction callToAction  `json:"call_to_action"`
	// Account data
	AdAccount string `json:"ad_account"`
}

Request contains the data required to create a new facebook campaign

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL