2017 © Pedro Peláez
 

library firebase-rest-php

image

partner-it/firebase-rest-php

  • Wednesday, September 27, 2017
  • by darxmac
  • Repository
  • 2 Watchers
  • 1 Stars
  • 765 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 1 % Grown

The README.md

firebase-rest-php

PHP Wrapper for the Firebase REST API, (*1)

Installation

Using Composer, (*2)

$ composer require partner-it/firebase-rest-php

Usage

Create a new client instance:, (*3)

<?php

$fireBaseClient = new FirebaseClient([
    'base_uri' => 'https://xyz.firebaseio.com',
]);

Then either generate a token with your secret key:, (*4)

<?php

$fireBaseClient->generateToken('SecretKey', 'useruid');

or set a token you already have:, (*5)

<?php

$fireBaseClient->setToken('YourToken');

Then use it to make requests:, (*6)

<?php

$response = $fireBaseClient->get('/mypath');

$response = $fireBaseClient->post('/mypath', ['json' => ['key' => 'value']]);

The returned object is a FirebaseResponse object, to just get the data use, (*7)

<?php

$data = $response->json();

To get the status code, (*8)

<?php

$statusCode = $response->getStatusCode();

You can also grab the underlying response object with, (*9)

<?php

$guzzleResponse = $response->getResponse();

The Versions

27/09 2017

dev-develop

dev-develop

  Sources   Download

MIT

The Requires

 

The Development Requires

04/02 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

04/02 2016

1.0.5

1.0.5.0

  Sources   Download

MIT

The Requires

 

The Development Requires

30/11 2015

1.0.4

1.0.4.0

  Sources   Download

MIT

The Requires

 

The Development Requires

16/09 2015

1.0.3

1.0.3.0

  Sources   Download

MIT

The Requires

 

The Development Requires

27/08 2015

1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

27/08 2015

dev-darxmac-patch-1

dev-darxmac-patch-1

  Sources   Download

MIT

The Requires

 

The Development Requires

26/08 2015

dev-zortje-patch-1

dev-zortje-patch-1

  Sources   Download

MIT

The Requires

 

The Development Requires

26/08 2015

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

26/08 2015

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires