Re: Why error in BudgetOrders snippet? Failed to read from AdWords. Please wait a bit and try again.

2017-08-18 Thread Mikael Wallgren
Hello,

I just tried to run the example code but it failed because of syntax error. 
It was a extra ")" on this line "Logger.log("Budget Order [" + 
budgetOrder.getName() + "] base spending limit: " + limitText));"


Here is a working piece of code:

function main() {
  getBaseSpendingLimit()
}

function getBaseSpendingLimit() {
  var budgetOrderIterator = AdWordsApp.budgetOrders().get();
  while (budgetOrderIterator.hasNext()) {
var budgetOrder = budgetOrderIterator.next();
var limitText = "";
if (budgetOrder.getSpendingLimit() == null) {
  limitText = "unlimited";
} else if (budgetOrder.getTotalAdjustments() == null) {
  limitText = budgetOrder.getSpendingLimit();
} else {
  limitText = budgetOrder.getSpendingLimit() - 
budgetOrder.getTotalAdjustments();
}
Logger.log("Budget Order [" + budgetOrder.getName() + "] base spending 
limit: " + limitText);
  }
}


Den fredag 18 augusti 2017 kl. 11:19:20 UTC+2 skrev Александр Ризун:
>
> Hello. Sorry, for my bad english. I use translate.
>  I want use first BudgetOrders snippet here 
> . 
> But i get error: Failed to read from AdWords. Please wait a bit and try 
> again. (line 5). 
> Why? What am I doing wrong?
>
>
> 
> Tnx for answers.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/95abfb67-b434-44e7-ade2-42c508b72142%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why error in BudgetOrders snippet? Failed to read from AdWords. Please wait a bit and try again.

2017-08-18 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum
Hi, 

On this forum, we address questions specific to AdWords API. Since your 
question is about the AdWords Scripts, could you please post your question 
on the AdWords Scripts forum 
?

Thanks,
Sreelakshmi, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ede756e4-5dac-451b-89b1-509027df3770%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.