MooSmug is a simple way to access SmugMug WITHOUT any server side scripting. No php or whatever needed! Its just plain old Javascript.
To use it you need a SmugMug account and a SmugMug API Key. Without the api key you can’t use MooSmug. It’s not possible to access the api without a key.
Insert your api key in moosmug.js
var MooSmug = new Class({
initialize: function(){
// You must supply your own API key to use Smugmug Services
this.fApiKey = 'API Key goes here';
Add the scripts to your (x)html header
<script src="scripts/mootools.v1.11.js" type="text/javascript"></script>
<script src="scripts/moosmug.js" type="text/javascript"></script>
Your mileage may vary depending on where you store your Javascript or release used but it should look similar to the code above.
Use it (Example Anonymous Login)
new MooSmug().callSmugmug({ method: 'smugmug.login.anonymously' });
jsonSmugmugApi = function(rsp) {
if (rsp.stat == 'ok' ) {
if (rsp.Login) {
//do something
}
}
}
The callback for the Smugmug JSON interface is set to jsonSmugmugApi.
No SmugMug User yet?
Start your FREE Trial today and join the happy users of smugmug :-)
MooSmug is highly based on MooPix and uses therefor Creative Commons License Attribution-ShareAlike 2.0 too.