-
-
08 Mar 2017 22:04:32 UTC
- Distribution: Megaport
- 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::Services
DESCRIPTION
This provide a simple read-only list of Megaport services owned by the logged in account. Details about the objects returned by the API can be found here.
METHODS
list
# Optional array or arrayref my @list = $services->list; my $list = $services->list; # Use search terms to find a partial list my @fast = $services->list(portSpeed => 10000); my @merican = $services->list(market => 'US');
Returns a list or allows searching based on any field present in the object.
get
my $gs_port = $services->get(id => 'my-product-uid'); my $first = $services->get(name => 'My First Megaport');
Best used to search by
id
but as with "list" in list, any field can be used. This method uses "first" in List::Util to return the first matching entry. The data is stored in a hash internally so the keys are unordered. Using this method with a search term likeproductType
will yield unexpected results.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.