From 066caa083731690c20619424c8a10feea70bc0a3 Mon Sep 17 00:00:00 2001 From: Suvorov Daniil Date: Mon, 18 May 2020 19:11:54 +0300 Subject: [PATCH] feat: add AdsGetAdsTargetingBuilder.OnlyDeleted --- api/params/ads.go | 8 ++++++++ api/params/ads_test.go | 2 ++ doc.go | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/api/params/ads.go b/api/params/ads.go index 63644cec..f5c58153 100644 --- a/api/params/ads.go +++ b/api/params/ads.go @@ -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 { diff --git a/api/params/ads_test.go b/api/params/ads_test.go index aaedad74..7fa2051e 100644 --- a/api/params/ads_test.go +++ b/api/params/ads_test.go @@ -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") @@ -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) { diff --git a/doc.go b/doc.go index aa69c239..5d0a9588 100644 --- a/doc.go +++ b/doc.go @@ -6,4 +6,4 @@ Source https://github.com/SevereCloud/vksdk package vksdk // Version module. -const Version = "1.6.0" +const Version = "1.7.0"