Quantcast
Channel: existdissolve.com » Web Services
Viewing all articles
Browse latest Browse all 2

Quick Look at ScrnShots' API

$
0
0

A few months ago, I ran across ScrnShots. It's basically a service for uploading, tagging and sharing screenshots of websites. This is pretty useful for me given my profession :).

One of the things, however, that has always impressed me about the site is how easy and fun to use it is. It features really deep networking capabilities, the tagging is pretty robust, and everything is fast, fast, fast!

Of course, while uploading from the site is easy, I've been waiting with baited breath for them to release an API. Well, recently this happened, and I couldn't be more excited!

The API is alot like Twitter's in that it uses Basic Authentication for user-specific http calls. While not the most secure form of authentication, it is ridiculously easy, especially if you're using ColdFusion whose cfhttp tag has a built in mechanism for managing it.

So tonight, I spent a couple minutes digging into the API, and came away with an easy function for uploading, tagging and providing a description and link for an image. And of course, if you're using ColdFusion, it's cake!

Here it is:

<cfhttp url="http://www.scrnshots.com/screenshots.xml" method="POST" charset="utf-8" username="existdissolve" password="password" multipart="yes">
    <cfhttpparam name="enctype" type="header" value="multipart/form-data">
    <cfhttpparam name="screenshot[uploaded_data]" type="file" file="#filearea#" mimetype="image/jpeg">
    <cfhttpparam name="screenshot[description]" value="#FORM.description#" type="formfield">
    <cfhttpparam name="screenshot[tag_list]" value="#FORM.tags#" type="formfield">
    <cfhttpparam name="screenshot[source_url]" value="#FORM.url#" type="formfield">
</cfhttp>

The function for uploading an image takes 4 arguments, one for the image itself, one for tags, one for the description and a final one for the url (if any). Simple. And the function returns a nicely formatted XML structure that could be used to store upload information, compile tags, etc.

Needless to say, I am very excited about this. Progress on my CSS gallery is coming along, and I am going to hook it into ScrnShots so that all of the featured sites that I add will automatically be populated to ScrnShots, thus boosting my stats on the site. Woot!

Oh, yeah, and be sure to check me out on ScrnShots!


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images