]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
changed options as per SR request [#248]
authorAnna Sobiepanek <annaopensource@gmail.com>
Thu, 14 Apr 2011 15:06:36 +0000 (11:06 -0400)
committerAnna Sobiepanek <annaopensource@gmail.com>
Thu, 14 Apr 2011 15:16:51 +0000 (11:16 -0400)
plugins/flickr/popcorn.flickr.html
plugins/flickr/popcorn.flickr.js
plugins/flickr/popcorn.flickr.unit.js

index 21b4cab48a3c6d1b855f3b9a9a3513f2c3ae7a66..1c706b6f0f15b1e967871ebea10db5de5c07ff23 100644 (file)
@@ -17,7 +17,7 @@
         start: 0, // seconds
         end: 5, // seconds
         username: 'AniaSob',
-        api_key: 'd1d249260dd1673ec8810c8ce5150ae1',
+        apikey: 'd1d249260dd1673ec8810c8ce5150ae1',
         target: 'flickrdiv'
       } )
       .flickr({
index 8c1583e3ea5c0ffcb3583c7ecedd6950668a9a56..6fba54886b9074fa26ed18eb7556fc7dac0fb522 100644 (file)
@@ -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
       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();
       _userid = options.userid;
       getFlickrData();
       
-    } else if ( options.username && options.api_key ) {
+    } else if ( options.username && options.apikey ) {
       isUserIDReady();
     }
     return {
   {
     about:{
       name:    "Popcorn Flickr Plugin",
-      version: "0.1.1",
+      version: "0.2",
       author:  "Scott Downe, Steven Weerdenburg, Annasob",
       website: "http://scottdowne.wordpress.com/"
     },
       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'},
index 76d08a6183cd75027a006680061b1fad942bc551..74e6758306016efacdfd060634b9058bb08b98eb 100644 (file)
@@ -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'
   } );;