.\" 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::ORCID::API::v2_0_public 3pm" .TH WWW::ORCID::API::v2_0_public 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::ORCID::API::v2_0_public \- A client for the ORCID 2.0 public API .SH "CREATING A NEW INSTANCE" .IX Header "CREATING A NEW INSTANCE" The \f(CW\*(C`new\*(C'\fR method returns a new 2.0 public \s-1API\s0 client. .PP Arguments to new: .ie n .SS """client_id""" .el .SS "\f(CWclient_id\fP" .IX Subsection "client_id" Your \s-1ORCID\s0 client id (required). .ie n .SS """client_secret""" .el .SS "\f(CWclient_secret\fP" .IX Subsection "client_secret" Your \s-1ORCID\s0 client secret (required). .ie n .SS """sandbox""" .el .SS "\f(CWsandbox\fP" .IX Subsection "sandbox" The client will talk to the \s-1ORCID\s0 sandbox \s-1API\s0 if set to \f(CW1\fR. .ie n .SS """transport""" .el .SS "\f(CWtransport\fP" .IX Subsection "transport" Specify the \s-1HTTP\s0 client to use. Possible values are \s-1LWP\s0 or HTTP::Tiny. Default is \s-1LWP\s0. .SH "METHODS" .IX Header "METHODS" .ie n .SS """client_id""" .el .SS "\f(CWclient_id\fP" .IX Subsection "client_id" Returns the \s-1ORCID\s0 client id used by the client. .ie n .SS """client_secret""" .el .SS "\f(CWclient_secret\fP" .IX Subsection "client_secret" Returns the \s-1ORCID\s0 client secret used by the client. .ie n .SS """sandbox""" .el .SS "\f(CWsandbox\fP" .IX Subsection "sandbox" Returns \f(CW1\fR if the client is using the sandbox \s-1API,\s0 \f(CW0\fR otherwise. .ie n .SS """transport""" .el .SS "\f(CWtransport\fP" .IX Subsection "transport" Returns what \s-1HTTP\s0 transport the client is using. .ie n .SS """api_url""" .el .SS "\f(CWapi_url\fP" .IX Subsection "api_url" Returns the base \s-1API\s0 url used by the client. .ie n .SS """oauth_url""" .el .SS "\f(CWoauth_url\fP" .IX Subsection "oauth_url" Returns the base OAuth url used by the client. .ie n .SS """access_token""" .el .SS "\f(CWaccess_token\fP" .IX Subsection "access_token" Request a new access token. .PP .Vb 4 \& my $token = $client\->access_token( \& grant_type => \*(Aqclient_credentials\*(Aq, \& scope => \*(Aq/read\-public\*(Aq, \& ); .Ve .ie n .SS """authorize_url""" .el .SS "\f(CWauthorize_url\fP" .IX Subsection "authorize_url" Helper that returns an authorization url for 3\-legged OAuth requests. .PP .Vb 7 \& # in your web application \& redirect($client\->authorize_url( \& show_login => \*(Aqtrue\*(Aq, \& scope => \*(Aq/person/update\*(Aq, \& response_type => \*(Aqcode\*(Aq, \& redirect_uri => \*(Aqhttp://your.callback/url\*(Aq, \& )); .Ve .PP See the \f(CW\*(C`/authorize\*(C'\fR and \f(CW\*(C`/authorized\*(C'\fR routes in the included playground application for an example. .ie n .SS """record_url""" .el .SS "\f(CWrecord_url\fP" .IX Subsection "record_url" Helper that returns an orcid record url. .PP .Vb 5 \& $client\->record_url(\*(Aq0000\-0003\-4791\-9455\*(Aq) \& # returns \& # http://orcid.org/0000\-0003\-4791\-9455 \& # or \& # http://sandbox.orcid.org/0000\-0003\-4791\-9455 .Ve .ie n .SS """read_public_token""" .el .SS "\f(CWread_public_token\fP" .IX Subsection "read_public_token" Return an access token with scope \f(CW\*(C`/read\-public\*(C'\fR. .ie n .SS """client""" .el .SS "\f(CWclient\fP" .IX Subsection "client" Get details about the current client. .ie n .SS """search""" .el .SS "\f(CWsearch\fP" .IX Subsection "search" .Vb 2 \& my $hits = $client\->search(q => "johnson"); \&=head2 C \& \& my $rec = $client\->activities(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqactivities\*(Aq, %opts) .Ve .ie n .SS """address""" .el .SS "\f(CWaddress\fP" .IX Subsection "address" .Vb 2 \& my $recs = $client\->address(token => $token, orcid => $orcid); \& my $rec = $client\->address(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqaddress\*(Aq, %opts) .Ve .ie n .SS """biography""" .el .SS "\f(CWbiography\fP" .IX Subsection "biography" .Vb 1 \& my $rec = $client\->biography(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqbiography\*(Aq, %opts) .Ve .ie n .SS """education""" .el .SS "\f(CWeducation\fP" .IX Subsection "education" .Vb 1 \& my $rec = $client\->education(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqeducation\*(Aq, %opts) .Ve .ie n .SS """delete_education""" .el .SS "\f(CWdelete_education\fP" .IX Subsection "delete_education" .Vb 1 \& my $ok = $client\->delete_education(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->delete(\*(Aqeducation\*(Aq, %opts) .Ve .ie n .SS """education_summary""" .el .SS "\f(CWeducation_summary\fP" .IX Subsection "education_summary" .Vb 1 \& my $rec = $client\->education_summary(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqeducation/summary\*(Aq, %opts) .Ve .ie n .SS """educations""" .el .SS "\f(CWeducations\fP" .IX Subsection "educations" .Vb 1 \& my $rec = $client\->educations(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqeducations\*(Aq, %opts) .Ve .ie n .SS """email""" .el .SS "\f(CWemail\fP" .IX Subsection "email" .Vb 1 \& my $rec = $client\->email(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqemail\*(Aq, %opts) .Ve .ie n .SS """employment""" .el .SS "\f(CWemployment\fP" .IX Subsection "employment" .Vb 1 \& my $rec = $client\->employment(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqemployment\*(Aq, %opts) .Ve .ie n .SS """employment_summary""" .el .SS "\f(CWemployment_summary\fP" .IX Subsection "employment_summary" .Vb 1 \& my $rec = $client\->employment_summary(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqemployment/summary\*(Aq, %opts) .Ve .ie n .SS """employments""" .el .SS "\f(CWemployments\fP" .IX Subsection "employments" .Vb 1 \& my $rec = $client\->employments(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqemployments\*(Aq, %opts) .Ve .ie n .SS """external_identifiers""" .el .SS "\f(CWexternal_identifiers\fP" .IX Subsection "external_identifiers" .Vb 2 \& my $recs = $client\->external_identifiers(token => $token, orcid => $orcid); \& my $rec = $client\->external_identifiers(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqexternal\-identifiers\*(Aq, %opts) .Ve .ie n .SS """funding""" .el .SS "\f(CWfunding\fP" .IX Subsection "funding" .Vb 1 \& my $rec = $client\->funding(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqfunding\*(Aq, %opts) .Ve .ie n .SS """funding_summary""" .el .SS "\f(CWfunding_summary\fP" .IX Subsection "funding_summary" .Vb 1 \& my $rec = $client\->funding_summary(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqfunding/summary\*(Aq, %opts) .Ve .ie n .SS """fundings""" .el .SS "\f(CWfundings\fP" .IX Subsection "fundings" .Vb 1 \& my $rec = $client\->fundings(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqfundings\*(Aq, %opts) .Ve .ie n .SS """keywords""" .el .SS "\f(CWkeywords\fP" .IX Subsection "keywords" .Vb 2 \& my $recs = $client\->keywords(token => $token, orcid => $orcid); \& my $rec = $client\->keywords(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqkeywords\*(Aq, %opts) .Ve .ie n .SS """other_names""" .el .SS "\f(CWother_names\fP" .IX Subsection "other_names" .Vb 2 \& my $recs = $client\->other_names(token => $token, orcid => $orcid); \& my $rec = $client\->other_names(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqother\-names\*(Aq, %opts) .Ve .ie n .SS """peer_review""" .el .SS "\f(CWpeer_review\fP" .IX Subsection "peer_review" .Vb 1 \& my $rec = $client\->peer_review(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqpeer\-review\*(Aq, %opts) .Ve .ie n .SS """peer_review_summary""" .el .SS "\f(CWpeer_review_summary\fP" .IX Subsection "peer_review_summary" .Vb 1 \& my $rec = $client\->peer_review_summary(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqpeer\-review/summary\*(Aq, %opts) .Ve .ie n .SS """peer_reviews""" .el .SS "\f(CWpeer_reviews\fP" .IX Subsection "peer_reviews" .Vb 1 \& my $rec = $client\->peer_reviews(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqpeer\-reviews\*(Aq, %opts) .Ve .ie n .SS """person""" .el .SS "\f(CWperson\fP" .IX Subsection "person" .Vb 1 \& my $rec = $client\->person(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqperson\*(Aq, %opts) .Ve .ie n .SS """personal_details""" .el .SS "\f(CWpersonal_details\fP" .IX Subsection "personal_details" .Vb 1 \& my $rec = $client\->personal_details(token => $token, orcid => $orcid); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqpersonal\-details\*(Aq, %opts) .Ve .ie n .SS """researcher_urls""" .el .SS "\f(CWresearcher_urls\fP" .IX Subsection "researcher_urls" .Vb 2 \& my $recs = $client\->researcher_urls(token => $token, orcid => $orcid); \& my $rec = $client\->researcher_urls(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqresearcher\-urls\*(Aq, %opts) .Ve .ie n .SS """work""" .el .SS "\f(CWwork\fP" .IX Subsection "work" .Vb 1 \& my $rec = $client\->work(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqwork\*(Aq, %opts) .Ve .ie n .SS """work_summary""" .el .SS "\f(CWwork_summary\fP" .IX Subsection "work_summary" .Vb 1 \& my $rec = $client\->work_summary(token => $token, orcid => $orcid, put_code => \*(Aq123\*(Aq); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqwork/summary\*(Aq, %opts) .Ve .ie n .SS """works""" .el .SS "\f(CWworks\fP" .IX Subsection "works" .Vb 2 \& my $recs = $client\->works(token => $token, orcid => $orcid); \& my $recs = $client\->works(token => $token, orcid => $orcid, put_code => [\*(Aq123\*(Aq, \*(Aq456\*(Aq]); .Ve .PP Equivalent to: .PP .Vb 1 \& $client\->get(\*(Aqworks\*(Aq, %opts) .Ve .ie n .SS """last_error""" .el .SS "\f(CWlast_error\fP" .IX Subsection "last_error" Returns the last error returned by the \s-1ORCID API,\s0 if any. .ie n .SS """log""" .el .SS "\f(CWlog\fP" .IX Subsection "log" Returns the Log::Any logger.