WebService::UrbanDictionary::Term::Definition
version 2.015
use WebService::UrbanDictionary; my $ud = WebService::UrbanDictionary->new; my $results = $ud->request('perl'); for my $each (@{ $results->definitions }) { printf "Definition: %s\n(by %s)\n\n", $each->definition, $each->author; }
WebService::UrbanDictionary::Term::Definition provides methods for accessing the data stored within WebService::UrbanDictionary::Term objects, which are in turn returned from a WebService::UrbanDictionary object's request(word) method.
request(word)
defid
Returns the definition ID for the definition.
word
Returns the word queried.
author
Returns the author of the definition.
permalink
Returns a permalink (URL) to the definition.
definition
Returns the definition itself.
example
Returns the example used in the definition, if one exists.
thumbs_up
Returns the number of thumbs ups given to the definition.
thumbs_down
Returns the number of thumbs downs given to the definition.
current_vote
Returns the current vote for the definition, if it exists.
WebService::UrbanDictionary::Term::Definition - Wrapper for retreiving data from WebService::UrbanDictionary::Term objects.
WebService::UrbanDictionary
WebService::UrbanDictionary::Term
William Woodruff <william@tuffbizz.com>
This software is Copyright (c) 2015 by William Woodruff.
This is free software, licensed under:
The MIT (X11) License
To install WebService::UrbanDictionary, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::UrbanDictionary
CPAN shell
perl -MCPAN -e shell install WebService::UrbanDictionary
For more information on module installation, please visit the detailed CPAN module installation guide.