Coder Social home page Coder Social logo

logansua / blizzard-api-php-client Goto Github PK

View Code? Open in Web Editor NEW
29.0 9.0 13.0 150 KB

PHP API client for Blizzard API

Home Page: https://develop.battle.net/

License: MIT License

PHP 100.00%
blizzard-api php api-client world-of-warcraft blizzard blizzard-oauth battle-net battlenet starcraft2 diablo3

blizzard-api-php-client's People

Contributors

duronrulez avatar illepic avatar logansua avatar rgdeploy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blizzard-api-php-client's Issues

Update to new Blizzard API format

Blizzard has recently changed their API format - if work is already being done to transition this package to use the new format, great, if not, I'm forked and ready to start work on it.

Json mapping

  • Add mapping json result to objects

Some part of it already in feature-wow-api-mapping branch

setup

Seems to be a good work, but not everybody have access to his server.
Like me i think lots of people cant use your work because of that.
Personnaly i only have access to ftp & mysql.

Already working?

Code:

$client = new BlizzardApi\BlizzardClient('My_API_KEY');

$blizzApi = new BlizzardApi\Service\Diablo($client);
$blizzApi->getCareerProfile('MY_BATTLE_TAG'');

Expected:

Json with career data.

Got:

PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: GET https://us.api.battle.net/d3/profile/MY_BATTLE_TAG?locale=en_us&apiKey=My_API_KEY/ resulted in a 404 Not Found...

Cannot get WoW realm status

The url for this seems to be wrong:

Currently:

    public function getRealmStatus(array $options = [])
    {
        return $this->request('/realm/', $options);
    }

I believe this should be:

    public function getRealmStatus(array $options = [])
    {
        return $this->request('/realm/status', $options);
    }

I'd be happy to submit a PR once this is verified as an issue

Unable to get user data

I am trying to get user data, mainly the battletag for a single user through OAuth. I am, however, getting an error 403 from Guzzle.

My code is minimal:

$client = new BlizzardClient(config('blizzard.key'), config('blizzard.secret'), config('blizzard.region'), config('blizzard.locale'));

$auth = new CommunityOAuth($client);
$user = $auth->getUser();

return $user;

When using the tool at https://dev.battle.net/io-docs, an extra "authorization code" is needed to generate the access token, but I cannot find any reference to it here. The resulting link, here looks similar to the one provided by Blizzard, but it always results in the 403 error {"code":403, "type":"Forbidden", "detail":"Not Authorized"}.

Composer Problem

I have cpanel and cannot install composer to my account. I tried logging into SSH and everything. My bin directory is read-only.

What can I do? I don't know enough about the requirements for connecting to the blizz api but it seems like a lot of other developers are using composer for their projects.

How can I use this without composer?

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.