YouTube Direct and Video IDs

Showing 1-7 of 7 messages
YouTube Direct and Video IDs Aise 2/19/12 9:56 AM
Hi, I would like help in getting out YouTube Video IDs from each
YouTube Direct Submission, to be then processed by my own PHP code and
stored in my SQL Database. I managed to find the output variables in
the VideoSubmission.java file, but i know nothing about Java and don't
know how to send them to my PHP code. Thank you very much!
Re: YouTube Direct and Video IDs Jeffrey Posnick 2/21/12 2:47 PM
Hello Aise,

 You could use the JSON-RPC capabilities in the YouTube Direct
instance to get a list of submissions in JSON format. You'd want to
POST to https://APP_ID.appspot.com/jsonrpc with something along the
lines of

  {"method":"GET_VIDEO_SUBMISSIONS","params":
{"sortBy":"created","sortOrder":"desc","filterType":"all","pageIndex":"1","pageSize":"10"}}

(modify as you see fit). You can play around with this by visiting

  https://APP_ID.appspot.com/admin/jsonrpc_test.html

 Note that the GET_VIDEO_SUBMISSIONS command is only available to
authenticated administrators by default, which your code would almost
certainly not be if you're calling it from a random PHP script. You
can unprotect the command by adding the @NonAdmin decorator above the
class definition for GetVideoSubmissions.java, following the example
for GetAssignments.java at

  http://code.google.com/p/youtube-direct/source/browse/trunk/ytd/src/com/google/ytd/command/GetAssignments.java#14

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
Re: YouTube Direct and Video IDs Aise 2/22/12 4:38 AM
Hi, thank you very much for your answer... But unfortunately, it's a
little too advanced for me, since I just know some basic PHP but
nothing about JSON, JavaScript or Java... However, I added the
@NonAdmin as you said and re-deployed the app, then tried to test
{"method":"GET_VIDEO_SUBMISSIONS","params":
{"sortBy":"created","sortOrder":"desc","filterType":"all","pageIndex":"1","­
pageSize":"10"}}
but I only get this output:
{"error":"The JsonDeserializer StringTypeAdapter failed to
deserialized json object {\"sortBy\":\"created\",\"sortOrder\":\"desc
\",\"filterType\":\"all\",\"pageIndex\":\"1\",\"\u00adpageSize\":
\"10\"} given the type class java.lang.String"}

On 21 Feb, 23:47, Jeffrey Posnick <je...@google.com> wrote:
> Hello Aise,
>
>  You could use the JSON-RPC capabilities in the YouTube Direct
> instance to get a list of submissions in JSON format. You'd want to
> POST tohttps://APP_ID.appspot.com/jsonrpcwith something along the
> lines of
>
>   {"method":"GET_VIDEO_SUBMISSIONS","params":
> {"sortBy":"created","sortOrder":"desc","filterType":"all","pageIndex":"1","­pageSize":"10"}}
>
> (modify as you see fit). You can play around with this by visiting
>
>  https://APP_ID.appspot.com/admin/jsonrpc_test.html
>
>  Note that the GET_VIDEO_SUBMISSIONS command is only available to
> authenticated administrators by default, which your code would almost
> certainly not be if you're calling it from a random PHP script. You
> can unprotect the command by adding the @NonAdmin decorator above the
> class definition for GetVideoSubmissions.java, following the example
> for GetAssignments.java at
>
>  http://code.google.com/p/youtube-direct/source/browse/trunk/ytd/src/c...
Re: YouTube Direct and Video IDs Aise 2/23/12 5:54 AM
I managed to get the list of submissions in the JSON-RPC test page,
but it seems it's not exactly what I need, since I get all details
from each video, while I just need the video ID of the new video
submitted and I need it at the moment which the user submits it, to be
processed in PHP and stored along other variables, such as the
category/page of my site in which it was submitted, the username (from
my site account, not Google/YouTube) of the submitter, etc... I hope I
managed to explain what I mean!

On 22 Feb, 13:38, Aise <chalengine....@gmail.com> wrote:
> Hi, thank you very much for your answer... But unfortunately, it's a
> little too advanced for me, since I just know some basic PHP but
> nothing about JSON, JavaScript or Java... However, I added the
> @NonAdmin as you said and re-deployed the app, then tried to test
> {"method":"GET_VIDEO_SUBMISSIONS","params":
> {"sortBy":"created","sortOrder":"desc","filterType":"all","pageIndex":"1","­­
> pageSize":"10"}}
> but I only get this output:
> {"error":"The JsonDeserializer StringTypeAdapter failed to
> deserialized json object {\"sortBy\":\"created\",\"sortOrder\":\"desc
> \",\"filterType\":\"all\",\"pageIndex\":\"1\",\"\u00adpageSize\":
> \"10\"} given the type class java.lang.String"}
>
> On 21 Feb, 23:47, Jeffrey Posnick <je...@google.com> wrote:
>
>
>
> > Hello Aise,
>
> >  You could use the JSON-RPC capabilities in the YouTube Direct
> > instance to get a list of submissions in JSON format. You'd want to
> > POST tohttps://APP_ID.appspot.com/jsonrpcwithsomething along the
Re: YouTube Direct and Video IDs Jeffrey Posnick 2/24/12 1:18 PM
Hello Aise,

 I'm sorry, but that's the extent of the information you could get out
of the stock YouTube Direct installation. I think you're going to have
to find someone who could write the necessary code for you if you want
to proceed.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


> > > POST tohttps://APP_ID.appspot.com/jsonrpcwithsomethingalong the
Re: YouTube Direct and Video IDs Aise 2/24/12 3:25 PM
You mean by altering the YouTube Direct application, right? So I would
need someone who knows Java? Do you think is possible to get what I
need in this way? Anyway, thanks again!
Re: YouTube Direct and Video IDs Jeffrey Posnick 2/28/12 8:54 AM
Hello Aise,

 Right. It's certainly possible to modify the code to do anything—it's
all open source, so there's no limit to what a skilled developer could
do.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev