.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Net::Delicious 3" .TH Net::Delicious 3 "2008-01-13" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" Net::Delicious \- OOP for the del.icio.us API .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Net::Delicious; \& use Log::Dispatch::Screen; .Ve .PP .Vb 2 \& my $del = Net::Delicious->new({user => "foo", \& pswd => "bar"}); .Ve .PP .Vb 3 \& foreach my $p ($del->recent_posts()) { \& print $p->description()."\en"; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1OOP\s0 for the del.icio.us \s-1API\s0 .SH "PACKAGE METHODS" .IX Header "PACKAGE METHODS" .Sh "_\|_PACKAGE_\|_\->new(\e%args || Config::Simple)" .IX Subsection "__PACKAGE__->new(%args || Config::Simple)" Arguments to the Net::Delicious object may be defined in one of three ways : .IP "* As a single hash reference" 4 .IX Item "As a single hash reference" .PD 0 .IP "* As a reference to a \fIConfig::Simple\fR object" 4 .IX Item "As a reference to a Config::Simple object" .IP "* As a path to a file that may be read by the \fIConfig::Simple\fR." 4 .IX Item "As a path to a file that may be read by the Config::Simple." .PD .PP The first option isn't going away any time soon but should be considered as deprecated. Valid hash reference arguments are : .IP "* \fBuser\fR" 4 .IX Item "user" String. \fIrequired\fR .Sp Your del.icio.us username. .IP "* \fBpswd\fR" 4 .IX Item "pswd" String. \fIrequired\fR .Sp Your del.icio.us password. .IP "* \fBupdates\fR" 4 .IX Item "updates" String. .Sp The path to a directory where the timestamp for the last update to your bookmarks can be recorded. This is used by the \fIall_posts\fR method to prevent abusive requests. .Sp Default is the current user's home directory; If the home directory can not be determined Net::Delicious will use a temporary directory as determined by File::Temp. .IP "* \fBdebug\fR" 4 .IX Item "debug" Boolean. .Sp Add a \fILog::Dispatch::Screen\fR dispatcher to log debug (and higher) notices. Notices will be printed to \s-1STDERR\s0. .PP \&\fIConfig::Simple\fR options are expected to be grouped in a \*(L"block\*(R" labeled \fBdelicious\fR. Valid options are : .IP "* \fBuser\fR" 4 .IX Item "user" String. \fIrequired\fR .Sp Your del.icio.us username. .IP "* \fBpswd\fR" 4 .IX Item "pswd" String. \fIrequired\fR .Sp Your del.icio.us password. .IP "* \fBupdates\fR" 4 .IX Item "updates" String. .Sp The path to a directory where the timestamp for the last update to your bookmarks can be recorded. This is used by the \fIall_posts\fR method to prevent abusive requests. .Sp Default is the current user's home directory, followed by a temporary directory as determined by File::Temp. .IP "* \fBxml_parser\fR" 4 .IX Item "xml_parser" String. .Sp You may specify one of three \s-1XML\s0 parsers to use to handle response messages from the del.icio.us servers. You many want to do this if, instead of Perl-ish objects, you want to access the raw \s-1XML\s0 and parse it with XPath or \s-1XSLT\s0 or some other crazy moon language. .RS 4 .IP "* \fBsimple\fR" 4 .IX Item "simple" This uses XML::Simple to parse messages. If present, all successful \&\s-1API\s0 method calls will return, where applicable, Net::Delicious::* objects. .IP "* \fBlibxml\fR" 4 .IX Item "libxml" This uses XML::LibXML to parse messages. If present, all successful \&\s-1API\s0 method calls will return a \fIXML::LibXML::Document\fR object. .Sp Future releases may allow responses parsed with libxml to be returned as Net::Delicious::* objects. .IP "* \fBxpath\fR" 4 .IX Item "xpath" This uses XML::XPath to parse messages. If present, all successful \&\s-1API\s0 method calls will return a \fIXML::XPath\fR object. .Sp Future releases may allow responses parsed with XML::XPath to be returned as Net::Delicious::* objects. .RE .RS 4 .Sp The default value is \fBsimple\fR. .RE .IP "* \fBforce_xml_objects\fR" 4 .IX Item "force_xml_objects" Boolean. .Sp Set to true if you are using XML::Simple to parse response messages from the del.icio.us servers but want to return the object's original data structure rather than Net::Delicious::* objects. .Sp Default is false. .IP "* \fBendpoint\fR" 4 .IX Item "endpoint" String. .Sp Set the endpoint for all \s-1API\s0 calls. .Sp There's no particular reason you should ever need to set this unless, say, this module falls horribly out of date with the \s-1API\s0 itself. Anyway, now you can. .Sp Default is \fBhttps://api.del.icio.us/v1/\fR .IP "* \fBdebug\fR" 4 .IX Item "debug" Boolean. .Sp Add a \fILog::Dispatch::Screen\fR dispatcher to log debug (and higher) notices. Notices will be printed to \s-1STDERR\s0. .PP Returns a Net::Delicious object or undef if there was a problem creating the object. .PP It is also possible to set additional config options to tweak the default settings for \s-1API\s0 call parameters and \s-1API\s0 response properties. Please consult the \s-1POD\s0 for Net::Delicious::Config for details. .SH "UPDATE METHODS" .IX Header "UPDATE METHODS" .Sh "$obj\->\fIupdate()\fP" .IX Subsection "$obj->update()" Returns return the time of the last update formatted as a W3CDTF string. .SH "POST METHODS" .IX Header "POST METHODS" .Sh "$obj\->add_post(\e%args)" .IX Subsection "$obj->add_post(%args)" Makes a post to del.icio.us. .PP Valid arguments are : .IP "* \fBurl\fR" 4 .IX Item "url" String. \fIrequired\fR .Sp Url for post .IP "* \fBdescription\fR" 4 .IX Item "description" String. .Sp Description for post. .IP "* \fBextended\fR" 4 .IX Item "extended" String. .Sp Extended for post. .IP "* \fBtags\fR" 4 .IX Item "tags" String. .Sp Space-delimited list of tags. .IP "* \fBdt\fR" 4 .IX Item "dt" String. .Sp Datestamp for post, format \*(L"CCYY\-MM\-DDThh:mm:ssZ\*(R" .IP "* \fBshared\fR" 4 .IX Item "shared" Boolean. (Technically, you need to pass the string \*(L"no\*(R" but N:D will handle 1s and 0s.) .Sp Make the post private. Default is true. .IP "* \fBreplace\fR" 4 .IX Item "replace" Boolean. (Technically, you need to pass the string \*(L"no\*(R" but N:D will handle 1s and 0s.) .Sp Don't replace post if given url has already been posted. Default is true. .PP Returns true or false. .Sh "$obj\->delete_post(\e%args)" .IX Subsection "$obj->delete_post(%args)" Delete a post from del.icio.us. .PP Valid arguments are : .IP "* \fBurl\fR" 4 .IX Item "url" String. \fIrequired\fR .PP Returns true or false. .Sh "$obj\->posts_per_date(\e%args)" .IX Subsection "$obj->posts_per_date(%args)" Get a list of dates with the number of posts at each date. .PP Valid arguments are : .IP "* \fBtag\fR" 4 .IX Item "tag" String. .Sp Filter by this tag. .PP Returns a list of \fINet::Delicious::Date\fR objects when called in an array context. .PP Returns a \fINet::Delicious::Iterator\fR object when called in a scalar context. .Sh "$obj\->recent_posts(\e%args)" .IX Subsection "$obj->recent_posts(%args)" Get a list of most recent posts, possibly filtered by tag. .PP Valid arguments are : .IP "* \fBtag\fR" 4 .IX Item "tag" String. .Sp Filter by this tag. .IP "* \fBcount\fR" 4 .IX Item "count" Int. .Sp Number of posts to return. Default is 20; maximum is 100 .PP Returns a list of \fINet::Delicious::Post\fR objects when called in an array context. .PP Returns a \fINet::Delicious::Iterator\fR object when called in a scalar context. .Sh "$obj\->\fIall_posts()\fP" .IX Subsection "$obj->all_posts()" Returns a list of \fINet::Delicious::Post\fR objects when called in an array context. .PP Returns a \fINet::Delicious::Iterator\fR object when called in a scalar context. .PP If no posts have been added between calls to this method, it will return an empty list (or undef if called in a scalar context.) .Sh "$obj\->posts(\e%args)" .IX Subsection "$obj->posts(%args)" Get a list of posts on a given date, filtered by tag. If no date is supplied, most recent date will be used. .PP Valid arguments are : .IP "* \fBtag\fR" 4 .IX Item "tag" String. .Sp Filter by this tag. .IP "* \fBdt\fR" 4 .IX Item "dt" String. .Sp Filter by this date. .PP Returns a list of \fINet::Delicious::Post\fR objects when called in an array context. .PP Returns a \fINet::Delicious::Iterator\fR object when called in a scalar context. .SH "TAG METHODS" .IX Header "TAG METHODS" .Sh "$obj\->\fItags()\fP" .IX Subsection "$obj->tags()" Returns a list of tags. .Sh "$obj\->rename_tag(\e%args)" .IX Subsection "$obj->rename_tag(%args)" Renames tags across all posts. .PP Valid arguments are : .IP "* \fBold\fR" 4 .IX Item "old" String. \fIrequired\fR .Sp Old tag .IP "* \fBnew\fR" 4 .IX Item "new" String. \fIrequired\fR .Sp New tag .PP Returns true or false. .Sh "$obj\->all_posts_for_tag(\e%args)" .IX Subsection "$obj->all_posts_for_tag(%args)" This is a just a helper method which hides a bunch of \s-1API\s0 calls behind a single method. .PP Valid arguments are : .IP "* \fBtag\fR" 4 .IX Item "tag" String. \fIrequired\fR .Sp The tag you want to retrieve posts for. .PP Returns a list of \fINet::Delicious::Post\fR objects when called in an array context. .PP Returns a \fINet::Delicious::Iterator\fR object when called in a scalar context. .SH "BUNDLE METHODS" .IX Header "BUNDLE METHODS" .Sh "$obj\->\fIbundles()\fP" .IX Subsection "$obj->bundles()" Returns a list of \fINet::Delicious::Bundle\fR objects when called in an array context. .PP Returns a \fINet::Delicious::Iterator\fR object when called in a scalar context. .Sh "$obj\->set_bundle(\e%args)" .IX Subsection "$obj->set_bundle(%args)" Valid arguments are : .IP "* \fBbundle\fR" 4 .IX Item "bundle" String. \fIrequired\fR .Sp The name of the bundle to set. .IP "* \fBtags\fR" 4 .IX Item "tags" String. \fIrequired\fR .Sp A space-separated list of tags. .PP Returns true or false .Sh "$obj\->delete_bundle(\e%args)" .IX Subsection "$obj->delete_bundle(%args)" Valid arguments are : .IP "* \fBbundle\fR" 4 .IX Item "bundle" String. \fIrequired\fR .Sp The name of the bundle to set .PP Returns true or false .SH "HELPER METHODS" .IX Header "HELPER METHODS" .Sh "$obj\->\fIlogger()\fP" .IX Subsection "$obj->logger()" Returns a Log::Dispatch object. .Sh "$obj\->config(@args)" .IX Subsection "$obj->config(@args)" This is just a short-cut for calling the current object's internal Config::Simple \fIparam\fR method. You may use to it to get and set config parameters although they will not be saved to disk when the object is destroyed. .Sh "$obj\->\fIusername()\fP" .IX Subsection "$obj->username()" Returns the del.icio.us username for the current object. .Sh "$obj\->\fIpassword()\fP" .IX Subsection "$obj->password()" Returns the del.icio.us password for the current object. .Sh "$object\->\fIuser_agent()\fP" .IX Subsection "$object->user_agent()" This returns the objects internal LWP::UserAgent in case you need to tweak timeouts, proxies, etc. .PP \&\fBBy default the \s-1UA\s0 object enables the \f(BIproxy_env\fB glue.\fR .SH "ERRORS" .IX Header "ERRORS" Errors are logged via the object's \fIlogger\fR method which returns a \fILog::Dispatch\fR object. If you want to get at the errors it is up to you to provide it with a dispatcher. .SH "VERSION" .IX Header "VERSION" 1.11 .SH "DATE" .IX Header "DATE" $Date: 2007/03/25 15:53:02 $ .SH "AUTHOR" .IX Header "AUTHOR" Aaron Straup Cope .SH "SEE ALSO" .IX Header "SEE ALSO" http://del.icio.us/doc/api .SH "NOTES" .IX Header "NOTES" This package implements the \s-1API\s0 in its entirety as of \fI\s-1DATE\s0\fR. .SH "LICENSE" .IX Header "LICENSE" Copyright (c) 2004\-2007, Aaron Straup Cope. All Rights Reserved. .PP This is free software, you may use it and distribute it under the same terms as Perl itself.