Bungie-net / api

Resources for the Bungie.net API
Other
1.22k stars 92 forks source link

Include Heroic Modifiers in API call for milestones #473

Open mistahj67 opened 6 years ago

mistahj67 commented 6 years ago

I've looked but haven't seen a way to determine the heroic strike modifiers via API, perhaps adding it to the milestone for heroic strikes similar to the nf milestone?

vthornheart-bng commented 6 years ago

Yes, I'd like to add this to the API, we indeed are currently missing this!

vthornheart-bng commented 6 years ago

TFS 654337

ghost commented 6 years ago

Since these are rotating daily, just like with #432, I'd love a way that is not tied to an active Milestone so that I can keep getting the modifiers each day, regardless of Milestone completion.

lowlines commented 6 years ago

Adding to this, it'd be neat if you could record what strike modifiers were active in the PGCR. ie What nodes and level handicap they used on the Nightfall Card so you could get stats on strats and builds ppl are using to run the NF or what days ppl love/hate running heroic strikes cos of the modifiers of that day.

michabbb commented 6 years ago

to be clear: so right now there is not chance to get the heroic strike playlist modifiers anywhere, correct ?

littleben4242 commented 6 years ago

This would be helpful. Many folks in my clan would use this information to play their heroic strikes for the day.

ghost commented 6 years ago

@michabbb There is a way - it's the same as getting the daily challenges. See #432, parse the output of https://www.bungie.net/en/Explore/Detail/DestinyActivityDefinition/<activityid>. It will list challenges, and, if applicable, modifiers. For the heroic strikes, check https://www.bungie.net/en/Explore/Detail/DestinyActivityDefinition/4052671056

Parsing the website obviously isn't the perfect (or even a good) way, but it works as a basic workaround until proper ways to get Challenges & Modifiers are supported.

michabbb commented 6 years ago

@ttgmpsn many thanks! not optimal of course, but better than nothing ;)

michabbb commented 6 years ago

@vthornheart-bng don´t know where´s the right place to report this, but using this website would be much easiert, if

there wouldn´t be so many timeouts if you open that page in a different language (like de)

26-05-2018-01-19-01

and if the rewards would be displayed correctly ;)

26-05-2018-01-19-48

michabbb commented 6 years ago

for people using PHP

in case someone might think it´s helpful, with the help of this package, you can do this:

BUNGIE_WEBSITE_URL_STRIKE_PLAYLIST='https://www.bungie.net/en/Explore/Detail/DestinyActivityDefinition/4052671056'
BUNGIE_WEBSITE='https://www.bungie.net'
$dom = new Dom;
        $dom->loadFromUrl(getenv('BUNGIE_WEBSITE_URL_STRIKE_PLAYLIST'),[
            'removeScripts' => true,
            'removeStyles' => true,
            'preserveLineBreaks' => true
        ]);
        $contents = $dom->find('.grid-col-12-mobile');
        /** @var Dom\HtmlNode $content */
        foreach ($contents as $content) {
            if ($content->find('h3')->innerhtml==='Modifiers') {
                $modifiers = $content->find('.two-line-item-modifier-information');
                /** @var Dom\HtmlNode $modifier */
                foreach ($modifiers as $modifier) {
                    $icon = $modifier->find('.icon')->getAttribute('style');
                    $icon = strstr($icon,'?',true); //remove params from url
                    $icon = getenv('BUNGIE_WEBSITE').substr($icon, strpos($icon, "'") + 1); //remove css
                    echo $icon."\n";
                    echo $modifier->find('.title')->innerhtml."\n";
                    echo $modifier->find('.subtitle')->innerhtml."\n";
                }
            }
        }
michabbb commented 6 years ago

@vthornheart-bng omg... after the patch.... the last source of getting modifiers is broken, too ;-((

30-05-2018-10-59-59

well done bungie 🤔

floatingatoll commented 6 years ago

This a good bug to report, but please don’t be mean to Bungie. They work incredibly hard on all of this for us and there’s only two or three of them total for an API that they don’t have to offer us at all.

Where does this screenshot originate - viewing PGCRs on the web, or in an official companion app, or elsewhere?

On May 30, 2018, at 14:00, Michael Bladowski notifications@github.com wrote:

@vthornheart-bng omg... after the patch.... the last source of getting modifiers is broken, too ;-((

well done bungie 🤔

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

michabbb commented 6 years ago

@floatingatoll I don't want to be mean and I guess the people who are responsible for the website are not the same as for the api. The api people here are great, no question! So my frustration is not directed to the nice and helpful api guys here, but I cannot hide the frustration anyway, sorry. As things are not available via api you build workarounds and after the next patch, exact this workaround is no longer working, I pretty sure this is understandable.

So about your question, the question where this Screenshot is from, read the last postings in this issue, it's all about the same page which was mentioned to be used as the workaround.

michabbb commented 6 years ago

and there is a workaround for the workaround 🙈

in case someone wants to use it, i made myself a json (from the xls), sorry, it´s german.