Yandex Direct API
Usage
package main
import (
"github.com/zoer/yandex-api/direct"
)
func main() {
token := os.Getenv("YANDEX_API_TOKEN")
client := direct.NewClient(token)
id := 123
campaigns, err := client.Campaigns.GetList()
err := client.Campaigns.Archive(id)
err := client.Campaigns.UnArchive(id)
err := client.Campaigns.Stop(id)
err := client.Campaigns.Resume(id)
err := client.Campaigns.Delete(id)
c := CampaignParams{
Login: "my-login",
Name: "Eric",
FIO: "Eric Cartman",
StartDate: "2012-04-12",
}
id, err := client.Campaigns.CreateOrUpdate(&c)
Tests
$ go test -v ./...