Giter Club home page Giter Club logo

riot-api-base's People

Stargazers

 avatar

Watchers

 avatar  avatar

riot-api-base's Issues

New Region Supports

There is quite a lot of regions missing support in this lib, some examples:

Specifically These:
Skärmavbild 2023-09-09 kl  13 13 35

Tag a new version

Hello,

The v1.1 version is not the latest with my patch inside it.
Could you please tag a new version ?

Tahnks

Asynchronous requests with v5.0

Hello, was there any change with the way asynchronous requests are done on the latest meta package?

I've recently tried migrating my project from riot-api v4.1 to riot-api-base + riot-api-league v1.0. The synchronous requests seem to work correctly, however the promise do not seem to resolve when the requests are called asynchronously.

Here's an example of code I was using with the previous version:

       // fetch an ongoing game
        $game = $api->getCurrentGameInfo($summonerId);
        $summoners = [];
        foreach ($participants as $participant) {
           // fetch the league entries for each of the games participants
            $api->nextAsync(
                function ($entryDto) use ($participant): void {
                    //on success add the participants'LP to the summoners array
                    $summoners[$participant->summonerId] = $entryDto->leaguePoints;
                },
                function (Exception $error) use ($participant): void {
                    // otherwise add null
                    $summoners[$participant->summonerId] = null;
                },
                'entries'
            )->getLeagueEntriesForSummoner($participant->summonerId);
        }
        $this->api->commitAsync('entries');

This was working fine with v4.1, but silently fails on v1.0. Any idea what the reason could be ?

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.