Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 878 Bytes

README.md

File metadata and controls

47 lines (35 loc) · 878 Bytes

atomx-api-go

GoDoc

atomx-api-go is a Go client for the Atomx API

Example

List all your creatives:

client := atomx.New()

if err := client.Login("email", "password"); err != nil {
	panic(err)
}

offset := int64(0)

for {
	creatives := atomx.CreativesList{
		List: atomx.List{
			Sort:   "id.asc",
			Offset: offset,
			Limit:  100,
		},
	}

	if err := client.List(&creatives, &atomx.Options{
		Extra: []string{"quickstats.yesterday.impressions>=100", "id>=1"},
	}); err != nil {
		return nil, err
	}
	
	if len(creatives.Creatives) == 0 {
		break
	}

	for _, creative := range creatives.Creatives {
		println(creative)
	}

	offset += creatives.Limit
}