Youtube API response data - ajax

Youtube's API documentation seems to me to be complete rubbish, I've spent hours reading through it and can't seem to figure out how to display a simple thumbnail of a video even by just test-copy-and-pasting the code they give in a few examples. Could someone maybe explain or point me in the direction of an at least half decent tutorial of how to retrieve data from a video search query? Using JSON by the way

In the past I've disregarded the youtube api and just made my own thumbnails using imagemagick with node, but it doesn't sound like you're using node.

If you paste the JSON response into this JSON to CSV converter, you can open the CSV file in a spreadsheet. Within the spreadsheet you will have lots of tools to help you parse the data.

Related

What is the proper way to get new comments on my youtube channels in youtube-data-api

Currently I am fetching all comments on loop over videos. Is there any other way to get latest comments better. I means looping thousands of videos and getting just 10 new comments is time and resource consuming. Is there any good solution.
Unfortunately, it is not currently possible to get multiple Video's comments in one API call. See the documentation here.
You would have to iterate through each video and get the comments for each one which would be very costly on quota but necessary.

How to send and read binary data in TinyXML?

I need to send file data (picture,text, word,excel etc) in xml. I need to send file data as binary data. I read some article about this but couldnt get how to achieve in TinyXml. Please read below post:
http://www.techrepublic.com/article/send-binary-data-in-xml/1050529
Above post has mentioned three approaches. Now let me know what approach is possible in tinyXML. If possible send me some sample code to send and read binary data in tinyXML. I searched a lot but couldnt get any way of doing this.
If sample code is not possible then please list down API I need to use so I will try that and update here my status.

Inserting Image in Wordml generated from a xsl

I need some tips and examples for the following task:
I have a image data somewhere on my disk ... this data can be of type .svg/.bmp/.gif/.png ... lets say for the moment that all of them are of type .svg.
My task is to insert several of these image data in soecific places of the WordML that I am generating.
The generation of WordML is working superbly, but as I have NEVER before read or heard about inserting image data in wordML data ... I am kinda lost.
I am going forward with <maml:medialink> and <maml:image>.
Would be really nice of you, if anyone can give me a little introduction and support with this new venture of mine.
Thank you.
Jasmin

How to show the parallelism of requests in a nice graphical view?

I have currently the following setup:
An object graph of all requests read from an application server log file.
Each line is represented as a RequestPart, with the following information: start time, stop time, tier, application part that is done.
I would like to draw / to graph something that shows the following:
Show different colors for the tier the request part is in.
Show for requests that are done in parallel, that they overlap.
The relation of start and stop should be shown (not exactly, but approximately)
My first idea was to fill the rows of an excel sheet with the requests, and color each cell according to the time, the tier, ... But then I found out that excel does only allow 2^8 cells (with Excel < 2010), so that is not an option.
I'm a Ruby boy, so I checked RMagick and Gruff, but I don't like that at the end, I only have an image, so no further analysis is possible. Does anyone has an idea what to do (well, last resort: install Excel 2010, but my company will not like that).
Check out open source Timeline
Added
Tips for using it:
send your data using JSON, faster parsing on the client compared with XML.
suggest that your clients use FF, Safari or (fastest), Google Chrome
Even faster parsing of dates: send Javascript datetime literals for parsing on client. Of course, at that point you're not sending kosher JSON, but it is the fastest way to send the data.

Buffered Multipart Form Posts in Ruby

I am currently using Net::HTTP in a Ruby script to post files to a website via a multipart form post. It works great for small files, but I frequently have to send very large files using this script, and HTTP#post only seems to accept post data as a String object, which means that the file I'm sending has to be read into memory before anything can be sent. This script is running on a busy production server, so it's unacceptable to gobble up hundreds of megabytes of RAM just to send a file.
Ideally, there'd be a method that could be given a buffer size and an IO object, and would send off buffer-sized chunks of data, reading from the IO object only as required. What would be the best way to make this happen? Did I miss something relevant in Net::HTTP?
Update: Net::HTTP#body_stream(input) looks good, though the documentation is rather... sparse. Anyone able to point me to a good example of this in action?
Actually I managed to upload a file using body_stream. The full source code is here:
http://stanislavvitvitskiy.blogspot.com/2008/12/multipart-post-in-ruby.html
Use Net::HTTP#body_stream(input)
Example for multipart post without streaming:

Resources