2017 © Pedro Peláez
 

library perguntados

API for Preguntados Game from Etermax

image

juniorfontenele/perguntados

API for Preguntados Game from Etermax

  • Thursday, January 28, 2016
  • by juniorfontenele
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Perguntados API

An API to Preguntados Game by Etermax, (*1)

This package provides an interface to interact with 'Preguntados' Game from Etermax, (*2)

Requirements

You'll need to have an open session with Preguntados Game and know your Preguntados' user_id. You can access this information following this tutorial., (*3)

Instalation

The easiest way to install this package is using composer:, (*4)

composer require juniorfontenele/perguntados

Usage

  • Rename .env.example to .env
  • Replace 'USER_ID' with your Preguntados' USER ID
  • Replace 'APP_COOKIE' with your Preguntados' session cookie (ap_session)
  • Import Perguntados Class to your file:
require_once __DIR__ . '/../../vendor/autoload.php';
use Perguntados\Perguntados;
$Perguntados = new Perguntados();

List All Pending and Active Games

$games = $Perguntados->getGames();
foreach ($games as $game) {
    echo $game->toJson();
}

Get Info on a specific game

$gameId = '1234567890';
$game = $Perguntados->getGame($gameId);
echo $game->toJson();

Win a Game

try {
    $Perguntados->winGame($game);
} catch(Exception $e) {
    echo "Failed to win game: " . $e->getMessage();
}

Play and Win a Random Duel

try {
    $Perguntados->winRandomDuel();
} catch(Exception $e) {
    echo "Failed to win random game: " . $e->getMessage();
}

License

The MIT License (MIT). Please see License File for more information., (*5)

The Versions

28/01 2016

dev-master

9999999-dev

API for Preguntados Game from Etermax

  Sources   Download

MIT

The Requires

 

by Junior Fontenele

28/01 2016

dev-develop

dev-develop

API for Preguntados Game from Etermax

  Sources   Download

MIT

The Requires

 

by Junior Fontenele

28/01 2016

v1.0.3

1.0.3.0

API for Preguntados Game from Etermax

  Sources   Download

MIT

The Requires

 

by Junior Fontenele

28/01 2016

v1.0.2

1.0.2.0

API for Preguntados Game from Etermax

  Sources   Download

MIT

The Requires

 

by Junior Fontenele

24/01 2016

v1.0.1

1.0.1.0

API for Preguntados Game from Etermax

  Sources   Download

MIT

The Requires

 

by Junior Fontenele

24/01 2016

v1.0.0

1.0.0.0

API for Preguntados Game from Etermax

  Sources   Download

MIT

The Requires

 

by Junior Fontenele