Created
November 7, 2011 12:50
-
-
Save davetayls/1344846 to your computer and use it in GitHub Desktop.
Flickr AMD Module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Flickr AMD Module | |
| */ | |
| /*jslint browser: true, vars: true, white: true, forin: true, indent: 4 */ | |
| /*global define,require */ | |
| define( | |
| ['jquery'], | |
| function($){ | |
| 'use strict'; | |
| var API = 'http://api.flickr.com/services/feeds' | |
| ; | |
| return { | |
| loadUserPhotos: function(userId, callback) { | |
| $.getJSON(API + '/photos_public.gne?id=' + userId + '&format=json&jsoncallback=?', function(data, status){ | |
| callback.apply(this, arguments); | |
| }); | |
| }, | |
| loadGroupPhotos: function(groupId, callback) { | |
| $.getJSON(API + '/groups_pool.gne?id=' + groupId + '&format=json&jsoncallback=?', function(data, status){ | |
| callback.apply(this, arguments); | |
| }); | |
| } | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment