Re: calling getData() on an image always returns null in PHP library

2017-06-16 Thread Joel Shapiro
Sorry, I mispoke, the Image class includes the getData() function, but 
you're saying that it cannot be used. Why is getData() included in the 
class? It seems as though it is inviting confusion to include class 
functions that appear to do something obvious but serve little purpose.

Maybe I'm the only one who expects a getData() function to return data, I 
don't know.

On Thursday, June 15, 2017 at 10:36:45 PM UTC-7, Peter Oliquino wrote:
>
> Hi Joel,
>
> Could you confirm if this (Data 
> )
>  is 
> the documentation that you are referring to? Currently, there is no mention 
> that the said field can be selected, otherwise you will see something 
> similar as seen in the Name 
> 
>  field 
> (This field can be selected using the value "Name"). I hope this has been 
> helpful and please feel free to write back if you have any follow up 
> questions.
>
> Best regards,
> Peter
> 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/0b6ce905-fd20-4169-a2b4-798c99ee1bbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: calling getData() on an image always returns null in PHP library

2017-06-15 Thread 'Peter Oliquino' via AdWords API Forum
Hi Joel,

Could you confirm if this (Data 
)
 is 
the documentation that you are referring to? Currently, there is no mention 
that the said field can be selected, otherwise you will see something 
similar as seen in the Name 

 field 
(This field can be selected using the value "Name"). I hope this has been 
helpful and please feel free to write back if you have any follow up 
questions.

Best regards,
Peter
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/e18f3d7c-12b3-4f49-8961-361e02ae8cfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: calling getData() on an image always returns null in PHP library

2017-06-15 Thread Joel Shapiro
Thank you for the response, but is there a way that I could have known 
this? The documentation includes getData() but it sounds like you're saying 
that there's no way to use it. Can you explain how one would successfully 
use getData() on an image?

On Wednesday, June 14, 2017 at 11:07:54 PM UTC-7, Peter Oliquino wrote:
>
> Hi Joel, 
>
> I'm afraid you cannot retrieve the raw image data of a Media using 
> MediaService. If you would like to reuse existing Images to create new 
> ResponsiveDisplayAds, you can populate the Image.mediaId 
> 
>  field 
> with the MediaId as shown here 
> .
>  
> You can use MediaService to retrieve the uploaded images as shown here 
> 
> .
>
> Regards,
> Peter
> 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/53ec0c8e-6c27-4f06-a1cf-682831e637eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: calling getData() on an image always returns null in PHP library

2017-06-15 Thread 'Peter Oliquino' via AdWords API Forum
Hi Joel, 

I'm afraid you cannot retrieve the raw image data of a Media using 
MediaService. If you would like to reuse existing Images to create new 
ResponsiveDisplayAds, you can populate the Image.mediaId 

 field 
with the MediaId as shown here 
.
 
You can use MediaService to retrieve the uploaded images as shown here 

.

Regards,
Peter
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/e6bf8ae5-cdc4-4fff-9c1a-4ea697674ec9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


calling getData() on an image always returns null in PHP library

2017-06-14 Thread Joel Shapiro
I'm trying to extract data from an existing ResponsiveDisplayAd and move it 
to another following the example in AddResponsiveDisplayAd.php and instead 
of calling:

$image->setData(file_get_contents('http://goo.gl/3b9Wfh'));

would like to call 

$image->setData($originalImage->getData());

The documentation here 
(https://developers.google.com/adwords/api/docs/reference/v201702/MediaService.Image)
 
doesn't lead me to believe that I need to add anything to my selectors. 
These are what I'm selecting right now when I hit the AdGroupService:

$selector->setFields([
'Id',
'AdType',
'BaseAdGroupId',
'CreativeFinalUrls',
'CreativeTrackingUrlTemplate',
'Name',
'Dimensions',
'DisplayUrl',
'MarketingImage',
'LogoImage',
'ShortHeadline',
'LongHeadline',
'Description',
'BusinessName',
'MediaId',
'Urls'
]);

In the results I access the image via

*foreach *($page->getEntries() *as *$adGroupAd) {
$currAd = $adGroupAd->getAd();
$marketingImage = $currAd->getMarketingImage();

$marketingImage->getData() === null // true
$marketingImageURLs = $marketingImage->getUrls();

$marketingImageURLs[0]->getValue(); // string of image URL
}

I don't want to have to use file_get_contents with the image's URL like the 
example, getData() seems like it should be the way to do this. Any help is 
greatly appreciated.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/95a5e238-9a78-4eb0-b9f4-a1995a19f3cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.