HTTP::...nToken(3pm)

πŸ“¦
version 4.13 Β· 5 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

HTTP::OAI::ResumptionToken β€” it encapsulates an OAI resumption token. That's the whole vibe, bestie πŸ’…

okay so real talk: this little page lives in the User Contributed Perl Documentation, and it's here to explain one tiny-but-iconic object that wraps up an OAI resumption token for you. That's it. That's the job. And it does it gorgeously πŸŽ€


πŸ¦‹ METHODS πŸ¦‹

  • $rt = new HTTP::OAI::ResumptionToken β€” this constructor method hands you back a brand-new HTTP::OAI::ResumptionToken object. fresh out the box, no cap ✨
  • $token = $rt->resumptionToken([$token]) β€” gives you the resumption token string, and if you pass $token in, it also sets it. getter-and-setter energy, main character behaviour fr 🫢
  • $ed = $rt->expirationDate([$rt]) β€” returns the expiration date of the resumption token, and optionally sets it too if you hand it a value. yes bestie, $rt is the placeholder here, keep it exactly as written πŸ’–
  • $cls = $rt->completeListSize([$cls]) β€” returns the cardinality of the result set, and optionally sets it. so like… how many records total. the whole roster πŸ‘‘
  • $cur = $rt->cursor([$cur]) β€” returns the index of the first record (of the current page) in the result set, and optionally sets it. it's the lil bookmark telling you where you are in the scroll πŸ¦‹

πŸ’€ NOTE - Completing incomplete list πŸ’€

okay this part is IMPORTANT, don't skip it:

The final page of a record list which has been split using resumption tokens must contain an empty resumption token.

like, the last page cannot be out here with a whole token still in it. empty token on the final page. periodt 🌸


and that's the whole page, bestie β€” you ate that read πŸ’…βœ¨

this gorgeous lil doc came from perl v5.36.0, dated 2023-09-28, and it was served up as HTTP::...nToken(3pm) β€” mwah, bye πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from