WebSer...::Base(3pm)

πŸ“¦
version 0.29 Β· 2 versions
, in fedora 43

πŸ’– WebService::Linode::Base πŸ’–

okay bestie, gather round, because this is the Perl interface to the Linode.com API and it's genuinely so useful. it lives in the User Contributed Perl Documentation corner of your system, section 3pm, and it's here to make talking to Linode not a whole thing. πŸ¦‹


✨ NAME ✨

WebService::Linode::Base β€” Perl Interface to the Linode.com API.


🌸 SYNOPSIS 🌸

so basically this module gives you a simple OOish interface to the Linode.com API. yes. that's the whole vibe. πŸ’…

example usage, copy it exactly bestie:

use WebService::Linode::Base;

my $api = WebService::Linode::Base->new(apikey => 'mmmcake');
my $data = $api->do_request( api_action => 'domains.list' );

πŸŽ€ METHODS πŸŽ€

⭐ new

every single method takes the same parameters as the Linode API itself does. no cap. field names should be lower cased, and all caps fields from the Linode API will be lower cased before returning the data. she normalizes for you, iconic behavior honestly. πŸ‘‘

it accepts a hash as an argument. apikey is the only required parameter, and it specifies your Linode API key.

errors mirror the perl DBI error handling method. $WebService::Linode::Base::err and ::errstr will be populated with the last error number and string that occurred. all errors generated within the module are currently error code -1. by default, it will warn on errors as well β€” pass a true value for fatal to die instead, or nowarn to prevent the warnings.

  • verbose is 0-10, with 10 being the most and 0 being none.
  • useragent β€” if passed, gets passed on to the LWP::UserAgent agent method to set a custom user agent header on HTTP requests.
  • apiurl β€” if passed, overrides the default URL for API requests. you may also use the environment variable LINODE_API_URL. if set, the environment variable supersedes any apiurl argument supplied to the constructor, which is useful for testing. lowkey a little sneaky of the env var but ok. πŸ™ˆ

⭐ send_request

sends a request to the API. takes a hash of name=>value pairs. returns an HTTP::Response object.

⭐ parse_response

takes an HTTP::Response object and parses the API response, returning just the DATA section. that's it. just the data. we don't need the rest of the noise. ✨

⭐ do_request

executes the send_request method, parses the response with the parse_response method, and returns the data. she does the whole pipeline for you, main character energy fr fr. πŸ’–

⭐ queue_request

takes same arguments as send_request, but queues the request to be handled by a single batch request later.

⭐ list_queue

returns list of queued requests.

⭐ clear_queue

clears batch request queue.

⭐ process_queue

sends queued items in a batch request. takes an optional number of items to send in the batch request, defaulting to all queued requests. returns an api reponse for each batch item.

⭐ apikey

takes one optional argument, an apikey that if passed replaces the key currently in use. returns the current (or new) apikey.

returns the apikey 🫢


🌈 AUTHOR 🌈

Michael Greb, "<mgreb@linode.com>"


πŸ’€ BUGS πŸ’€

not me about to tell you this module does not yet support the Linode API batch method. patches welcome bestie, please, the door is open. 😭

please report any bugs or feature requests to "bug-webservice-linode at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Linode. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


🧚 SUPPORT 🧚

you can find documentation for this module with the perldoc command.

perldoc WebService::Linode::Base

you can also look for information at:

  • Module Repo

http://git.thegrebs.com/?p=WebService-Linode;a=summary

  • RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=WebService-Linode

  • AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/WebService-Linode

  • CPAN Ratings

http://cpanratings.perl.org/d/WebService-Linode

  • Search CPAN

http://search.cpan.org/dist/WebService-Linode


πŸŽ€ ACKNOWLEDGEMENTS πŸŽ€

this section is literally just vibes and empty space bestie β€” there's nothing under it in the original, so there's nothing under it here either. respect the silence. 🀫


Copyright 2008-2014 Michael Greb, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay that's the whole page, you ate it, you read it, you're basically a Linode API girlie now πŸ’…

cute little sign-off for the record: this was written against perl v5.42.0, dated 2025-07-25, and the page title got squished to WebSer...::Base(3pm) by the formatter which is honestly so real of it. go forth and do_request bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from