|  | @@ -32,7 +32,7 @@ class SpCampaign:
 | 
											
												
													
														|  |          self.profile_id = profile_id
 |  |          self.profile_id = profile_id
 | 
											
												
													
														|  |          self.portfolioId = portfolioId
 |  |          self.portfolioId = portfolioId
 | 
											
												
													
														|  |          self.re_url_path = "api/ad_manage/profiles/"
 |  |          self.re_url_path = "api/ad_manage/profiles/"
 | 
											
												
													
														|  | -        self.camid_url_path = "api/ad_manage/spcampaigns/"
 |  | 
 | 
											
												
													
														|  | 
 |  | +        self.camid_url_path = "api/ad_manage/spcampaigns/?limit=999"
 | 
											
												
													
														|  |          self.upcreate_url_path = "api/spbudgetrecommendation/list/"
 |  |          self.upcreate_url_path = "api/spbudgetrecommendation/list/"
 | 
											
												
													
														|  |          self.heads = {'X-Token': "da4ab6bc5cbf1dfa"}
 |  |          self.heads = {'X-Token': "da4ab6bc5cbf1dfa"}
 | 
											
												
													
														|  |          self.refresh_token = self.get_refresh_token()
 |  |          self.refresh_token = self.get_refresh_token()
 | 
											
										
											
												
													
														|  | @@ -71,16 +71,7 @@ class SpCampaign:
 | 
											
												
													
														|  |      def get_spcampaign_data(self):
 |  |      def get_spcampaign_data(self):
 | 
											
												
													
														|  |          tem = SPClient(**self.AWS_CREDENTIALS)
 |  |          tem = SPClient(**self.AWS_CREDENTIALS)
 | 
											
												
													
														|  |          camid_list = self.get_campaignid()
 |  |          camid_list = self.get_campaignid()
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        chunks = []
 |  | 
 | 
											
												
													
														|  | -        for i in range(0, len(camid_list), 100):
 |  | 
 | 
											
												
													
														|  | -            chunk = camid_list[i:i + 100]
 |  | 
 | 
											
												
													
														|  | -            chunks.append(chunk)
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        dict_tem = tem.get_spbudgetrecommendation(camid_list)
 |  | 
 | 
											
												
													
														|  | -        list_tem = dict_tem.get('budgetRecommendationsSuccessResults')
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +        list_tem = tem.iter_budgetrecommendation(camid_list)
 | 
											
												
													
														|  |          df_spbudgetrecommendation = pd.json_normalize(list(list_tem))
 |  |          df_spbudgetrecommendation = pd.json_normalize(list(list_tem))
 | 
											
												
													
														|  |          return df_spbudgetrecommendation
 |  |          return df_spbudgetrecommendation
 | 
											
												
													
														|  |  
 |  |  
 |