From 28fb20037bb642b21bf1e2312fba579080e7135d Mon Sep 17 00:00:00 2001 From: Anna Sobiepanek Date: Thu, 14 Apr 2011 11:06:36 -0400 Subject: [PATCH] changed options as per SR request [#248] --- plugins/flickr/popcorn.flickr.html | 2 +- plugins/flickr/popcorn.flickr.js | 12 ++++++------ plugins/flickr/popcorn.flickr.unit.js | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/flickr/popcorn.flickr.html b/plugins/flickr/popcorn.flickr.html index 21b4cab4..1c706b6f 100644 --- a/plugins/flickr/popcorn.flickr.html +++ b/plugins/flickr/popcorn.flickr.html @@ -17,7 +17,7 @@ start: 0, // seconds end: 5, // seconds username: 'AniaSob', - api_key: 'd1d249260dd1673ec8810c8ce5150ae1', + apikey: 'd1d249260dd1673ec8810c8ce5150ae1', target: 'flickrdiv' } ) .flickr({ diff --git a/plugins/flickr/popcorn.flickr.js b/plugins/flickr/popcorn.flickr.js index 8c1583e3..6fba5488 100644 --- a/plugins/flickr/popcorn.flickr.js +++ b/plugins/flickr/popcorn.flickr.js @@ -13,7 +13,7 @@ * Username is the username of who's Flickr images you wish to show * using both userid and username is redundant * an api_key is required when using username - * Api_key is your own api key provided by Flickr + * Apikey is your own api key provided by Flickr * Target is the id of the document element that the images are * appended to, this target element must exist on the DOM * Numberofimages specify the number of images to retreive from flickr, defaults to 4 @@ -69,11 +69,11 @@ throw ( "flickr target container doesn't exist" ); } - // get the userid from Flickr API by using the username and api_key + // get the userid from Flickr API by using the username and apikey var isUserIDReady = function() { if ( !_userid ) { _uri = "http://api.flickr.com/services/rest/?method=flickr.people.findByUsername&"; - _uri += "username=" + options.username + "&api_key=" + options.api_key + "&format=json&jsoncallback=flickr"; + _uri += "username=" + options.username + "&api_key=" + options.apikey + "&format=json&jsoncallback=flickr"; Popcorn.xhr.getJSONP( _uri, function(data) { _userid = data.user.nsid; getFlickrData(); @@ -118,7 +118,7 @@ _userid = options.userid; getFlickrData(); - } else if ( options.username && options.api_key ) { + } else if ( options.username && options.apikey ) { isUserIDReady(); } return { @@ -145,7 +145,7 @@ { about:{ name: "Popcorn Flickr Plugin", - version: "0.1.1", + version: "0.2", author: "Scott Downe, Steven Weerdenburg, Annasob", website: "http://scottdowne.wordpress.com/" }, @@ -155,7 +155,7 @@ userid : {elem:'input', type:'text', label:'UserID'}, tags : {elem:'input', type:'text', label:'Tags'}, username : {elem:'input', type:'text', label:'Username'}, - api_key : {elem:'input', type:'text', label:'Api_key'}, + apikey : {elem:'input', type:'text', label:'Api_key'}, target : 'Flickr-container', height : {elem:'input', type:'text', label:'Height'}, width : {elem:'input', type:'text', label:'Width'}, diff --git a/plugins/flickr/popcorn.flickr.unit.js b/plugins/flickr/popcorn.flickr.unit.js index 76d08a61..74e67583 100644 --- a/plugins/flickr/popcorn.flickr.unit.js +++ b/plugins/flickr/popcorn.flickr.unit.js @@ -1,7 +1,7 @@ test("Popcorn Flickr Plugin", function () { var popped = Popcorn("#video"), - expects = 6, + expects = 7, count = 0, flickrdiv = document.getElementById('flickrdiv'); @@ -32,7 +32,7 @@ test("Popcorn Flickr Plugin", function () { start: 4, // seconds end: 7, // seconds username: 'AniaSob', - api_key: 'd1d249260dd1673ec8810c8ce5150ae1', + apikey: 'd1d249260dd1673ec8810c8ce5150ae1', numberofimages: '1', target: 'flickrdiv' } );;