Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ All notable changes to the CLI are documented here. Releases are `v<version>` ta
- `fopost video-edits ops · create · get` runs edit jobs on a media library video. `create` takes `--op name` or `--op 'name={json params}'` (repeatable) or `--operations-file`, and `--wait` on `create` and `get` blocks until the job succeeds or fails, exiting 1 on a failed job.
- Requires `fopost-go` with the Designs, Fonts and VideoEdits services (the pin in `go.mod` must be bumped once that SDK version is released).

### Removed

- `fopost ads tree`, `fopost ads catalogs` and `fopost ads library`. The API no longer serves the account tree, product catalogs or the Ad Library.
- `fopost ads google recommendations · optimization-score · keywords · keyword-ideas · search-terms · assets · asset-groups`. `fopost ads google conversions · query` stay.

## 0.3.0 - 2026-11-19

### Added
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ fopost webhooks list · create · test · delete
fopost connect-sessions create · get
fopost activity list · audit
fopost x post · search
fopost ads networks · tree · pause · resume · insights · leads · catalogs · library ·
google · tracking
fopost ads networks · pause · resume · insights · leads · google · tracking
fopost completion bash · zsh · fish · powershell
fopost version
```
Expand Down Expand Up @@ -341,15 +340,10 @@ MIT © Porter Bridge, LLC. See [LICENSE](LICENSE).

### Google Ads

`fopost ads google` covers the Search surface no other network has. Every command names
the connection and the Google Ads account:
`fopost ads google` covers what only Google has: conversion actions and raw GAQL. Every
command names the connection and the Google Ads account:

```bash
fopost ads google keywords --connection c4d5e6f7-… --customer 1234567890
fopost ads google keyword-ideas --connection c4d5e6f7-… --customer 1234567890 --seed "running shoes"
fopost ads google search-terms --connection c4d5e6f7-… --customer 1234567890 --since 2026-09-01 --until 2026-09-20
fopost ads google assets --connection c4d5e6f7-… --customer 1234567890
fopost ads google asset-groups --connection c4d5e6f7-… --customer 1234567890
fopost ads google conversions --connection c4d5e6f7-… --customer 1234567890
fopost ads google query --connection c4d5e6f7-… --customer 1234567890 \
'SELECT campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_30_DAYS'
Expand Down
50 changes: 1 addition & 49 deletions internal/cmd/ads.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ func init() { register(newAdsCmd) }
func newAdsCmd(state *State) *cobra.Command {
cmd := &cobra.Command{
Use: "ads",
Short: "Inspect campaigns and catalogs, change status, read insights, leads, the ad archive and ad comments, and track conversions",
Short: "Change status, read insights, leads and ad comments, and track conversions",
}
cmd.AddCommand(
newAdsNetworksCmd(state),
newAdsTreeCmd(state),
newAdsStatusCmd(state, "pause", fopost.AdStatusPaused),
newAdsStatusCmd(state, "resume", fopost.AdStatusActive),
newAdsInsightsCmd(state),
newAdsLeadsCmd(state),
newAdsCatalogsCmd(state),
newAdsLibraryCmd(state),
newAdsGoogleCmd(state),
newAdsTrackingCmd(state),
newAdsIdentitiesCmd(state),
Expand Down Expand Up @@ -106,51 +103,6 @@ func minorAmount(minor *int) string {
return fmt.Sprintf("%d.%02d", *minor/100, *minor%100)
}

func newAdsTreeCmd(state *State) *cobra.Command {
var connection string
cmd := &cobra.Command{
Use: "tree <ad-account-id>",
Short: "Show every campaign on an ad account with its ad sets and ads",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if connection == "" {
return usageErrorf("--connection is required")
}
client, err := state.Client()
if err != nil {
return err
}
resolved, err := state.Resolved()
if err != nil {
return err
}
tree, err := client.Ads.Tree(cmd.Context(), args[0], &fopost.AdObjectParams{
WorkspaceID: resolved.Workspace,
ConnectionID: connection,
})
if err != nil {
return err
}
printer := state.Printer()
return printer.Value(tree, func() {
rows := [][]string{}
for _, campaign := range tree.Campaigns {
rows = append(rows, []string{"campaign", campaign.ID, output.Truncate(campaign.Name, 32), campaign.Status, minorAmount(campaign.BudgetMinor)})
for _, set := range campaign.AdSets {
rows = append(rows, []string{" ad set", set.ID, output.Truncate(set.Name, 32), set.Status, minorAmount(set.BudgetMinor)})
for _, ad := range set.Ads {
rows = append(rows, []string{" ad", ad.ID, output.Truncate(ad.Name, 32), ad.Status, "-"})
}
}
}
printer.Table([]string{"level", "id", "name", "status", "budget"}, rows)
})
},
}
cmd.Flags().StringVar(&connection, "connection", "", "Meta Ads connection id (required)")
return cmd
}

func newAdsStatusCmd(state *State, verb, status string) *cobra.Command {
var connection string
var campaigns, adSets, ads []string
Expand Down
157 changes: 0 additions & 157 deletions internal/cmd/ads_extras.go

This file was deleted.

Loading
Loading