1WebService::Linode::BasUes(e3rpmC)ontributed Perl DocumeWnetbaSteirovnice::Linode::Base(3pm)
2
3
4
6 WebService::Linode::Base - Perl Interface to the Linode.com API.
7
9 This module provides a simple OOish interface to the Linode.com API.
10
11 Example usage:
12
13 use WebService::Linode::Base;
14
15 my $api = WebService::Linode::Base->new(apikey => 'mmmcake');
16 my $data = $api->do_request( api_action => 'domains.list' );
17
19 new
20 All methods take the same parameters as the Linode API itself does.
21 Field names should be lower cased. All caps fields from the Linode API
22 will be lower cased before returning the data.
23
24 Accepts a hash as an argument. apikey is the only required parameter
25 specifying your Linode API key.
26
27 Errors mirror the perl DBI error handling method.
28 $WebService::Linode::Base::err and ::errstr will be populated with the
29 last error number and string that occurred. All errors generated
30 within the module are currently error code -1. By default, will warn
31 on errors as well, pass a true value for fatal to die instead, or
32 nowarn to prevent the warnings.
33
34 verbose is 0-10 with 10 being the most and 0 being none
35
36 useragent if passed gets passed on to the LWP::UserAgent agent method
37 to set a custom user agent header on HTTP requests.
38
39 apiurl if passed overides the default URL for API requests. You may
40 also use the environment variable LINODE_API_URL. If set, the
41 environment variable supersedes any apiurl argument supplied to the
42 constructor, useful for testing.
43
44 send_request
45 Sends a request to the API, takes a hash of name=>value pairs. Returns
46 an HTTP::Response object.
47
48 parse_response
49 Takes an HTTP::Response object and parses the API response returning
50 just the DATA section.
51
52 do_request
53 Executes the send_request method, parses the response with the
54 parse_response method and returns the data.
55
56 queue_request
57 Takes same arguments as send_request, but queues the request to be
58 handled by a single batch request later.
59
60 list_queue
61 Returns list of queued requests.
62
63 clear_queue
64 Clears batch request queue.
65
66 process_queue
67 Sends queued items in a batch request. Takes an optional number of
68 items to send in the batch request, defaulting to all queued requests.
69 Returns an api reponse for each batch item.
70
71 apikey
72 Takes one optional argument, an apikey that if passed replaces the key
73 currently in use. Returns the current (or new) apikey.
74
75 Returns the apikey
76
78 Michael Greb, "<mgreb@linode.com>"
79
81 This module does not yet support the Linode API batch method, patches
82 welcome.
83
84 Please report any bugs or feature requests to "bug-webservice-linode at
85 rt.cpan.org", or through the web interface at
86 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Linode>. I
87 will be notified, and then you'll automatically be notified of progress
88 on your bug as I make changes.
89
91 You can find documentation for this module with the perldoc command.
92
93 perldoc WebService::Linode::Base
94
95 You can also look for information at:
96
97 • Module Repo
98
99 <http://git.thegrebs.com/?p=WebService-Linode;a=summary>
100
101 • RT: CPAN's request tracker
102
103 <http://rt.cpan.org/NoAuth/Bugs.html?Dist=WebService-Linode>
104
105 • AnnoCPAN: Annotated CPAN documentation
106
107 <http://annocpan.org/dist/WebService-Linode>
108
109 • CPAN Ratings
110
111 <http://cpanratings.perl.org/d/WebService-Linode>
112
113 • Search CPAN
114
115 <http://search.cpan.org/dist/WebService-Linode>
116
119 Copyright 2008-2014 Michael Greb, all rights reserved.
120
121 This program is free software; you can redistribute it and/or modify it
122 under the same terms as Perl itself.
123
124
125
126perl v5.32.1 2021-01-27 WebService::Linode::Base(3pm)