NAME

Firebase - An interface to firebase.com.

VERSION

version 0.0202

SYNOPSIS

use Firebase;

my $fb = Firebase->new(firebase => 'myfirebase', auth => { secret => 'xxxxxxx', data => { id => 'xxx', username => 'fred' }, admin => \1 } );

my $result = $fb->put('foo', { this => 'that' });
my $result = $fb->get('foo'); # or $fb->get('foo/this');
my $result = $fb->delete('foo');

DESCRIPTION

This is a light-weight wrapper around the Firebase REST API. Firebase is a real-time web service that acts as both a queue and a datastore. It's used for building real-time web apps and web services.

More info at https://www.firebase.com/docs/rest-api-quickstart.html.

METHODS

new

Constructor

firebase

Required. The name of your firebase.

auth

The parameters you'd pass to create a Firebase::Auth object. This is a shortcut for constructing the object yourself and passing it into authobj.

authobj

A Firebase::Auth object. Will be generated for you automatically if you don't supply one, but do supply auth.

agent

A user agent. An HTTP::Thin object will be generated for you automatically if you don't supply one.

get

Fetch some data from firebase.

path

The path to the info you want to fetch.

put

Put some data into a firebase.

path

The path where the info should be stored.

params

A hash reference of parameters to be stored at this location.

Warning: Firebase doesn't work with arrays, so you can nest scalars and hashes here, but not arrays.

delete

Delete some data from a firebase.

path

The path where the info is that you want deleted.

debug

If debug has been set to a true value in Firebase::Auth, this will return the debug message returned with the previous response.

create_uri

Creates a URI to a firebase data segment. You almost certainly want to use get, put or delete instead.

path

The path to the data.

params

Any parameters you need to pass for any reason.

process_request

Requests data and runs it through process_response. You almost certainly want to use get, put or delete instead.

request

An HTTP::Request object.

process_response

Checks for errors, decodes json, and returns a result. You almost certainly want to use get, put or delete instead.

response

An HTTP::Response object.

AUTHOR

  • Kiran Kumar, <kiran at brainturk.com>

  • JT Smith, <jt at plainblack.com>

SUPPORT

Source Code Repository

https://github.com/rizen/Firebase

Issue Tracker

https://github.com/rizen/Firebase/issues

LICENSE AND COPYRIGHT

Copyright 2013 Plain Black Corporation

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.