Git Product home page Git Product logo

openxbl-php's Introduction

OpenXBL PHP Wrapper

This PHP package is a lightweight wrapper for OpenXBL. That's the easiest way to use OpenXBL in your PHP applications.

Build Status

Part of the XBL.IO feature set.

<?php
/**
 * # Instantiate.
 */
require __DIR__ . '/vendor/autoload.php';
use \OpenXBL\Api;

$xbox = new Api('API_KEY');

print $xbox->get('/account');
?>

Quickstart

To download this wrapper and integrate it inside your PHP application, you can use Composer.

Quick integration with the following command:

composer require openxbl/openxbl

Or add the repository in your composer.json file or if you don't already have this file create it at the root of your project with this content:

{
    "name": "Example Application",
    "description": "This is an example of OpenXBL",
    "require": {
        "openxbl/openxbl": "dev-master"
    }
}

Then, you can install the OpenXBL wrapper and dependencies with:

php composer.phar install

This will install openxbl/openxbl to ./vendor along with other dependencies including autoload.php.

Making an App Request

<?php
/**
 * # Instantiate.
 */
require __DIR__ . '/vendor/autoload.php';
use \OpenXBL\Api;

$xbox = new Api('APP_KEY');

$xbox->isApp = TRUE;

print $xbox->get('/account');

print $xbox->post('/clubs/reserve', array('name' => 'OpenXBL'));
?>

Optional Parameters

<?php
/**
 * # Format of the response.
 */
$xbox->format = 'json';

/**
 * # Language of response, if available. 
 */
$xbox->language = 'en-US, en';

?>

Supported APIs

This wrapper is built using OpenXBL /api/v2/

Collaborate

Visit our discord channel and say hello!.

Support

The following support channels can be used for contact.

openxbl-php's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.