Hi Thanet,
Has there been any news about sourceUrl?
Thanks!
---
Yoshimasa
On Thursday, January 31, 2019 at 4:17:40 PM UTC+9, Thanet Knack
Praneenararat (AdWords API Team) wrote:
>
> Hello Tanabe,
>
> I'll check with Engineering and get back to you soon.
>
> Best,
> Thanet, AdWords API Team
>
> On Tuesday, January 29, 2019 at 9:41:59 PM UTC+9, Yoshimasa Tanabe wrote:
>>
>> Hi,
>>
>> Is there any way to get YouTube video's original file name(like foo.mp4)
>> the user uploaded?
>>
>> I referred the API doc[1] and found the following fields look like
>> related.
>>
>> * sourceUrl: The URL of where the original media was downloaded from (or
>> a file name).
>> * name: The name of the media. The name can be used by clients to help
>> identify previously uploaded media.
>>
>> But I get the Video object has the empty sourceUrl and the name is
>> Video(YouTube) title, not the file name.
>>
>>
>> {
>> name=<This is Video title, not the file name>,
>> sourceUrl=, // empty
>> // other fields
>> ...
>> }
>>
>>
>> Am I missing something?
>>
>> ...
>>
>> Code snippet is here(Scala).
>>
>> * "com.google.api-ads" % "ads-lib" % 4.1.0
>> * "com.google.api-ads" % "adwords-axis" % 4.1.0
>>
>> import com.google.api.ads.adwords.axis.factory.AdWordsServices
>> import com.google.api.ads.adwords.axis.utils.v201806.SelectorBuilder
>> import com.google.api.ads.adwords.axis.v201806.cm.MediaServiceInterface
>> import com.google.api.ads.adwords.lib.client.AdWordsSession
>> import com.google.api.ads.adwords.lib.selectorfields.v201806.cm.
>> MediaField
>>
>>
>> val mediaServiceSelector = new SelectorBuilder()
>> .fields(
>> MediaField.MediaId,
>> MediaField.YouTubeVideoIdString,
>> MediaField.Name,
>> MediaField.SourceUrl,
>> MediaField.StreamingUrl
>> )
>> .in(MediaField.Type, "VIDEO")
>> .build()
>>
>>
>> val session = new AdWordsSession.Builder()
>> .withOAuth2Credential(<credential>)
>> .withDeveloperToken(<developerToken>)
>> .withClientCustomerId(<target_client_customer_id>)
>> .build()
>>
>>
>> AdWordsServices.getInstance()
>> .get(session, classOf[MediaServiceInterface])
>> .get(mediaServiceSelector)
>>
>>
>> [1]
>> https://developers.google.com/adwords/api/docs/reference/v201806/MediaService.Video
>> [2] https://developers.google.com/youtube/v3/docs/videos#header_2
>>
>> ---
>>
>> Yoshimasa
>>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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/845814d2-48a1-4866-8637-cde9a1613fa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.