Giter Club home page Giter Club logo

pokemon-tcg-sdk-php's Introduction

Pokémon TCG SDK

pokemontcg-developers on discord Build Status Code Climate

This is the Pokémon TCG SDK PHP implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.

Installation

composer require pokemon-tcg/pokemon-tcg-sdk-php

Usage

Find a Card by id

$card = Pokemon::Card()->find('xy1-1');

Filter Cards via query parameters

$cards = Pokemon::Card()->where(['set' => 'generations'])->where(['supertype' => 'pokemon'])->all();
$cards = Pokemon::Card()->where([
    'set'     => 'roaring skies',
    'subtype' => 'ex'
])->all();

Find all Cards

$cards = Pokemon::Card()->all();

Paginate Card queries

$cards = Pokemon::Card()->where([
    'page'     => 5,
    'pageSize' => 100
])->all();

Find a Set by set code

$set = Pokemon::Set()->find('base1');

Filter Sets via query parameters

$set = Pokemon::Set()->where(['standardLegal' => 'true'])->all();

Get all Sets

$sets = Pokemon::Set()->all();

Get all Types

$types = Pokemon::Type()->all();

Get all Subtypes

$subtypes = Pokemon::Subtype()->all();

Get all Supertypes

$supertypes = Pokemon::Supertype()->all();

Models

Card

Parameter Type
id string
name string
nationalPokedexNumber int
imageUrl string
imageUrlHiRes string
subtype string
supertype string
ability Ability
ancientTrait AncientTrait
hp string
number string
artist string
rarity string
series string
set string
setCode string
retreatCost array
text array
types array
attacks array
weakness array
resistance array

Set

Parameter Type
code string
ptcgoCode string
name string
series string
totalCards int
standardLegal boolean
releaseDate string
symbolUrl string

Ability

Parameter Type
name string
text string
type string

AncientTrait

Parameter Type
name string
text string

Attack

Parameter Type
cost array
name string
text string
damage string
convertedEnergyCost int

Resistance

Parameter Type
type string
value string

Weakness

Parameter Type
type string
value string

pokemon-tcg-sdk-php's People

Contributors

adback03 avatar dynamogeek avatar kevinkoenen avatar mmonkey avatar

Watchers

 avatar

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.