Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8814731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:12:11+00:00 2026-06-14T04:12:11+00:00

Is this possible.. here’s what I have atm, but my data object is just

  • 0

Is this possible.. here’s what I have atm, but my data object is just returning a load of jargon, what am I doing wrong? Am I doing anything.. right, for that matter?

I basically want to print out a list of a users videos (thumbnail and title, and make each one a clickable link to the video itself)

Thanks!

$(document).ready(function(){
    $player.init();

})

var $player = (function(){

    var player = {};

    player.init = function(){


    //init Youtube knockout
        player.initYoutubeKnockout();

    }
    player.knockoutModel = {
        videoData : ko.observableArray([]),

    }
    player.initYoutubeKnockout = function()
    {

        //load the Youtube json feed
        $.ajax({
            url: 'http://gdata.youtube.com/feeds/api/users/USERNAME/uploads?v=2&alt=json',
            type: 'GET',
            dataType: 'jsonp',
            data: {
                count: 5
            },
            success: function(data, textStatus, xhr) {
                player.doYoutubeKnockout(data.item);            
            }
        });   
    }
    player.doYoutubeKnockout = function( data )
    {

        player.knockoutModel.videoData(data);

        ko.applyBindings(player.knockoutModel, $('#youtube-feed')[0]);
        console.log($(this));
    }       


    return player;

})();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:12:12+00:00Added an answer on June 14, 2026 at 4:12 am

    Frankly you weren’t doing much at all.

    • The JSON data you get back from YouTube is not from data.item, it’s in a completely different structure.

    • I’m assuming you wish to get 5 uploads from the user. The parameter name would be max-results, not count.

    • Probably the only thing you did fine was set up the url but that’s about it.

    You need to examine how the JSON returned looks like. Check the API reference for the structure of an atom feed. This is in XML but the corresponding JSON responses will have pretty much the same format with some minor differences. Examine the object by writing it to the console to verify you’re getting the right properties.

    Once you understand that, you need to use the correct query to get what you’re expecting. Check out their API reference on their query parameters.

    To help simplify your knockout code, I would strongly recommend you take the response you get back and map it to an object with simplified property names. For instance, to get the thumbnails for an entry, you would have to access the media$group.media$thumbnail array. It would be easier if you can just access it through thumbnail.

    Also, if your elements you are binding to need to bind multiple values, it would help to map the values in such a way that your bindings are made easier. For instance, when using the attr binding, you’d set up a property for each of the attributes you want to add. Instead you could just group all the properties in an object and bind to that.

    I wrote up a fiddle applying all that I said above to do as you had asked for. This should help give you an idea of what you can do and how to do it.

    Demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm guessing this isn't possible, but here goes. I have two tables, and I'm
I'm not sure if this is even possible but here goes: Currently I have
I'm not sure if this is even possible but here we go. I have
I'm not sure this is even possible, but here goes: I have a class
I doubt this is possible, but here's what I want to do. If my
I do not know if this is possible, but here goes. And working with
Just a follow up question to this one here => link Is it possible
Is this possible? Code: $('#goRightBtn').click(function() { Random code here }; I have a button,
I doubt this is possible but here goes. I need to formulate a SQL
Is this possible? you can se my problem here: http://granjalaaurora.com/test/test-jscrollpane.html I have this structure:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.