Need info on SmugMug API in JavaScript (AJAX):
flyingdutchie
Registered Users Posts: 1,286 Major grins
Hello Smugmuggers :
Is there any documentation on how to use the AJAX api in JavaScript?
E.g. smugmug.js provides this javascript function:
I found these examples of usages of this function:
Is there any documentation that exactly describes which requests the ajax_query function supports, documentation that describes what the valid values are for url and postArray?
Thank you very much!
-- Anton.
Is there any documentation on how to use the AJAX api in JavaScript?
E.g. smugmug.js provides this javascript function:
function ajax_query(callbackFunction, url, postArray, asText) { ... }
I found these examples of usages of this function:
postArray = new Array(); postArray['tool'] = 'editBio'; postArray['UserID'] = 8381; postArray['newBio'] = 'update bio'; postArray['settings'] = 'bio'; postArray['Bio'] = newBio; ajax_query(handleJS, webServer+'/hack/RPC/[b]home.mg[/b]', [b]postArray[/b], true); ... ... postArray = new Array(); postArray['tool'] = 'editTitle'; postArray['TypeID'] = AlbumID; postArray['Title'] = encodeURIComponent(document.getElementById('newTitle').value); ajax_query(handleJS, webServer+'/hack/RPC/[b]gallery.mg[/b]', [b]postArray[/b], true);
Is there any documentation that exactly describes which requests the ajax_query function supports, documentation that describes what the valid values are for url and postArray?
Thank you very much!
-- Anton.
I can't grasp the notion of time.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
0
Comments
...bump...
nobody...? ... is there no documentation ...?
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
I'm just curious which services Smugmug has made availble using this API: What are the valid values for postArray; What are the value URLs to invoke the services; etc.
-- Anton.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
Any news on this front?:D
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
Anton,
BWG and myself have used this function for a number of hacks. But basically, it's been matter of reverse engineering any existing calls.
As a side note, it is possible to pass a null values as the postArray, when you are just retrieving the source to a particular SM page like in this example.
Cheers,
David
SmugMug API Developer
My Photos
Thanks David!
> "Any existing calls"
Which calls are these calls? I can find no (comprehensive) set of example. Except the few that deal with changing caption, keywords, album-desc, etc.
-- Anton.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
Anton,
Apart from the different version of ajax.js that can be found in different places. We also found this found being in the lightbox and the full screen slideshow.
The lightbox code gets used in my BZT hack to load the image info, so that i can scale the thumb correctly...
And this code is used in the slideshow hack...
Also, thinking about this further this morning, you can actually reverse engineer any form based submissions into ajax calls changing all the inputs in variables inside the postArray...Does that make sense ?
We don't really have access to any list, BWG and I ended up go searching the source to find anything we can use/hack when the need arises.
Hope this helps.
Cheers,
David
SmugMug API Developer
My Photos
I guess Smugmug does not make the list of AJAX callback public.... reverse engineering is the solution here.
Would you know how to get a list of all your own galleries using AJAX, including the 'featured' photo?
Thanks!
-- Anton.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
I thought I would 'dust off' this thread.
My question is - has anyone ever used the ajax_query (or any
other method for that matter) to obtain the filename for a specific image ???
Thanks - jerryr
SmugMug Sites - Creative Examples
Favorite Images and SmugMug Designs
used the mainPhotoFileName in my javascript program !
:ivar
SmugMug Sites - Creative Examples
Favorite Images and SmugMug Designs