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
Changes from 1 commit
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
40 changes: 40 additions & 0 deletions src/modules/smugmug.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// SmugMug services
(function(hello) {

hello.init({

smugmug: {
name: 'SmugMug',

oauth : {
version : "1.0a",
auth : "http://api.smugmug.com/services/oauth/1.0a/authorize?Access=Full&Permissions=Modify",
//http://api.smugmug.com/services/oauth/1.0a/authorize?Access=Full&Permissions=Modify&allowThirdPartyLogin=0&showSignUpButton=false&viewportScale=1.0
request : "http://api.smugmug.com/services/oauth/1.0a/getRequestToken?oauth_callback=http://localhost:3000/redirect.html",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please omit the oauth_callback. The value of oauth_callback is derived from the redirect_uri at the point the OAuth1a request URI is constructed by the OAuth Proxy service.

token : "http://api.smugmug.com/services/oauth/1.0a/getAccessToken"
},
refresh: true,

scope: {
basic: ''
},

scope_delim: ' ',

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

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

get: {
me: 'user/profile'
},
wrap: {
me: function(o, headers) {}
},
xhr: true
}
});

})(hello);