Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (16 sloc) 1.34 KB
layout title date tags
post
web api's
2009-07-18 20:00:00 +0200
javascript greasemonkey

Local procedure calls

Given the scripting nature of the web non-obfuscated javascript code presents itself to the technical user almost as a public API. You can try it out yourself by writing:

for (x in document){console.log(x);}

in your browser javascript console. For more persistent changes to a sites behavior tools like Greasemonkey can be used. Last.fm and Spotify have done some integration by releasing a Greasemonkey script for last.fm.

Remote procedure calls

By using fiddler or Firefox Firebug you can watch the client/server interaction (ajax calls made by a modern web app). The stateless nature of the web and ajax calls promotes a simple design of this "API". This means that programming/scripting against your site can be easily done by, hopefully authorized, users.

Conclusion

Modern web applications have a natural interface for that might yield a plugin-like api unintended by the applications developers. If you're developing/maintaining a web app, try searching for it on userscripts. If your app is used by a wide group of people, then you might be surprised with what you find.