Permalink
Browse files

Change to v1 API when not using native shell

This shouldn't affect the iPad app at all; just fixing for testing
convenience
  • Loading branch information...
sophiebits committed May 16, 2012
1 parent 5a480b3 commit c08756dcec52677afc2708c5d0b17973a07cc389
Showing with 4 additions and 4 deletions.
  1. +2 −2 index.html
  2. +2 −2 js/khan.js
View
@@ -111,7 +111,7 @@ <h1>Khan Academy</h1>
<li class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c" data-theme="c">
<div class="ui-btn-inner ui-li">
<div class="ui-btn-text">
- <a href="#list-<%= list.youtube_id %>" class="ui-link-inherit">
+ <a href="#list-<%= list.id %>" class="ui-link-inherit">
<h3 class="ui-li-heading"><%= list.title %></h3>
<p class="ui-li-desc"><%= list.description %></p>
</a>
@@ -125,7 +125,7 @@ <h3 class="ui-li-heading"><%= list.title %></h3>
<!-- Template for constructing a page (w/ listview) of videos. -->
<script type="text/html" id="playlist-tmpl">
- <div data-role="page" id="list-<%= youtube_id %>" data-url="list-<%= youtube_id %>" class="playlist">
+ <div data-role="page" id="list-<%= id %>" data-url="list-<%= id %>" class="playlist">
<div data-role="header" data-theme="k">
<h1><%= title %></h1>
</div>
View
@@ -35,7 +35,7 @@ if ( query.sidebar !== "no" ) {
$(function() {
// Pull in all the playlist and video data
- $.getJSON( "http://www.khanacademy.org/api/videolibrary?callback=?", function( result ) {
+ $.getJSON( "http://www.khanacademy.org/api/v1/playlists/library/list?callback=?", function( result ) {
// Load the playlist data for later use
loadPlaylists( result );
@@ -410,7 +410,7 @@ function loadPlaylists( result ) {
// Build up an index of the playlists for fast reference
for ( var p = 0, pl = data.length; p < pl; p++ ) {
- playlists[ data[p].youtube_id ] = data[p];
+ playlists[ data[p].id ] = data[p];
// Do the same thing for the videos
var vids = data[p].videos;

1 comment on commit c08756d

@sophiebits

This comment has been minimized.

Show comment Hide comment
@sophiebits

sophiebits May 17, 2012

Contributor

Playlists don't have any youtube_id as of v1 API.

Contributor

sophiebits commented on c08756d May 17, 2012

Playlists don't have any youtube_id as of v1 API.

Please sign in to comment.