diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2015-07-05 14:06:58 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2015-07-05 14:10:06 +0100 |
commit | 3663353499edf0a11cfcf5c82b3c83c2cf53e1c5 (patch) | |
tree | 6504bbf8695f14892be8f6fd434d908a69a12181 | |
parent | 2b1823af2ee212bc4079f42dd432b89089ae6f47 (diff) | |
download | libgdata-3663353499edf0a11cfcf5c82b3c83c2cf53e1c5.tar.gz |
tests: Port and re-enable the YouTube batch API tests
Now testing that GDataYouTubeService no longer claims to support batch
operations, rather than testing that they work.
https://developers.google.com/youtube/v3/guides/implementation/deprecated#Batch_Processing
https://bugzilla.gnome.org/show_bug.cgi?id=750914
-rw-r--r-- | gdata/tests/traces/youtube/batch | 60 | ||||
-rw-r--r-- | gdata/tests/traces/youtube/batch-async | 30 | ||||
-rw-r--r-- | gdata/tests/traces/youtube/setup-batch | 206 | ||||
-rw-r--r-- | gdata/tests/youtube.c | 29 |
4 files changed, 188 insertions, 137 deletions
diff --git a/gdata/tests/traces/youtube/batch b/gdata/tests/traces/youtube/batch index 0c32c49a..e69de29b 100644 --- a/gdata/tests/traces/youtube/batch +++ b/gdata/tests/traces/youtube/batch @@ -1,60 +0,0 @@ -> POST /feeds/api/videos/batch HTTP/1.1 -> Soup-Debug-Timestamp: 1375254131 -> Soup-Debug: SoupSession 1 (0x6672e0), SoupMessage 5 (0x7050b0), SoupSocket 2 (0x6babc0) -> Host: gdata.youtube.com -> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw -> Authorization: GoogleLogin auth=DQAAANUAAACG3vwyOXQ0cHOiv20qTOfwhyHhCL9dCZd-E9xcumpupwEpBg8cOa_l_8gV1-AjFB6KgFo0bFC0zhihW7vzfb-CAMBPEm4sCnlyJsjxzk6XIN6_OIUhIFFXKFIlRQgoV0VC044LromanYLK1Dx5At8rOKFxlTraPzB2K8BO_KmBLckQGlC0WM9-YSo7Wp5KdbxEZwMauNHSUNzRSIyR5iHhdDEczGzB-Xy8RYdgEpsu2etKFKhX0HsMVb6bGO1yFKpNkhw3E4Pb0yo6R_NZnwSSAZVr7bs3YlzzGsxW82x7Hg -> GData-Version: 2 -> Content-Type: application/atom+xml -> Accept-Encoding: gzip, deflate -> Connection: Keep-Alive -> -> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-31T07:02:11Z</updated><entry><title type='text'>Batch operation query</title><id>https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY</id><updated>2013-07-31T07:02:11Z</updated><batch:id>1</batch:id><batch:operation type='query'/></entry></feed> - -< HTTP/1.1 200 OK -< Soup-Debug-Timestamp: 1375254131 -< Soup-Debug: SoupMessage 5 (0x7050b0) -< X-GData-User-Country: CZ -< Content-Type: application/atom+xml; charset=UTF-8; type=feed -< GData-Version: 2.1 -< Date: Wed, 31 Jul 2013 07:02:11 GMT -< Expires: Wed, 31 Jul 2013 07:02:11 GMT -< Cache-control: private, max-age=0 -< X-Content-Type-Options: nosniff -< X-Frame-Options: SAMEORIGIN -< X-XSS-Protection: 1; mode=block -< Content-Length: 6092 -< Server: GSE -< -< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom'><id>https://gdata.youtube.com/feeds/api/videos/batch/1375254131564</id><updated>2013-07-31T07:02:11.743Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><title type='text'>Batch operation feed</title><entry xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/"CUIARH47eCp7I2A9WhFQEkQ."'><id>tag:youtube.com,2008:video:RzR2k8yo4NY</id><published>2010-08-02T19:52:59.000Z</published><updated>2013-07-08T14:25:45.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/><title>Fooish Bar</title><content type='application/x-shockwave-flash' src='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata'/><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=RzR2k8yo4NY'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILUnpSMms4eW80Tlk&sig=MC0CFD7lgKoXlr3N-IslZJpLpMuWbo7rAhUAj6YD3ZQek85FGa1zB9HzHHsMcxk&user_starttime=1374537600000&user_endtime=1375142400000&exp=1375257731676&devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><batch:id>1</batch:id><batch:operation type='query'/><batch:status code='200' reason='Success'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/comments' countHint='513'/></gd:comments><media:group><media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='12' yt:format='5'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYDSANFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='1'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYESARFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='6'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'/><media:keywords/><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/default.jpg' height='90' width='120' time='00:00:06' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/1.jpg' height='90' width='120' time='00:00:03' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/2.jpg' height='90' width='120' time='00:00:06' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/3.jpg' height='90' width='120' time='00:00:09' yt:name='end'/><media:title type='plain'>Fooish Bar</media:title><yt:duration seconds='12'/><yt:uploaded>2010-08-02T19:52:59.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>RzR2k8yo4NY</yt:videoid></media:group><yt:statistics favoriteCount='0' viewCount='9'/></entry></feed> - -> POST /feeds/api/videos/batch HTTP/1.1 -> Soup-Debug-Timestamp: 1375254131 -> Soup-Debug: SoupSession 1 (0x6672e0), SoupMessage 6 (0x705290), SoupSocket 3 (0x6bae00) -> Host: gdata.youtube.com -> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw -> Authorization: GoogleLogin auth=DQAAANUAAACG3vwyOXQ0cHOiv20qTOfwhyHhCL9dCZd-E9xcumpupwEpBg8cOa_l_8gV1-AjFB6KgFo0bFC0zhihW7vzfb-CAMBPEm4sCnlyJsjxzk6XIN6_OIUhIFFXKFIlRQgoV0VC044LromanYLK1Dx5At8rOKFxlTraPzB2K8BO_KmBLckQGlC0WM9-YSo7Wp5KdbxEZwMauNHSUNzRSIyR5iHhdDEczGzB-Xy8RYdgEpsu2etKFKhX0HsMVb6bGO1yFKpNkhw3E4Pb0yo6R_NZnwSSAZVr7bs3YlzzGsxW82x7Hg -> GData-Version: 2 -> Content-Type: application/atom+xml -> Accept-Encoding: gzip, deflate -> Connection: Keep-Alive -> -> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-31T07:02:11Z</updated><entry><title type='text'>Batch operation query</title><id>https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI</id><updated>2013-07-31T07:02:11Z</updated><batch:id>2</batch:id><batch:operation type='query'/></entry><entry><title type='text'>Batch operation query</title><id>https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY</id><updated>2013-07-31T07:02:11Z</updated><batch:id>1</batch:id><batch:operation type='query'/></entry></feed> - -< HTTP/1.1 200 OK -< Soup-Debug-Timestamp: 1375254132 -< Soup-Debug: SoupMessage 6 (0x705290) -< X-GData-User-Country: CZ -< Content-Type: application/atom+xml; charset=UTF-8; type=feed -< GData-Version: 2.1 -< Date: Wed, 31 Jul 2013 07:02:12 GMT -< Expires: Wed, 31 Jul 2013 07:02:12 GMT -< Cache-control: private, max-age=0 -< X-Content-Type-Options: nosniff -< X-Frame-Options: SAMEORIGIN -< X-XSS-Protection: 1; mode=block -< Content-Length: 11781 -< Server: GSE -< -< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom'><id>https://gdata.youtube.com/feeds/api/videos/batch/1375254132056</id><updated>2013-07-31T07:02:12.238Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><title type='text'>Batch operation feed</title><entry xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/"Ak4HQ347eCp7I2A9Wx5TF0o."'><id>tag:youtube.com,2008:video:VppEcVz8qaI</id><published>2010-08-02T19:53:00.000Z</published><updated>2010-08-02T19:55:32.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/><title>Fooish Bar 2</title><content type='application/x-shockwave-flash' src='https://www.youtube.com/v/VppEcVz8qaI?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata'/><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=VppEcVz8qaI&feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=VppEcVz8qaI'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILVnBwRWNWejhxYUk&sig=MCwCFCkNXKjM54V3RF_tYx5yHylnek0KAhRPnZB1d5edDZkM-hp_efvuRtceNQ&user_starttime=1374537600000&user_endtime=1375142400000&exp=1375257732171&devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><batch:id>2</batch:id><batch:operation type='query'/><batch:status code='200' reason='Success'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/comments' countHint='0'/></gd:comments><media:group><media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/VppEcVz8qaI?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='12' yt:format='5'/><media:content url='rtsp://v1.cache8.c.youtube.com/CkULENy73wIaPAmiqfxccUSaVhMYDSANFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='1'/><media:content url='rtsp://v1.cache8.c.youtube.com/CkULENy73wIaPAmiqfxccUSaVhMYESARFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='6'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'/><media:keywords/><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=VppEcVz8qaI&feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/default.jpg' height='90' width='120' time='00:00:06' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/1.jpg' height='90' width='120' time='00:00:03' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/2.jpg' height='90' width='120' time='00:00:06' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/3.jpg' height='90' width='120' time='00:00:09' yt:name='end'/><media:title type='plain'>Fooish Bar 2</media:title><yt:duration seconds='12'/><yt:uploaded>2010-08-02T19:53:00.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>VppEcVz8qaI</yt:videoid></media:group></entry><entry xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/"CUIARH47eCp7I2A9WhFQEkQ."'><id>tag:youtube.com,2008:video:RzR2k8yo4NY</id><published>2010-08-02T19:52:59.000Z</published><updated>2013-07-08T14:25:45.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/><title>Fooish Bar</title><content type='application/x-shockwave-flash' src='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata'/><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=RzR2k8yo4NY'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILUnpSMms4eW80Tlk&sig=MC4CFQCJ6jN1_kGfZ0v_3BmWSDCJmAAwhgIVAMkiwDMpsTg2l-h-qrgK4ENuKBWb&user_starttime=1374537600000&user_endtime=1375142400000&exp=1375257732291&devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><batch:id>1</batch:id><batch:operation type='query'/><batch:status code='200' reason='Success'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/comments' countHint='513'/></gd:comments><media:group><media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='12' yt:format='5'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYDSANFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='1'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYESARFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='6'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'/><media:keywords/><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/default.jpg' height='90' width='120' time='00:00:06' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/1.jpg' height='90' width='120' time='00:00:03' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/2.jpg' height='90' width='120' time='00:00:06' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/3.jpg' height='90' width='120' time='00:00:09' yt:name='end'/><media:title type='plain'>Fooish Bar</media:title><yt:duration seconds='12'/><yt:uploaded>2010-08-02T19:52:59.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>RzR2k8yo4NY</yt:videoid></media:group><yt:statistics favoriteCount='0' viewCount='9'/></entry></feed> - diff --git a/gdata/tests/traces/youtube/batch-async b/gdata/tests/traces/youtube/batch-async index 14b07713..e69de29b 100644 --- a/gdata/tests/traces/youtube/batch-async +++ b/gdata/tests/traces/youtube/batch-async @@ -1,30 +0,0 @@ -> POST /feeds/api/videos/batch HTTP/1.1 -> Soup-Debug-Timestamp: 1375254167 -> Soup-Debug: SoupSession 1 (0x6672e0), SoupMessage 66 (0x7fffe0017470), SoupSocket 22 (0x7fffe0019540) -> Host: gdata.youtube.com -> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw -> Authorization: GoogleLogin auth=DQAAANUAAACG3vwyOXQ0cHOiv20qTOfwhyHhCL9dCZd-E9xcumpupwEpBg8cOa_l_8gV1-AjFB6KgFo0bFC0zhihW7vzfb-CAMBPEm4sCnlyJsjxzk6XIN6_OIUhIFFXKFIlRQgoV0VC044LromanYLK1Dx5At8rOKFxlTraPzB2K8BO_KmBLckQGlC0WM9-YSo7Wp5KdbxEZwMauNHSUNzRSIyR5iHhdDEczGzB-Xy8RYdgEpsu2etKFKhX0HsMVb6bGO1yFKpNkhw3E4Pb0yo6R_NZnwSSAZVr7bs3YlzzGsxW82x7Hg -> GData-Version: 2 -> Content-Type: application/atom+xml -> Accept-Encoding: gzip, deflate -> Connection: Keep-Alive -> -> <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005'><title type='text'>Batch operation feed</title><id>batch1</id><updated>2013-07-31T07:02:47Z</updated><entry><title type='text'>Batch operation query</title><id>https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY</id><updated>2013-07-31T07:02:47Z</updated><batch:id>1</batch:id><batch:operation type='query'/></entry></feed> - -< HTTP/1.1 200 OK -< Soup-Debug-Timestamp: 1375254168 -< Soup-Debug: SoupMessage 66 (0x7fffe0017470) -< X-GData-User-Country: CZ -< Content-Type: application/atom+xml; charset=UTF-8; type=feed -< GData-Version: 2.1 -< Date: Wed, 31 Jul 2013 07:02:47 GMT -< Expires: Wed, 31 Jul 2013 07:02:47 GMT -< Cache-control: private, max-age=0 -< X-Content-Type-Options: nosniff -< X-Frame-Options: SAMEORIGIN -< X-XSS-Protection: 1; mode=block -< Content-Length: 6092 -< Server: GSE -< -< <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom'><id>https://gdata.youtube.com/feeds/api/videos/batch/1375254167801</id><updated>2013-07-31T07:02:47.986Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><title type='text'>Batch operation feed</title><entry xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/"DkYCQH47eCp7I2A9WhFWEkg."'><id>tag:youtube.com,2008:video:RzR2k8yo4NY</id><published>2010-08-02T19:52:59.000Z</published><updated>2013-07-31T07:02:41.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/><title>Fooish Bar</title><content type='application/x-shockwave-flash' src='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata'/><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=RzR2k8yo4NY'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILUnpSMms4eW80Tlk&sig=MC0CFQCkR3dx5u8EWT9HAy7sA7Yev4Z4jwIUQSnlU__jVGMgGS_jcd1-PN7yaCg&user_starttime=1374537600000&user_endtime=1375142400000&exp=1375257767913&devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><batch:id>1</batch:id><batch:operation type='query'/><batch:status code='200' reason='Success'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/comments' countHint='518'/></gd:comments><media:group><media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='12' yt:format='5'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYDSANFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='1'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYESARFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='6'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'/><media:keywords/><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/default.jpg' height='90' width='120' time='00:00:06' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/1.jpg' height='90' width='120' time='00:00:03' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/2.jpg' height='90' width='120' time='00:00:06' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/3.jpg' height='90' width='120' time='00:00:09' yt:name='end'/><media:title type='plain'>Fooish Bar</media:title><yt:duration seconds='12'/><yt:uploaded>2010-08-02T19:52:59.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>RzR2k8yo4NY</yt:videoid></media:group><yt:statistics favoriteCount='0' viewCount='9'/></entry></feed> - diff --git a/gdata/tests/traces/youtube/setup-batch b/gdata/tests/traces/youtube/setup-batch index 52001a3b..193b2405 100644 --- a/gdata/tests/traces/youtube/setup-batch +++ b/gdata/tests/traces/youtube/setup-batch @@ -1,60 +1,190 @@ -> GET /feeds/api/videos/RzR2k8yo4NY HTTP/1.1 -> Soup-Debug-Timestamp: 1375254168 -> Soup-Debug: SoupSession 1 (0x6672e0), SoupMessage 67 (0x7050b0), SoupSocket 22 (0x7fffe0019540) -> Host: gdata.youtube.com -> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw -> Authorization: GoogleLogin auth=DQAAANUAAACG3vwyOXQ0cHOiv20qTOfwhyHhCL9dCZd-E9xcumpupwEpBg8cOa_l_8gV1-AjFB6KgFo0bFC0zhihW7vzfb-CAMBPEm4sCnlyJsjxzk6XIN6_OIUhIFFXKFIlRQgoV0VC044LromanYLK1Dx5At8rOKFxlTraPzB2K8BO_KmBLckQGlC0WM9-YSo7Wp5KdbxEZwMauNHSUNzRSIyR5iHhdDEczGzB-Xy8RYdgEpsu2etKFKhX0HsMVb6bGO1yFKpNkhw3E4Pb0yo6R_NZnwSSAZVr7bs3YlzzGsxW82x7Hg +> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=RzR2k8yo4NY HTTP/1.1 +> Soup-Debug-Timestamp: 1436101151 +> Soup-Debug: SoupSession 1 (0x19c0270), SoupMessage 5 (0x19c80c0), SoupSocket 1 (0x197e1a0) +> Host: www.googleapis.com +> Authorization: Bearer ya29.pwESPgjYW0E2EhM44tP20vaeH_Xan9C4osK5Sz5yri2VoTkrRtOzQuyt1Qst1ocJyG1FKcd92gMPjg > GData-Version: 2 > Accept-Encoding: gzip, deflate +> User-Agent: libgdata/0.17.2 - gzip > Connection: Keep-Alive < HTTP/1.1 200 OK -< Soup-Debug-Timestamp: 1375254168 -< Soup-Debug: SoupMessage 67 (0x7050b0) -< X-GData-User-Country: CZ -< Content-Type: application/atom+xml; charset=UTF-8; type=entry -< Expires: Wed, 31 Jul 2013 07:02:48 GMT -< Date: Wed, 31 Jul 2013 07:02:48 GMT -< Cache-control: private, max-age=0, must-revalidate, no-transform -< Vary: * -< GData-Version: 2.1 -< ETag: W/"DkYCQH47eCp7I2A9WhFWEkg." -< Last-Modified: Wed, 31 Jul 2013 07:02:41 GMT -< Transfer-Encoding: chunked +< Soup-Debug-Timestamp: 1436101151 +< Soup-Debug: SoupMessage 5 (0x19c80c0) +< Expires: Sun, 05 Jul 2015 12:59:11 GMT +< Date: Sun, 05 Jul 2015 12:59:11 GMT +< Cache-Control: private, max-age=0, must-revalidate, no-transform +< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/yPoKiNjQzTZG23dD136F6mj0q0I" +< Vary: Origin +< Vary: X-Origin +< Content-Type: application/json; charset=UTF-8 +< Content-Encoding: gzip < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-XSS-Protection: 1; mode=block < Server: GSE +< Alternate-Protocol: 443:quic,p=1 +< Transfer-Encoding: chunked < -< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/"DkYCQH47eCp7I2A9WhFWEkg."'><id>tag:youtube.com,2008:video:RzR2k8yo4NY</id><published>2010-08-02T19:52:59.000Z</published><updated>2013-07-31T07:02:41.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/><title>Fooish Bar</title><content type='application/x-shockwave-flash' src='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata'/><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=RzR2k8yo4NY'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILUnpSMms4eW80Tlk&sig=MCwCFCLV8O8LJ6CKlXtI7VPG3G4m7VBVAhQs6tWeCmvlpI3810cy_57mNSTnSQ&user_starttime=1374537600000&user_endtime=1375142400000&exp=1375257768279&devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/RzR2k8yo4NY/comments' countHint='518'/></gd:comments><media:group><media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/RzR2k8yo4NY?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='12' yt:format='5'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYDSANFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='1'/><media:content url='rtsp://v5.cache8.c.youtube.com/CkULENy73wIaPAnW4KjMk3Y0RxMYESARFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='6'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'/><media:keywords/><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=RzR2k8yo4NY&feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/default.jpg' height='90' width='120' time='00:00:06' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/1.jpg' height='90' width='120' time='00:00:03' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/2.jpg' height='90' width='120' time='00:00:06' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/RzR2k8yo4NY/3.jpg' height='90' width='120' time='00:00:09' yt:name='end'/><media:title type='plain'>Fooish Bar</media:title><yt:duration seconds='12'/><yt:uploaded>2010-08-02T19:52:59.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>RzR2k8yo4NY</yt:videoid></media:group><yt:statistics favoriteCount='0' viewCount='9'/></entry> +< { +< "kind": "youtube#videoListResponse", +< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/yPoKiNjQzTZG23dD136F6mj0q0I\"", +< "pageInfo": { +< "totalResults": 1, +< "resultsPerPage": 1 +< }, +< "items": [ +< { +< "kind": "youtube#video", +< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/lRR4sqJsoxbhbN_5Me7exq34A8U\"", +< "id": "RzR2k8yo4NY", +< "snippet": { +< "publishedAt": "2010-08-02T19:52:59.000Z", +< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA", +< "title": "Fooish Bar", +< "description": "", +< "thumbnails": { +< "default": { +< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/default.jpg", +< "width": 120, +< "height": 90 +< }, +< "medium": { +< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/mqdefault.jpg", +< "width": 320, +< "height": 180 +< }, +< "high": { +< "url": "https://i.ytimg.com/vi/RzR2k8yo4NY/hqdefault.jpg", +< "width": 480, +< "height": 360 +< } +< }, +< "channelTitle": "GDataTest", +< "categoryId": "22", +< "liveBroadcastContent": "none", +< "localized": { +< "title": "Fooish Bar", +< "description": "" +< } +< }, +< "contentDetails": { +< "duration": "PT12S", +< "dimension": "2d", +< "definition": "sd", +< "caption": "false", +< "licensedContent": false +< }, +< "status": { +< "uploadStatus": "processed", +< "privacyStatus": "public", +< "license": "youtube", +< "embeddable": true, +< "publicStatsViewable": true +< }, +< "statistics": { +< "viewCount": "10", +< "likeCount": "0", +< "dislikeCount": "0", +< "favoriteCount": "0", +< "commentCount": "584" +< } +< } +< ] +< } -> GET /feeds/api/videos/VppEcVz8qaI HTTP/1.1 -> Soup-Debug-Timestamp: 1375254168 -> Soup-Debug: SoupSession 1 (0x6672e0), SoupMessage 68 (0x705290), SoupSocket 22 (0x7fffe0019540) -> Host: gdata.youtube.com -> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw -> Authorization: GoogleLogin auth=DQAAANUAAACG3vwyOXQ0cHOiv20qTOfwhyHhCL9dCZd-E9xcumpupwEpBg8cOa_l_8gV1-AjFB6KgFo0bFC0zhihW7vzfb-CAMBPEm4sCnlyJsjxzk6XIN6_OIUhIFFXKFIlRQgoV0VC044LromanYLK1Dx5At8rOKFxlTraPzB2K8BO_KmBLckQGlC0WM9-YSo7Wp5KdbxEZwMauNHSUNzRSIyR5iHhdDEczGzB-Xy8RYdgEpsu2etKFKhX0HsMVb6bGO1yFKpNkhw3E4Pb0yo6R_NZnwSSAZVr7bs3YlzzGsxW82x7Hg +> GET /youtube/v3/videos?part=contentDetails,id,recordingDetails,snippet,status,statistics&id=VppEcVz8qaI HTTP/1.1 +> Soup-Debug-Timestamp: 1436101151 +> Soup-Debug: SoupSession 1 (0x19c0270), SoupMessage 6 (0x19c80c0), SoupSocket 1 (0x197e1a0) +> Host: www.googleapis.com +> Authorization: Bearer ya29.pwESPgjYW0E2EhM44tP20vaeH_Xan9C4osK5Sz5yri2VoTkrRtOzQuyt1Qst1ocJyG1FKcd92gMPjg > GData-Version: 2 > Accept-Encoding: gzip, deflate +> User-Agent: libgdata/0.17.2 - gzip > Connection: Keep-Alive < HTTP/1.1 200 OK -< Soup-Debug-Timestamp: 1375254168 -< Soup-Debug: SoupMessage 68 (0x705290) -< X-GData-User-Country: CZ -< Content-Type: application/atom+xml; charset=UTF-8; type=entry -< Expires: Wed, 31 Jul 2013 07:02:48 GMT -< Date: Wed, 31 Jul 2013 07:02:48 GMT -< Cache-control: private, max-age=0, must-revalidate, no-transform -< Vary: * -< GData-Version: 2.1 -< ETag: W/"Ak4HQ347eCp7I2A9Wx5TF0o." -< Last-Modified: Mon, 02 Aug 2010 19:55:32 GMT -< Transfer-Encoding: chunked +< Soup-Debug-Timestamp: 1436101151 +< Soup-Debug: SoupMessage 6 (0x19c80c0) +< Expires: Sun, 05 Jul 2015 12:59:11 GMT +< Date: Sun, 05 Jul 2015 12:59:11 GMT +< Cache-Control: private, max-age=0, must-revalidate, no-transform +< ETag: "Y3xTLFF3RLtHXX85JBgzzgp2Enw/cRprItFQU9gtLUNK1easmLQu9KY" +< Vary: Origin +< Vary: X-Origin +< Content-Type: application/json; charset=UTF-8 +< Content-Encoding: gzip < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-XSS-Protection: 1; mode=block < Server: GSE +< Alternate-Protocol: 443:quic,p=1 +< Transfer-Encoding: chunked < -< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/"Ak4HQ347eCp7I2A9Wx5TF0o."'><id>tag:youtube.com,2008:video:VppEcVz8qaI</id><published>2010-08-02T19:53:00.000Z</published><updated>2010-08-02T19:55:32.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/><title>Fooish Bar 2</title><content type='application/x-shockwave-flash' src='https://www.youtube.com/v/VppEcVz8qaI?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata'/><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=VppEcVz8qaI&feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=VppEcVz8qaI'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILVnBwRWNWejhxYUk&sig=MCwCFB73Kis0tG2U7AehqVMYAHnG2rKjAhRa3ZbuRbVY8P4-o4utuxDrRd_HhQ&user_starttime=1374537600000&user_endtime=1375142400000&exp=1375257768529&devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/VppEcVz8qaI/comments' countHint='0'/></gd:comments><media:group><media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/VppEcVz8qaI?version=3&f=videos&d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='12' yt:format='5'/><media:content url='rtsp://v1.cache8.c.youtube.com/CkULENy73wIaPAmiqfxccUSaVhMYDSANFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='1'/><media:content url='rtsp://v1.cache8.c.youtube.com/CkULENy73wIaPAmiqfxccUSaVhMYESARFEgGUgZ2aWRlb3NyIQESu_0sgf-YikLxr8LJPtA-DvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='12' yt:format='6'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'/><media:keywords/><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=VppEcVz8qaI&feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/default.jpg' height='90' width='120' time='00:00:06' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/1.jpg' height='90' width='120' time='00:00:03' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/2.jpg' height='90' width='120' time='00:00:06' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/VppEcVz8qaI/3.jpg' height='90' width='120' time='00:00:09' yt:name='end'/><media:title type='plain'>Fooish Bar 2</media:title><yt:duration seconds='12'/><yt:uploaded>2010-08-02T19:53:00.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>VppEcVz8qaI</yt:videoid></media:group></entry> +< { +< "kind": "youtube#videoListResponse", +< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/cRprItFQU9gtLUNK1easmLQu9KY\"", +< "pageInfo": { +< "totalResults": 1, +< "resultsPerPage": 1 +< }, +< "items": [ +< { +< "kind": "youtube#video", +< "etag": "\"Y3xTLFF3RLtHXX85JBgzzgp2Enw/ArOIe0olv2CLSw9uGNjdizfzrVk\"", +< "id": "VppEcVz8qaI", +< "snippet": { +< "publishedAt": "2010-08-02T19:53:00.000Z", +< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA", +< "title": "Fooish Bar 2", +< "description": "", +< "thumbnails": { +< "default": { +< "url": "https://i.ytimg.com/vi/VppEcVz8qaI/default.jpg", +< "width": 120, +< "height": 90 +< }, +< "medium": { +< "url": "https://i.ytimg.com/vi/VppEcVz8qaI/mqdefault.jpg", +< "width": 320, +< "height": 180 +< }, +< "high": { +< "url": "https://i.ytimg.com/vi/VppEcVz8qaI/hqdefault.jpg", +< "width": 480, +< "height": 360 +< } +< }, +< "channelTitle": "GDataTest", +< "categoryId": "22", +< "liveBroadcastContent": "none", +< "localized": { +< "title": "Fooish Bar 2", +< "description": "" +< } +< }, +< "contentDetails": { +< "duration": "PT12S", +< "dimension": "2d", +< "definition": "sd", +< "caption": "false", +< "licensedContent": false +< }, +< "status": { +< "uploadStatus": "processed", +< "privacyStatus": "public", +< "license": "youtube", +< "embeddable": true, +< "publicStatsViewable": true +< }, +< "statistics": { +< "viewCount": "1", +< "likeCount": "0", +< "dislikeCount": "0", +< "favoriteCount": "0", +< "commentCount": "0" +< } +< } +< ] +< } diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c index b13bb464..b43c6293 100644 --- a/gdata/tests/youtube.c +++ b/gdata/tests/youtube.c @@ -2594,11 +2594,14 @@ test_batch (BatchData *data, gconstpointer service) g_object_unref (service2); g_free (feed_uri); - /* Run a singleton batch operation to query one of the entries */ + /* Run a singleton batch operation to query one of the entries. This + * should now always fail, as batch operations were deprecated by v3 + * of the YouTube API. */ gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL, NULL); - g_assert (gdata_batch_operation_run (operation, NULL, &error) == TRUE); - g_assert_no_error (error); + g_assert (!gdata_batch_operation_run (operation, NULL, &error)); + g_assert_error (error, GDATA_SERVICE_ERROR, + GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION); g_clear_error (&error); g_object_unref (operation); @@ -2612,8 +2615,9 @@ test_batch (BatchData *data, gconstpointer service) NULL); g_assert_cmpuint (op_id, !=, op_id2); - g_assert (gdata_batch_operation_run (operation, NULL, &error) == TRUE); - g_assert_no_error (error); + g_assert (!gdata_batch_operation_run (operation, NULL, &error)); + g_assert_error (error, GDATA_SERVICE_ERROR, + GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION); g_clear_error (&error); g_object_unref (operation); @@ -2626,8 +2630,9 @@ test_batch_async_cb (GDataBatchOperation *operation, GAsyncResult *async_result, { GError *error = NULL; - g_assert (gdata_batch_operation_run_finish (operation, async_result, &error) == TRUE); - g_assert_no_error (error); + g_assert (!gdata_batch_operation_run_finish (operation, async_result, &error)); + g_assert_error (error, GDATA_SERVICE_ERROR, + GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION); g_clear_error (&error); g_main_loop_quit (main_loop); @@ -2638,13 +2643,14 @@ test_batch_async (BatchData *data, gconstpointer service) { GDataBatchOperation *operation; GMainLoop *main_loop; + GError *error = NULL; gdata_test_mock_server_start_trace (mock_server, "batch-async"); /* Run an async query operation on the video */ operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), gdata_youtube_service_get_primary_authorization_domain (), "https://gdata.youtube.com/feeds/api/videos/batch"); - gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL, NULL); + gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL, &error); main_loop = g_main_loop_new (NULL, TRUE); @@ -2653,6 +2659,10 @@ test_batch_async (BatchData *data, gconstpointer service) g_main_loop_run (main_loop); g_main_loop_unref (main_loop); + g_assert_error (error, GDATA_SERVICE_ERROR, + GDATA_SERVICE_ERROR_WITH_BATCH_OPERATION); + g_clear_error (&error); + uhm_server_end_trace (mock_server); } @@ -2886,11 +2896,12 @@ main (int argc, char *argv[]) gdata_tear_down_async_test_data); g_test_add ("/youtube/categories/async/cancellation", GDataAsyncTestData, service, gdata_set_up_async_test_data, test_categories_async_cancellation, gdata_tear_down_async_test_data); +#endif g_test_add ("/youtube/batch", BatchData, service, setup_batch, test_batch, teardown_batch); g_test_add ("/youtube/batch/async", BatchData, service, setup_batch, test_batch_async, teardown_batch); g_test_add ("/youtube/batch/async/cancellation", BatchData, service, setup_batch, test_batch_async_cancellation, teardown_batch); -#endif + g_test_add_func ("/youtube/service/properties", test_service_properties); g_test_add_func ("/youtube/parsing/app:control", test_parsing_app_control); |