-
-
08 Mar 2017 22:04:32 UTC
- Distribution: Megaport
- Module version: 1.00
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (505 / 0 / 11)
- Kwalitee
Bus factor: 0- 48.84% Coverage
- License: unknown
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (7.94KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
Megaport::Client
DESCRIPTION
This class provides a simple mechanism for making API calls and performing error handling and returning data in a well-known format intended for use in the rest of the Megaport package.
METHODS
login
Performs the appropriate login action based on the credentials provided (
username/password
ortoken
).verify
If
no_verify
is not set, this is called bylogin
to validate the token.request
# Simple GET my $data = $client->request(GEt => '/locations'); # POST my $data = $client->request(POST => '/profile', content => encode_json($user));
Performs a HTTP request, arguments are similar to HTTP::Request but trimmed. Creates a HTTP::Request object with the right base URI and auth headers.
If
debug
is set, this will also dump the response body to STDERR.AUTHOR
Cameron Daniel <cdaniel@cpan.org>
Module Install Instructions
To install Megaport, copy and paste the appropriate command in to your terminal.
cpanm Megaport
perl -MCPAN -e shell install Megaport
For more information on module installation, please visit the detailed CPAN module installation guide.