コード例 #1
0
 def fields_for_update(self):
     fields = self.fields_for_create()
     for field in ['campaign_id', 'cost_type']:
         if field in fields:
             fields.pop(field)
     fields.update(ad_id=int(self.remote_id))
     return fields
コード例 #2
0
 def fields_for_update(self):
     '''
     TODO: add dropping start_time, stop_time http://vk.com/developers.php?oid=-1&p=ads.updateCampaigns
     '''
     fields = self.fields_for_create()
     if 'client_id' in fields:
         fields.pop('client_id')
     fields.update(campaign_id=self.remote_id)
     return fields