Friday, December 09, 2005

Tagyu::Search v0.03

I have incorporated support for two new features in my Tagyu::Search module and learnt a lot about HTTP in the process.

1. Support for HTTP Basic Authentication

With this in place, it is now possible for Perl code using my module to break the one request per IP barrier imposed on anonymous users by Tagyu. So register yourself at Tagyu right now!

This is what you need to do in your code:

# Instantiate a new Tagyu::Search object.
my $tagyu = Tagyu::Search->new(
username => "[YOUR-USERNAME]",
password => "[YOUR-PASSWORD]"
);

# Invoke the SuggesTags method on the Tagyu::Search object.
my @tags = $tagyu->SuggestTags("[YOUR-TEXT]");

However anonymous searches through Tagyu::Search package are still supported.

2. Introduced two new methods SuggestTagsText and SuggestTagsURL.

SuggestTagsText encodes all the special characters like '=', '+', '&', etc. before passing on the text to the Tagyu Web Service, while SuggestTagsURL considers its argument as a URL and uses the Tagyu Web Service to suggest tags for the text at the specified URL.


Download Tagyu-Search-0.03 and let me know how it works for you. As always, feedback is welcome!

2 comments:

Adam Kalsey said...

Very nice. Thanks for keeping up with the API updates.

I'm trying to ensure that API changes are all backward compatible; so the 0.1 version of this module should still work as it did before authenticated accounts and such were added. Please let me know if I ever break compatibility.

Sid said...

Thanks Adam! I'll do my best to keep the Tagyu::Search module updated so as to allow the Perl code using it to take advantage of the latest enhancements in the Tagyu REST API.

Yes, Tagyu::Search version 0.1 still works after your API updates at the server. I will certainly let you know if I become aware of any problems with the module caused due to updates in the Tagyu REST API.