Re: How to change the status of a keyword (criterion)?

2017-10-24 Thread 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
Hi, 

You need to set the BiddableAdGroupCriterion.userStatus 

 to 
PAUSED in the SET operation to pause a criterion. I'm afraid Kotlin is not 
one of the supported languages. In the Java client library, you need to set 
the status to PAUSED as shown here 
.
 
You can set the status in a similar manner in Kotlin. 

Regards,
Shwetha, 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/a249d566-583b-4c94-8128-b2f0a9bd3381%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to change the status of a keyword (criterion)?

2017-10-24 Thread abe
The Code example should look like this sorry:
fun ChangeKeywordStatus(keywordId: Long, adGroupId: Long) {
val keyword = Criterion()
keyword.id = keywordId


val biddableAdGroupCriterion = BiddableAdGroupCriterion()
biddableAdGroupCriterion.adGroupId = adGroupId
biddableAdGroupCriterion.criterion = keyword

//WHAT DO I DO HERE?


// Create operations.
val operation = AdGroupCriterionOperation()
operation.operand = biddableAdGroupCriterion
operation.operator = Operator.SET

val result = campaignService.mutate(arrayOf(operation))
}


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/17c9bf8e-4802-4600-a23d-018086d128eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to change the status of a keyword (criterion)?

2017-10-24 Thread abe
The code example should look like this sorry:

 
   fun ChangeKeywordStatus(keywordId: Long, adGroupId: Long) {
val keyword = Criterion()
keyword.id = keywordId


val biddableAdGroupCriterion = BiddableAdGroupCriterion()
biddableAdGroupCriterion.adGroupId = adGroupId
biddableAdGroupCriterion.criterion = keyword

//WHAT DO I DO HERE?


// Create operations.
val operation = AdGroupCriterionOperation()
operation.operand = biddableAdGroupCriterion
operation.operator = Operator.SET

val result = campaignService.mutate(arrayOf(operation))
}



On Tuesday, October 24, 2017 at 6:56:15 AM UTC-7, a...@spatially.com wrote:
>
> I'm trying to create a function in a Kotlin application (which uses the 
> Java API) that will update the status of the keyword.  By looking over the 
> documentation i've been able to get close, but I'm not clear on what 
> exactly I need to do to set the status.  This is what I have so far:
>
> fun ChangeKeywordStatus(keywordId: Long, adGroupId: Long) {
> val keyword = Criterion()
> keyword.id = keywordId
>
>
> val biddableAdGroupCriterion = BiddableAdGroupCriterion()
> biddableAdGroupCriterion.adGroupId = adGroupId
> biddableAdGroupCriterion.criterion = keyword
> 
> //WHAT DO I DO HERE?
>
>
> // Create operations.
> val operation = AdGroupCriterionOperation()
> operation.operand = biddableAdGroupCriterion
> operation.operator = Operator.SET
>
> val result = campaignService.mutate(arrayOf(operation))
> }
>
> I've looked at the Criterion class but there doesn't appear to be any 
> thing that handles status.  What step am I missing to set the status of my 
> keyword?
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/42b433f6-b9d3-414c-976e-08a398c612df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to change the status of a keyword (criterion)?

2017-10-24 Thread abe
I'm trying to create a function in a Kotlin application (which uses the 
Java API) that will update the status of the keyword.  By looking over the 
documentation i've been able to get close, but I'm not clear on what 
exactly I need to do to set the status.  This is what I have so far:

fun ChangeKeywordStatus(keywordId: Long, adGroupId: Long) {
val keyword = Criterion()
keyword.id = keywordId


val biddableAdGroupCriterion = BiddableAdGroupCriterion()
biddableAdGroupCriterion.adGroupId = adGroupId
biddableAdGroupCriterion.criterion = keyword

//WHAT DO I DO HERE?


// Create operations.
val operation = AdGroupCriterionOperation()
operation.operand = biddableAdGroupCriterion
operation.operator = Operator.SET




val operation = CampaignOperation()
operation.operand = campaign
operation.operator = Operator.SET
val result = campaignService.mutate(arrayOf(operation))
}

I've looked at the Criterion class but there doesn't appear to be any thing 
that handles status.  What step am I missing to set the status of my 
keyword?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/6dc86212-d674-4e1a-9bec-a5598c40ab23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.