GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WEBSERVICE::LINODE::BASE (3)

.ds Aq ’

NAME

WebService::Linode::Base - Perl Interface to the Linode.com API.

CONTENTS

SYNOPSIS

This module provides a simple OOish interface to the Linode.com API.

Example usage:



    use WebService::Linode::Base;

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



METHODS

    new

All methods take the same parameters as the Linode API itself does. Field names should be lower cased. All caps fields from the Linode API will be lower cased before returning the data.

Accepts a hash as an argument. apikey is the only required parameter specifying 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, 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 overides 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, useful for testing.

    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.

    do_request

Executes the send_request method, parses the response with the parse_response method and returns the data.

    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

This module does not yet support the Linode API batch method, patches welcome.

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:
o Module Repo

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

o RT: CPAN’s request tracker

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

o AnnoCPAN: Annotated CPAN documentation

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

o CPAN Ratings

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

o Search CPAN

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

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WEBSERVICE::LINODE::BASE (3) 2015-06-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.