Skip to content
defvayne23 edited this page Jan 4, 2012 · 1 revision

Welcome to the jTube wiki!

Sample Code

$.jTube({
    request: 'user',
    requestValue: 'defvayne23',
    requestOption: 'uploads',
    success: function(videos){
        ...
    }
});

Options

Option Default Description
request Tells jTube what type of info it will be collecting. (user, search, feed, playlists, video)
requestValue
requestOption What info it needs to collect from the request. Used for ‘user’ and ‘video’ requests.
format flash Changes the video format that is returned. Available values: flash, mpeg, h263.
order published Change the sort of the videos returned. Available values: relevance, published, viewCount, rating. More Info
time all_time Filters the videos to those within the specified time. More Info
limit 5 Limits the number of videos returned. Max value is 50
page 1 Changes the start index of the videos returned. Useful for grabbing next set of videos.

Event Options

Option Description
success Receives video array to loop and create HTML to add to site.
error Used for when jTube has an issue such as no method given.

Return

User Uploads

Key Description
title Video title
description Video description
link Link to Youtube video page
categories Video categories and tags
author Returns object array with author name, and link to authors profile.
video URL of the video to embed.
thumbnail URL of the thumbnail.
published Returns javascript Date object.
length Video length
views View view count

User Profile

Key Description
username Video title
thumbnail Video description
views View view count
uploadViews View view count
subscribers View view count
lastLogin Returns javascript Date object.
location Returns javascript Date object.
age Returns javascript Date object.
link Link to Youtube video page
title URL of the thumbnail.
published Returns javascript Date object.
updated Returns javascript Date object of when the subscription was last updated.

User Subscriptions

Key Description
title Subscription title
username Username of the subscription.
link Link to Youtube video page
published Returns javascript Date object of when the subscription was created.
updated Returns javascript Date object of when the subscription was last updated.

User Playlists

Key Description
id Playlist ID
title Playlist title
summary Playlist description
link Link to Youtube video page
hit View count
published Returns javascript Date object of when the playlist was created.
updated Returns javascript Date object of when the playlist was last updated.

User Contacts

Key Description
username Contact username
status Status of the contact. More Info
link Link to contacts page
published Returns javascript Date object of when the contact was created.
updated Returns javascript Date object of when the contact was last updated.