Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmugMug Module #287

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions demos/client_ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ var FLICKR_CLIENT_ID = {
// join.me Register - https://developer.join.me
var JOINME_CLIENT_ID = 'myenm7aw34dbgejhuw4sv8zz';

var SMUGMUG_CLIENT_ID = 'NFfNfAK47ZfnkMl4EjO48pgEQQWCMFJu';

// To make it a little easier
var CLIENT_IDS_ALL = {
windows : WINDOWS_CLIENT_ID,
Expand All @@ -94,7 +96,8 @@ var CLIENT_IDS_ALL = {
soundcloud : SOUNDCLOUD_CLIENT_ID,
foursquare : FOURSQUARE_CLIENT_ID,
github : GITHUB_CLIENT_ID,
flickr: FLICKR_CLIENT_ID
flickr: FLICKR_CLIENT_ID,
smugmug: SMUGMUG_CLIENT_ID
};

var TUMBLR_CLIENT_ID = {
Expand All @@ -109,4 +112,4 @@ var TUMBLR_CLIENT_ID = {
//
var OAUTH_PROXY_URL = {
'local.knarly.com' : 'http://local.knarly.com:5500/proxy'
}[window.location.hostname] || 'https://auth-server.herokuapp.com/proxy';
}[window.location.hostname] || 'https://auth-server.herokuapp.com/proxy';
25 changes: 25 additions & 0 deletions src/modules/smugmug.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SmugMug services
(function(hello) {

hello.init({

smugmug: {
name: 'SmugMug',

oauth: {
version: '1.0a',
request: 'http://api.smugmug.com/services/oauth/1.0a/getRequestToken',
auth: 'http://api.smugmug.com/services/oauth/1.0a/authorize?access=Full&permissions=Modify',
token: 'http://api.smugmug.com/services/oauth/1.0a/getAccessToken'
},

login: function(p) {
p.options.window_width = 710;
},

base: 'https://api.smugmug.com/api/v2'

}
});

})(hello);
5 changes: 3 additions & 2 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
'foursquare.js',
'github.js',
'soundcloud.js',
'joinme.js'
'joinme.js',
'smugmug.js'
]);

</script>
Expand Down Expand Up @@ -93,4 +94,4 @@ <h2>hello( x ).<b>api</b>( path [, method ][, data ][, callback ] )</h2>
</script>

</body>
</html>
</html>