Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schwern/metabase-client-simple
My repo for changes to the Metabase-Client-Simple Perl module
https://github.com/schwern/metabase-client-simple
Last synced: about 1 month ago
JSON representation
My repo for changes to the Metabase-Client-Simple Perl module
- Host: GitHub
- URL: https://github.com/schwern/metabase-client-simple
- Owner: schwern
- License: other
- Created: 2011-09-23T21:11:39.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-09-23T21:16:04.000Z (over 13 years ago)
- Last Synced: 2024-10-29T20:09:14.338Z (2 months ago)
- Language: Perl
- Homepage: http://search.cpan.org/dist/Metabase-Client-Simple
- Size: 117 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
NAME
Metabase::Client::Simple - a client that submits to Metabase serversVERSION
version 0.008SYNOPSIS
use Metabase::Client::Simple;
use Metabase::User::Profile;
use Metabase::User::Secret;my $profile = Metabase::User::Profile->load('user.profile.json');
my $secret = Metabase::User::Secret ->load('user.secret.json' );my $client = Metabase::Client::Simple->new({
profile => $profile,
secret => $secret,
uri => 'http://metabase.example.com/',
});my $fact = generate_metabase_fact;
$client->submit_fact($fact);
DESCRIPTION
Metabase::Client::Simple provides is extremely simple, lightweight
library for submitting facts to a Metabase web server.METHODS
new
my $client = Metabase::Client::Simple->new(\%arg)This is the object constructor.
Valid arguments are:
profile - a Metabase::User::Profile object
secret - a Metabase::User::Secret object
uri - the root URI for the metabase serverIf you use a "uri" argument with the 'https' scheme, you must have
Crypt::SSLeay or IO::Socket::SSL installed.submit_fact
$client->submit_fact($fact);This method will submit a Metabase::Fact object to the client's server.
On success, it will return a true value. On failure, it will raise an
exception.guid_exists
$client->guid_exists('2f8519c6-24cf-11df-90b1-0018f34ec37c');This method will check whether the given GUID is found on the metabase
server. The GUID must be in lower-case, string form. It will return true
or false. Note that a server error will also result in a false value.register
$client->register;This method will submit the user credentials to the metabase server. It
will be called automatically by "submit_fact" if necessary. You
generally won't need to use it. On success, it will return a true value.
On failure, it will raise an exception.AUTHORS
David Golden
Ricardo SignesCOPYRIGHT AND LICENSE
This software is Copyright (c) 2010 by David Golden.This is free software, licensed under:
The Apache License, Version 2.0, January 2004