Exemple #1
0
 def facebook_update(self, integration_id, name=None, ad_account_id=None,
                     token=None, proxy_enabled=None, proxy=None):
     """
     Updates facebook integration
     """
     return super(Integration, self).put(
         'facebook', **remove_key_values(locals()))
Exemple #2
0
 def facebook_create(
         self, name, ad_account_id, token, proxy_enabled, proxy):
     """
     Creates facebook integration
     """
     return super(Integration, self).post(
         'facebook', **remove_key_values(locals()))
Exemple #3
0
 def update(self,
            stream_id,
            *,
            campaign_id,
            name=None,
            type=None,
            action_type=None,
            schema=None,
            position=None,
            weigth=None,
            action_options=None,
            comments=None,
            state=None,
            collect_clicks=None,
            filter_or=None,
            filters=None,
            triggers=None,
            landings=None,
            offers=None):
     """
     Updates stream data by stream_id in campaign with campaign_id
     """
     query_params = remove_key_values(locals())
     streams = self.get(stream_id).json()
     set_resource_default_fields(
         {
             'action_type': action_type,
             'schema': schema
         }, query_params, streams)
     return super(Stream, self).post(**query_params)
Exemple #4
0
 def create(self,
            name,
            *,
            alias=None,
            type=None,
            state=None,
            cost_type=None,
            cookies_ttl=None,
            cost_value=None,
            cost_currency=None,
            cost_auto=False,
            group_id=None,
            token=None,
            traffic_source_id=None,
            bind_visitors=None,
            parameters=None,
            domain_id=None,
            postbacks=None):
     """
     Creates new advertising campaign
     """
     query_params = remove_key_values(locals())
     # TODO: add only if doesn't exist
     query_params['alias'] = generate_random_string()
     return super(Campaign, self).post(**query_params)
Exemple #5
0
 def create(self,
            name,
            *,
            default_campaign_id=None,
            wildcard=None,
            catch_not_found=None,
            notes=None,
            ssl_redirect=None,
            allow_indexing=None):
     """
     Creates new domain with
     """
     return super(Domain, self).post(**remove_key_values(locals()))
Exemple #6
0
 def create(self,
            name,
            *,
            action_payload=None,
            group_id=None,
            state=None,
            landing_type=None,
            action_type=None,
            url=None,
            archive=None):
     """
     Creates new landing page
     """
     return super(Landing, self).post(**remove_key_values(locals()))
Exemple #7
0
 def create(self,
            name,
            *,
            postback_url=None,
            offer_param=None,
            offers=None,
            template_name=None,
            notes=None,
            pull_api_options=None,
            state=None):
     """
     Creates new affiliate network
     """
     return super(Affiliate, self).post(**remove_key_values(locals()))
Exemple #8
0
 def update(self,
            domain_id,
            *,
            name=None,
            is_ssl=None,
            default_campaign_id=None,
            state=None,
            wildcard=None,
            catch_not_found=None,
            notes=None):
     """
     Updates domain name by id
     """
     return super(Domain, self).put(domain_id,
                                    **remove_key_values(locals()))
Exemple #9
0
 def create(self,
            name,
            *,
            postback_url=None,
            postback_statuses=None,
            template_name=None,
            accept_parameters=None,
            parameters=None,
            notes=None,
            state=None,
            traffic_loss=None):
     """
     Creates new traffic source
     """
     return super(Source, self).post(**remove_key_values(locals()))
Exemple #10
0
 def update_costs(self,
                  campaign_id,
                  *,
                  start_date,
                  end_date,
                  timezone,
                  cost,
                  currency,
                  only_campaign_uniques=None,
                  filters=None):
     """
     Updates campaign costs
     """
     query_params = remove_key_values(locals())
     return super(Campaign, self).post(campaign_id, 'update_costs',
                                       **query_params)
Exemple #11
0
 def create(self,
            name,
            *,
            group_id=None,
            offer_type=None,
            action_type=None,
            action_payload=None,
            archive=None,
            affiliate_network_id=None,
            payout_value=None,
            notes=None,
            payout_currency=None,
            payout_type=None,
            state=None,
            payout_auto=None,
            payout_upsell=None,
            country=None):
     """
     Creates new offer
     """
     return super(Offer, self).post(**remove_key_values(locals()))
Exemple #12
0
 def update(self,
            campaign_id,
            *,
            name=None,
            alias=None,
            type=None,
            state=None,
            cost_type=None,
            cookies_ttl=None,
            cost_value=None,
            cost_currency=None,
            cost_auto=False,
            group_id=None,
            token=None,
            traffic_source_id=None,
            bind_visitors=None,
            parameters=None,
            domain_id=None,
            postbacks=None):
     """
     Updates campaign data by campaign_id
     """
     return super(Campaign, self).put(campaign_id,
                                      **remove_key_values(locals()))
Exemple #13
0
 def create(self,
            *,
            campaign_id,
            name,
            type,
            action_type,
            schema,
            position=None,
            weigth=None,
            action_options=None,
            comments=None,
            state=None,
            collect_clicks=None,
            filter_or=None,
            filters=None,
            triggers=None,
            landings=None,
            offers=None):
     """
     Creates new stream for campaign with campaign id.
     To retrieve available stream schemas use get_schemas(),
     to retrieve available stream action types use get_actions()
     """
     return super(Stream, self).post(**remove_key_values(locals()))