Skip to content

Commit

Permalink
feat: add AdsGetAdsTargetingBuilder.OnlyDeleted
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud committed May 18, 2020
1 parent a20f9ed commit 066caa0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions api/params/ads.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,14 @@ func (b *AdsGetAdsTargetingBuilder) IncludeDeleted(v bool) *AdsGetAdsTargetingBu
return b
}

// OnlyDeleted parameter.
//
// TODO: write documentation.
func (b *AdsGetAdsTargetingBuilder) OnlyDeleted(v bool) *AdsGetAdsTargetingBuilder {
b.Params["only_deleted"] = v
return b
}

// Limit Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and 'campaign_ids' parameter
// contains ID of only one campaign.
func (b *AdsGetAdsTargetingBuilder) Limit(v int) *AdsGetAdsTargetingBuilder {
Expand Down
2 changes: 2 additions & 0 deletions api/params/ads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func TestAdsGetAdsTargetingBuilder(t *testing.T) {
b.IncludeDeleted(true)
b.Limit(1)
b.Offset(1)
b.OnlyDeleted(true)

assert.Equal(t, b.Params["account_id"], 1)
assert.Equal(t, b.Params["ad_ids"], "text")
Expand All @@ -205,6 +206,7 @@ func TestAdsGetAdsTargetingBuilder(t *testing.T) {
assert.Equal(t, b.Params["include_deleted"], true)
assert.Equal(t, b.Params["limit"], 1)
assert.Equal(t, b.Params["offset"], 1)
assert.Equal(t, b.Params["only_deleted"], true)
}

func TestAdsGetBudgetBuilder(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Source https://github.com/SevereCloud/vksdk
package vksdk

// Version module.
const Version = "1.6.0"
const Version = "1.7.0"

0 comments on commit 066caa0

Please sign in to comment.