zilzar / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

PublishedAtRaw and PublishedAt both return "nothing" value #705

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
    Async Sub Test()
        Dim bOk As Boolean = False
        Dim objListRequest As VideosResource.ListRequest = Nothing
        Dim objVideoListResponse As VideoListResponse = Nothing
        Dim objYouTubeService As YouTubeService = Nothing
        Dim strVideoIds() As String = {"qy9qJEv0SHs", "PyEOOypNcFw", "kEyci_kQ0ls", "GfMaE3foMCY", "B_iWgBdayQU", "EhoGEBvmVPc", "EZ60rDovypQ"}
        Try
            objYouTubeService = New YouTubeService(New BaseClientService.Initializer() With { _
                 .HttpClientInitializer = OAUth2Credential, _
                 .ApplicationName = Assembly.GetExecutingAssembly().GetName().Name})
            bOk = True
        Catch ex As Exception
            MsgBox("YouTubeService call error: " & ex.Message, MsgBoxStyle.Critical, "Instantiating YouTubeService")
        End Try
        If bOk Then
            Try
                objListRequest = New VideosResource.ListRequest(objYouTubeService, "id,snippet,recordingDetails,status")
                objListRequest.Id = String.Join(",", strVideoIds)
                objVideoListResponse = Await objListRequest.ExecuteAsync
                For Each objVideo As Video In objVideoListResponse.Items
                    If objVideo.RecordingDetails.RecordingDate Is Nothing Then
                        Console.WriteLine(objVideo.Id & " RecordingDate=Nothing")
                    Else
                        Console.WriteLine(objVideo.Id & " RecordingDate=" & Format(objVideo.RecordingDetails.RecordingDate, "MM/dd/yyy"))
                    End If

                    If objVideo.Status.PublishAt Is Nothing Then
                        Console.WriteLine(objVideo.Id & " PublishedAt=Nothing")
                    Else
                        Console.WriteLine(objVideo.Id & " " & Format(CDate(objVideo.Status.PublishAt), "MM/dd/yyyy"))
                    End If
                    If objVideo.Status.PublishAtRaw Is Nothing Then
                        Console.WriteLine(objVideo.Id & " PublishedAtRaw=Nothing")
                    Else
                        Console.WriteLine(objVideo.Id & " " & Format(CDate(objVideo.Status.PublishAtRaw), "MM/dd/yyyy"))
                    End If
                Next
            Catch ex As Exception
                MsgBox("ListRequest Error: " & ex.Message)
            End Try
        End If
    End Sub

What is the expected output? 
I expect PublishedAt and PublishedAtRaw to contain the date that the video was 
uploaded to YouTube.

What do you see instead?
Output is:
qy9qJEv0SHs RecordingDate=11/18/2014
qy9qJEv0SHs PublishedAt=Nothing
qy9qJEv0SHs PublishedAtRaw=Nothing
PyEOOypNcFw RecordingDate=11/18/2014
PyEOOypNcFw PublishedAt=Nothing
PyEOOypNcFw PublishedAtRaw=Nothing
kEyci_kQ0ls RecordingDate=11/11/2014
kEyci_kQ0ls PublishedAt=Nothing
kEyci_kQ0ls PublishedAtRaw=Nothing
GfMaE3foMCY RecordingDate=11/11/2014
GfMaE3foMCY PublishedAt=Nothing
GfMaE3foMCY PublishedAtRaw=Nothing
B_iWgBdayQU RecordingDate=11/11/2014
B_iWgBdayQU PublishedAt=Nothing
B_iWgBdayQU PublishedAtRaw=Nothing
EhoGEBvmVPc RecordingDate=11/11/2014
EhoGEBvmVPc PublishedAt=Nothing
EhoGEBvmVPc PublishedAtRaw=Nothing
EZ60rDovypQ RecordingDate=11/11/2014
EZ60rDovypQ PublishedAt=Nothing
EZ60rDovypQ PublishedAtRaw=Nothing

What version of the product are you using? On what operating system?
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Google.Apis" version="1.9.0" targetFramework="net40" />
  <package id="Google.Apis.Auth" version="1.9.0" targetFramework="net40" />
  <package id="Google.Apis.Core" version="1.9.0" targetFramework="net40" />
  <package id="Google.Apis.YouTube.v3" version="1.9.0.1200" targetFramework="net40" />
  <package id="log4net" version="2.0.3" targetFramework="net40" />
  <package id="Microsoft.Bcl" version="1.1.9" targetFramework="net40" />
  <package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
  <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net40" />
  <package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net40" />
  <package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
  <package id="Zlib.Portable" version="1.10.0" targetFramework="net40" />
</packages>

Please provide any additional information below.
The documentation at 
https://developers.google.com/resources/api-libraries/documentation/youtube/v3/c
sharp/latest/classGoogle_1_1Apis_1_1YouTube_1_1v3_1_1Data_1_1VideoSnippet.html#a
3056a4eecf1aeea13f39451f82ed1385 states that the date & time of upload is 
available via PublishedAt and PublishedAtRaw but these properties always return 
a null value.

virtual string Google.Apis.YouTube.v3.Data.VideoSnippet.PublishedAtRaw 
The date and time that the video was uploaded. The value is specified in ISO 
8601 (YYYY-MM- DDThh:mm:ss.sZ) format.

virtual System.Nullable<System.DateTime> 
Google.Apis.YouTube.v3.Data.VideoSnippet.PublishedAt 
representation of PublishedAtRaw.

Original issue reported on code.google.com by MikeMe...@gmail.com on 25 Nov 2014 at 8:10

GoogleCodeExporter commented 9 years ago
Please delete this issue.

I accidentally filed it under the wrong project.

Sorry

Original comment by eltownh...@gmail.com on 25 Nov 2014 at 9:18

GoogleCodeExporter commented 9 years ago
Please delete this issue.

I accidentally filed it under the wrong project.

Sorry

Original comment by MikeMe...@gmail.com on 25 Nov 2014 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by ccherub...@google.com on 25 Nov 2014 at 9:30