.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .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. \*(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- .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" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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 "WWW::Zotero 3pm" .TH WWW::Zotero 3pm "2023-02-05" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" WWW::Zotero \- Perl interface to the Zotero API .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use WWW::Zotero; \& \& my $client = WWW::Zotero\->new; \& my $client = WWW::Zotero\->new(key => \*(AqAPI\-KEY\*(Aq); \& \& my $data = $client\->itemTypes(); \& \& for my $item (@$data) { \& print "%s\en" , $item\->itemType; \& } \& \& my $data = $client\->itemFields(); \& my $data = $client\->itemTypeFields(\*(Aqbook\*(Aq); \& my $data = $client\->itemTypeCreatorTypes(\*(Aqbook\*(Aq); \& my $data = $client\->creatorFields(); \& my $data = $client\->itemTemplate(\*(Aqbook\*(Aq); \& my $key = $client\->keyPermissions(); \& my $groups = $client\->userGroups($userID); \& \& my $data = $client\->listItems(user => \*(Aq475425\*(Aq, limit => 5); \& my $data = $client\->listItems(user => \*(Aq475425\*(Aq, format => \*(Aqatom\*(Aq); \& my $generator = $client\->listItems(user => \*(Aq475425\*(Aq, generator => 1); \& \& while (my $item = $generator\->()) { \& print "%s\en" , $item\->{title}; \& } \& \& my $data = $client\->listItemsTop(user => \*(Aq475425\*(Aq, limit => 5); \& my $data = $client\->listItemsTrash(user => \*(Aq475425\*(Aq); \& my $data = $client\->getItem(user => \*(Aq475425\*(Aq, itemKey => \*(AqTTJFTW87\*(Aq); \& my $data = $client\->getItemTags(user => \*(Aq475425\*(Aq, itemKey => \*(AqX42A7DEE\*(Aq); \& my $data = $client\->listTags(user => \*(Aq475425\*(Aq); \& my $data = $client\->listTags(user => \*(Aq475425\*(Aq, tag => \*(AqBiography\*(Aq); \& my $data = $client\->listCollections(user => \*(Aq475425\*(Aq); \& my $data = $client\->listCollectionsTop(user => \*(Aq475425\*(Aq); \& my $data = $client\->getCollection(user => \*(Aq475425\*(Aq, collectionKey => \*(AqA5G9W6AX\*(Aq); \& my $data = $client\->listSubCollections(user => \*(Aq475425\*(Aq, collectionKey => \*(AqQM6T3KHX\*(Aq); \& my $data = $client\->listCollectionItems(user => \*(Aq475425\*(Aq, collectionKey => \*(AqQM6T3KHX\*(Aq); \& my $data = $client\->listCollectionItemsTop(user => \*(Aq475425\*(Aq, collectionKey => \*(AqQM6T3KHX\*(Aq); \& my $data = $client\->listCollectionItemsTags(user => \*(Aq475425\*(Aq, collectionKey => \*(AqQM6T3KHX\*(Aq); \& my $data = $client\->listSearches(user => \*(Aq475425\*(Aq); .Ve .SH "CONFIGURATION" .IX Header "CONFIGURATION" .IP "baseurl" 4 .IX Item "baseurl" The base \s-1URL\s0 for all \s-1API\s0 requests. Default 'https://api.zotero.org'. .IP "version" 4 .IX Item "version" The \s-1API\s0 version. Default '3'. .IP "key" 4 .IX Item "key" The \s-1API\s0 key which can be requested via https://api.zotero.org. .IP "modified_since" 4 .IX Item "modified_since" Include a \s-1UNIX\s0 time to be used in a If-Modified-Since header to allow for caching of results by your application. .SH "METHODS" .IX Header "METHODS" .SS "username2userID" .IX Subsection "username2userID" Find the userID based on a username .SS "\fBitemTypes()\fP" .IX Subsection "itemTypes()" Get all item types. Returns a Perl array. .SS "\fBitemTypes()\fP" .IX Subsection "itemTypes()" Get all item fields. Returns a Perl array. .SS "itemTypes($type)" .IX Subsection "itemTypes($type)" Get all valid fields for an item type. Returns a Perl array. .SS "itemTypeCreatorTypes($type)" .IX Subsection "itemTypeCreatorTypes($type)" Get valid creator types for an item type. Returns a Perl array. .SS "\fBcreatorFields()\fP" .IX Subsection "creatorFields()" Get localized creator fields. Returns a Perl array. .SS "itemTemplate($type)" .IX Subsection "itemTemplate($type)" Get a template for a new item. Returns a Perl hash. .SS "keyPermissions($key)" .IX Subsection "keyPermissions($key)" Return the userID and premissions for the given \s-1API\s0 key. .SS "userGroups($userID)" .IX Subsection "userGroups($userID)" Return an array of the set of groups the current \s-1API\s0 key as access to. .ie n .SS "listItems(user => $userID, %options)" .el .SS "listItems(user => \f(CW$userID\fP, \f(CW%options\fP)" .IX Subsection "listItems(user => $userID, %options)" .ie n .SS "listItems(group => $groupID, %options)" .el .SS "listItems(group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "listItems(group => $groupID, %options)" List all items for a user or ar group. Optionally provide a list of options: .PP .Vb 9 \& sort \- dateAdded, dateModified, title, creator, type, date, publisher, \& publicationTitle, journalAbbreviation, language, accessDate, \& libraryCatalog, callNumber, rights, addedBy, numItems (default dateModified) \& direction \- asc, desc \& limit \- integer 1\-100* (default 25) \& start \- integer \& format \- perl, atom, bib, json, keys, versions , bibtex , bookmarks, \& coins, csljson, mods, refer, rdf_bibliontology , rdf_dc , \& rdf_zotero, ris , tei , wikipedia (default perl) \& \& when format => \*(Aqjson\*(Aq \& \& include \- bib, data \& \& when format => \*(Aqatom\*(Aq \& \& content \- bib, html, json \& \& when format => \*(Aqbib\*(Aq or content => \*(Aqbib\*(Aq \& \& style \- chicago\-note\-bibliography, apa, ... (see: https://www.zotero.org/styles/) \& \& \& itemKey \- A comma\-separated list of item keys. Valid only for item requests. Up to \& 50 items can be specified in a single request. \& itemType \- Item type search \& q \- quick search \& qmode \- titleCreatorYear, everything \& since \- integer \& tag \- Tag search .Ve .PP See: https://www.zotero.org/support/dev/web_api/v3/basics#user_and_group_library_urls for the search syntax. .PP Returns a Perl \s-1HASH\s0 containing the total number of hits plus the results: .PP .Vb 4 \& { \& total => \*(Aq132\*(Aq, \& results => \& } .Ve .ie n .SS "listItems(user => $userID | group => $groupID, generator => 1 , %options)" .el .SS "listItems(user => \f(CW$userID\fP | group => \f(CW$groupID\fP, generator => 1 , \f(CW%options\fP)" .IX Subsection "listItems(user => $userID | group => $groupID, generator => 1 , %options)" Same as listItems but this return a generator for every record found. Use this method to sequentially read the complete resultset. E.g. .PP .Vb 1 \& my $generator = $self\->listItems(user => \*(Aq231231\*(Aq, generator); \& \& while (my $record = $generator\->()) { \& printf "%s\en" , $record\->{title}; \& } .Ve .PP The format is implicit 'perl' in this case. .ie n .SS "listItemsTop(user => $userID | group => $groupID, %options)" .el .SS "listItemsTop(user => \f(CW$userID\fP | group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "listItemsTop(user => $userID | group => $groupID, %options)" The set of all top-level items in the library, excluding trashed items. .PP See 'listItems(...)' functions above for all the execution options. .ie n .SS "listItemsTrash(user => $userID | group => $groupID, %options)" .el .SS "listItemsTrash(user => \f(CW$userID\fP | group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "listItemsTrash(user => $userID | group => $groupID, %options)" The set of items in the trash. .PP See 'listItems(...)' functions above for all the execution options. .ie n .SS "getItem(itemKey => ... , user => $userID | group => $groupID, %options)" .el .SS "getItem(itemKey => ... , user => \f(CW$userID\fP | group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "getItem(itemKey => ... , user => $userID | group => $groupID, %options)" A specific item in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the item if found. .ie n .SS "getItemChildren(itemKey => ... , user => $userID | group => $groupID, %options)" .el .SS "getItemChildren(itemKey => ... , user => \f(CW$userID\fP | group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "getItemChildren(itemKey => ... , user => $userID | group => $groupID, %options)" The set of all child items under a specific item. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the children if found. .ie n .SS "getItemTags(itemKey => ... , user => $userID | group => $groupID, %options)" .el .SS "getItemTags(itemKey => ... , user => \f(CW$userID\fP | group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "getItemTags(itemKey => ... , user => $userID | group => $groupID, %options)" The set of all tags associated with a specific item. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the tags if found. .ie n .SS "listTags(user => $userID | group => $groupID, [tag => $name] , %options)" .el .SS "listTags(user => \f(CW$userID\fP | group => \f(CW$groupID\fP, [tag => \f(CW$name\fP] , \f(CW%options\fP)" .IX Subsection "listTags(user => $userID | group => $groupID, [tag => $name] , %options)" The set of tags (i.e., of all types) matching a specific name. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of tags. .ie n .SS "listCollections(user => $userID | group => $groupID , %options)" .el .SS "listCollections(user => \f(CW$userID\fP | group => \f(CW$groupID\fP , \f(CW%options\fP)" .IX Subsection "listCollections(user => $userID | group => $groupID , %options)" The set of all collections in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of collections. .ie n .SS "listCollectionsTop(user => $userID | group => $groupID , %options)" .el .SS "listCollectionsTop(user => \f(CW$userID\fP | group => \f(CW$groupID\fP , \f(CW%options\fP)" .IX Subsection "listCollectionsTop(user => $userID | group => $groupID , %options)" The set of all top-level collections in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of collections. .ie n .SS "getCollection(collectionKey => ... , user => $userID | group => $groupID, %options)" .el .SS "getCollection(collectionKey => ... , user => \f(CW$userID\fP | group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "getCollection(collectionKey => ... , user => $userID | group => $groupID, %options)" A specific item in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the collection if found. .ie n .SS "listSubCollections(collectionKey => ...., user => $userID | group => $groupID , %options)" .el .SS "listSubCollections(collectionKey => ...., user => \f(CW$userID\fP | group => \f(CW$groupID\fP , \f(CW%options\fP)" .IX Subsection "listSubCollections(collectionKey => ...., user => $userID | group => $groupID , %options)" The set of subcollections within a specific collection in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of (sub)collections. .ie n .SS "listCollectionItems(collectionKey => ...., user => $userID | group => $groupID , %options)" .el .SS "listCollectionItems(collectionKey => ...., user => \f(CW$userID\fP | group => \f(CW$groupID\fP , \f(CW%options\fP)" .IX Subsection "listCollectionItems(collectionKey => ...., user => $userID | group => $groupID , %options)" The set of all items within a specific collection in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of items. .ie n .SS "listCollectionItemsTop(collectionKey => ...., user => $userID | group => $groupID , %options)" .el .SS "listCollectionItemsTop(collectionKey => ...., user => \f(CW$userID\fP | group => \f(CW$groupID\fP , \f(CW%options\fP)" .IX Subsection "listCollectionItemsTop(collectionKey => ...., user => $userID | group => $groupID , %options)" The set of top-level items within a specific collection in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of items. .ie n .SS "listCollectionItemsTags(collectionKey => ...., user => $userID | group => $groupID , %options)" .el .SS "listCollectionItemsTags(collectionKey => ...., user => \f(CW$userID\fP | group => \f(CW$groupID\fP , \f(CW%options\fP)" .IX Subsection "listCollectionItemsTags(collectionKey => ...., user => $userID | group => $groupID , %options)" The set of tags within a specific collection in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of items. .ie n .SS "listSearches(user => $userID | group => $groupID , %options)" .el .SS "listSearches(user => \f(CW$userID\fP | group => \f(CW$groupID\fP , \f(CW%options\fP)" .IX Subsection "listSearches(user => $userID | group => $groupID , %options)" The set of all saved searches in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the list of saved searches. .ie n .SS "getSearch(searchKey => ... , user => $userID | group => $groupID, %options)" .el .SS "getSearch(searchKey => ... , user => \f(CW$userID\fP | group => \f(CW$groupID\fP, \f(CW%options\fP)" .IX Subsection "getSearch(searchKey => ... , user => $userID | group => $groupID, %options)" A specific saved search in the library. .PP See 'listItems(...)' functions above for all the execution options. .PP Returns the saved search if found. .SH "AUTHOR" .IX Header "AUTHOR" Patrick Hochstenbach, \f(CW\*(C`\*(C'\fR .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Franc\*,ois Rappaz .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2015 Patrick Hochstenbach .PP This program is free software; you can redistribute it and/or modify it under the terms of either: the \s-1GNU\s0 General Public License as published by the Free Software Foundation; or the Artistic License. .PP See http://dev.perl.org/licenses/ for more information.