E5C3 GitHub - dofus-odyssey/dofusdb-php-wrapper: A PHP wrapper for the DofusDb API, providing an easy and efficient way to access and interact with Dofus game data in PHP applications. It simplifies API calls and data handling for developers working on Dofus-related projects. · GitHub
[go: up one dir, main page]

Skip to content

dofus-odyssey/dofusdb-php-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DofusDB PHP Wrapper

CI Status

Installation

composer require dofus-odyssey/dofusdb-php-wrapper

Usage

use DofusOdyssey\DofusdbPhpWrapper\QueryBuilder;
use DofusOdyssey\DofusdbPhpWrapper\ApiEndpoint;

// Find all breeds
$queryBuilder = new QueryBuilder(ApiEndpoint::BREEDS);
$queryBuilder->getQuery()->execute();

// Find all breed with a name equals to "Feca"
$queryBuilder = new QueryBuilder(ApiEndpoint::BREEDS);
$queryBuilder
    ->andWhere([
        ['field' => 'shortName.en', 'operator' => '=', 'value' => 'Feca'],
    ])
    ->getQuery()
    ->execute();

// Find all breed with a name equals to "Feca" or "Enutrof"
$queryBuilder = new QueryBuilder(ApiEndpoint::BREEDS);
$queryBuilder
    ->orWhere([
        ['field' => 'shortName.en', 'operator' => '=', 'value' => 'Feca'],
        ['field' => 'shortName.en', 'operator' => '=', 'value' => 'Enutrof'],
    ])
    ->getQuery()
    ->execute();

// Get the query parameters in string format
$queryBuilder = new QueryBuilder(ApiEndpoint::BREEDS);
$queryBuilder
    ->orWhere([
        ['field' => 'shortName.en', 'operator' => '=', 'value' => 'Feca'],
        ['field' => 'shortName.en', 'operator' => '=', 'value' => 'Enutrof'],
    ])
    ->getQuery()
    ->getRawQueryString();
// $or[0][shortName.en]=Feca&$or[1][shortName.en]=Enutrof

License

This project is licensed under the MIT License. For more details, see the LICENSE file.

About

A PHP wrapper for the DofusDb API, providing an easy and efficient way to access and interact with Dofus game data in PHP applications. It simplifies API calls and data handling for developers working on Dofus-related projects.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

0