NAME
WebService::Futu - Perl interface to the Futu API
VERSION
Version 0.01
SYNOPSIS
use WebService::Futu;
my $ws = WebService::Futu->new( user => 'username',
pass => 'password' );
my $body = $ws->perform_get('/api/personal');
my $trans = {
date => {
day => 12,
month => 10,
year => 2010
},
amount => 100,
tags => {
dir => 'out',
how => 'platba v hotovosti',
regularity => "b\x{11b}\x{17e}n\x{e1}",
what => "Jidlo",
whom => "Tesco",
who => "",
product => "cash",
card => ""
},
note => 'Something to eat.'
};
$ws->perform_post('/api/transaction/', $trans));
DESCRIPTION
Library for comuniccation with Futu API.
METHODS
- new( [user => $username|id => $futuid], pass => $password, url => $url )
-
Call new() to create a new Futu object. You have to pass username or futu id and password.
It is possible to pass base url for API queries with parameter url. (default 'http://www.futu.cz')
Example:
my $bc = WebService::Futu->new( user => $username, pass => $password );
- error()
-
Returns any error messages as a string.
- perform_get()
-
Perform request on the server. Automatically request authentication token.
my $personal = $self->perform_get('/api/personal');
- perform_post($content)
-
Perform post on the server. Automatically request authentication token. $content is used for sending content.
my $personal = $self->perform_post('/api/transaction/', $content);
- perform_put($content)
-
Perform put on the server. Automatically request authentication token. $content is used for sending content.
my $personal = $self->perform_put('/api/transaction/123', $content);
AUTHOR
Vaclav Dovrtel, <vaclav.dovrtel at gmail.com>
BUGS
Please report any bugs or feature requests to bug-webservice-futu at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Futu. 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::Futu
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2010 Vaclav Dovrtel.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.