Skip to content

Commit 82c6802

Browse files
authored
excluding client from kwargs (#154)
1 parent 8ff5777 commit 82c6802

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

pinterest/ads/ad_groups.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def create(
350350
client=cls._get_client(client)
351351
)
352352

353-
def update_fields(self, **kwargs) -> bool:
353+
def update_fields(self, client: PinterestSDKClient = None, **kwargs) -> bool:
354354
"""
355355
Update adgroup fields using any arguments
356356
@@ -376,6 +376,7 @@ def update_fields(self, **kwargs) -> bool:
376376
},
377377
api=AdGroupsApi,
378378
update_fn=AdGroupsApi.ad_groups_update,
379+
client=client,
379380
**kwargs
380381
)
381382

pinterest/ads/ads.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def _map_function(obj):
417417
**kwargs
418418
)
419419

420-
def update_fields(self, **kwargs) -> bool:
420+
def update_fields(self, client: PinterestSDKClient = None, **kwargs) -> bool:
421421
"""
422422
Update Ad fields suing any arguments
423423
@@ -440,5 +440,6 @@ def update_fields(self, **kwargs) -> bool:
440440
},
441441
api=AdsApi,
442442
update_fn=AdsApi.ads_update,
443+
client=client,
443444
**kwargs
444445
)

pinterest/ads/audiences.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def _map_function(obj):
250250
**kwargs
251251
)
252252

253-
def update_fields(self, **kwargs):
253+
def update_fields(self, client: PinterestSDKClient = None, **kwargs):
254254
"""
255255
Update audience fields
256256
@@ -271,5 +271,6 @@ def update_fields(self, **kwargs):
271271
},
272272
api=AudiencesApi,
273273
update_fn=AudiencesApi.audiences_update,
274+
client=client,
274275
**kwargs
275276
)

pinterest/ads/campaigns.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def archive(self) -> bool:
485485
"""
486486
return self._change_status('ARCHIVED')
487487

488-
def update_fields(self, **kwargs) -> bool:
488+
def update_fields(self, client: PinterestSDKClient = None, **kwargs) -> bool:
489489
"""
490490
Update the campaign fields using any attributes.
491491
@@ -508,6 +508,7 @@ def update_fields(self, **kwargs) -> bool:
508508
},
509509
api=CampaignsApi,
510510
update_fn=CampaignsApi.campaigns_update,
511+
client=client,
511512
**kwargs
512513
)
513514

0 commit comments

Comments
 (0)