Cross-browser current and upcoming Turf War and Ranked maps (and game type) [English]

OatmealDome

Inkling
Joined
Sep 29, 2015
Messages
2
Apparently rotation data is still being shown on SplatNet for people located outside of North America. (Ot at least that's what I think, this is my source. It would be great if someone outside North America can confirm.) Perhaps we can use an North American NNID, European NNID, and a Japanese NNID to scrape stages off SplatNet for each account? This would also give us Splatfest data for each region.
 

ParanoidDrone

Full Squid
Joined
Jan 26, 2008
Messages
42
NNID
ParanoidDrone
This is strictly an aesthetic issue, so take it or leave it as you please based on your priority list.

It looks a bit weird how the majority of map images used have ink splattered everywhere, while a few...don't. In this image, Blackbelly, Walleye, Saltspray, and Mackerel all stick out a bit compared to Urchin, Arowana, Mahi-Mahi, Triggerfish, Hammerhead, and d'Alfonsino. Compare the picture of Walleye, for instance, with this.

The images located on Inkipedia's Stages page all have ink, so that should be an easy enough source.

All that said, Splatooniverse is still fantastic and I particularly like how it lets you see the 2 upcoming rotations. Great job all around.
 

OatmealDome

Inkling
Joined
Sep 29, 2015
Messages
2
SplatNet has also exposed its own JSON endpoint, so you don't really need to go through splatoon.ink anymore.
Oh, this is interesting. (Though you still need a SplatNet login to be able to access the JSON data) I wonder if it will still keep serving stage data during Splatfest or if it will only serve Splatfest data for the user's region?
 

Pinko

Semi-Pro Squid
Joined
Jul 3, 2015
Messages
82
NNID
Pinkolol16
SplatNet has also exposed its own JSON endpoint, so you don't really need to go through splatoon.ink anymore.
No, I still have to use the websites because my account is linked to EU, and the scheduling they use is relative to France's timezone, and I live in Australia.
I almost replaced it until I realised they're using the wrong timezones.

http://prntscr.com/9bahfo eg here's Nintendo's SplatNet
http://prntscr.com/9bahl0 here's Splatooniverse when normal

which one would I prefer to use more when Nintendo is blatantly ignoring the minority.
 

MissingNumbers

Inkling Commander
Joined
May 31, 2015
Messages
472
NNID
MissingN
Switch Friend Code
SW-4262-2166-2532
No, I still have to use the websites because my account is linked to EU, and the scheduling they use is relative to France's timezone, and I live in Australia.
I almost replaced it until I realised they're using the wrong timezones.
Honestly, the time zone issue is pretty much irrelevant considering how easy it is to recall which four-hour points a rotation occurs. SplatNet is inaccurate to my time zone too, but I still prefer it to the alternatives.
 

LockeExile

Pro Squid
Joined
Aug 31, 2015
Messages
114
NNID
Locke64
Huh, SplatNet used to detect your client time zone. Maybe there was a regression. It gets mine right (PST).

Either way, Casperr can do the conversion himself, as he already does. (splatoon.ink gives the times in his own timezone, which he has to convert into yours.)
 

Pinko

Semi-Pro Squid
Joined
Jul 3, 2015
Messages
82
NNID
Pinkolol16
I need to remember specific numbers and such a schedule isn't going to work when it's locked into CET and I'm on the other side of the world.

If there was splatfest and normal data maybe it wouldn't be a problem
 

Casperr

Full Squid
Joined
Jun 5, 2015
Messages
46
SplatNet has also exposed its own JSON endpoint, so you don't really need to go through splatoon.ink anymore.
Unfortunately the end point requires the requester to be logged in. As I would have to get this remotely (i.e. the web server requests it), I honestly wouldn't know where to start! If you, or anyone else reading this, can advise me on logging into NNID via the webserver so the SplatNet endpoint is authorized for the requesting server I would be very grateful and I am happy to look into it! (PHP btw)

...
The images located on Inkipedia's Stages page all have ink, so that should be an easy enough source.
...
Totally valid point! I will update with those images as soon as I can :)

To everyone else - my site should be doing the time zones perfectly assuming the time on your computer is correct (and not being otherwise manipulated by your browser). If anyone sees otherwise, please let me know!

With regards to showing both Splatfest and normal rotation for other regions, it's theoretically possible, but I would need a reliable feed from each region. At the moment, assuming I can't set up a login to SplatNet from my server as detailed above, the only reliable feed is from Splatoon.ink so I only show whatever they decide to show. Whoever is behind Splatoon.ink seems to know what they're doing so maybe they will update their own feed and I can then use the data there - who knows!
 

LockeExile

Pro Squid
Joined
Aug 31, 2015
Messages
114
NNID
Locke64
Unfortunately the end point requires the requester to be logged in. As I would have to get this remotely (i.e. the web server requests it), I honestly wouldn't know where to start! If you, or anyone else reading this, can advise me on logging into NNID via the webserver so the SplatNet endpoint is authorized for the requesting server I would be very grateful and I am happy to look into it! (PHP btw)
It's just a simple oauth call to get a token. Here's an example in python

Code:
MIIVERSE_CALLBACK_URL = "https://miiverse.nintendo.net/auth/callback"
NINTENDO_LOGIN_PAGE = "https://id.nintendo.net/oauth/authorize"

    def get_new_miiverse_cookie(self):
        parameters = {'client_id': 'ead88d8d450f40ada5682060a8885ec0',
                      'response_type': 'code',
                      'redirect_uri': MIIVERSE_CALLBACK_URL,
                      'username': config['Miiverse']['username'],
                      'password': config['Passwords']['miiverse']}
        self.logger.debug("Parameters: " + str(parameters))
        # For some reason the nintendo id certificate fails now
        # It works fine in my browser but python and curl don't like it
        # I'll bypass the verification for now
        req = requests.post(NINTENDO_LOGIN_PAGE, data=parameters, verify=False)
        if len(req.history) < 2:
            self.logger.debug("Page: " + req.text)
            raise Exception("Couldn't retrieve miiverse cookie.")
        miiverse_cookie = req.history[1].cookies.get('ms')
        if miiverse_cookie is None:
            self.logger.debug("Page: " + req.text)
            self.logger.debug("History: ".join(req.history))
            raise Exception("Couldn't retrieve miiverse cookie.")
        return miiverse_cookie
I adapted that to C# for my own project, using the splatnet callback:

Code:
            HttpClient client = new HttpClient();
            client.BaseAddress = new Uri("https://id.nintendo.net/oauth/authorize");
            var values = new Dictionary<string, string>
            {
                { "client_id", "12af3d0a3a1f441eb900411bb50a835a" },
                { "response_type", "code" },
                { "redirect_uri", "https://splatoon.nintendo.net/users/auth/nintendo/callback" },
                { "username", Username },
                { "password", Password }
            };
            var content = new FormUrlEncodedContent(values);
            HttpResponseMessage response = client.PostAsync("", content).Result;
From there you should be able to capture the cookie and use that in your request to the schedule api. Should be easy enough to do in PHP.
 

Tama-kun

Inkling
Joined
Nov 18, 2015
Messages
5
NNID
Tama-kun89
never mind what i thought about is just not working
 
Last edited:

PommePatate

Inkling
Joined
Apr 14, 2015
Messages
5
I've created my own API for a new project because I've requested an EU feed for ages, and I needed more flexibility but whatever. Names are in Japanese to not be bothered by symbols like - or ' so you can easily make a parsing function to get the correct names on your end.

It handles Splatfest and I uploaded an example file so you can code without waiting for one.

You can use it, but go easy on the requests or try to cache on your end and only request when you need because it's only a VPS and I don't know if it can handle a lot of traffic.
Here is the Github if you want to host it yourself.

Also it fetches from SplatNet at 1min30, 2min30 and 3min30 (just in case) of the rotation hour, so your best bet is to fetch my json at 3min after rotation hour.
I tried to code a system to make a GET request, get the Etag header on Nintendo side, write the Etag in a file, make a request every 15 seconds to check if the Etag changed and then write the file, but since I never coded in Python I was not able to do it.
 

Casperr

Full Squid
Joined
Jun 5, 2015
Messages
46
I've created my own API for a new project because I've requested an EU feed for ages, and I needed more flexibility but whatever. Names are in Japanese to not be bothered by symbols like - or ' so you can easily make a parsing function to get the correct names on your end.

It handles Splatfest and I uploaded an example file so you can code without waiting for one.

You can use it, but go easy on the requests or try to cache on your end and only request when you need because it's only a VPS and I don't know if it can handle a lot of traffic.
Here is the Github if you want to host it yourself.

Also it fetches from SplatNet at 1min30, 2min30 and 3min30 (just in case) of the rotation hour, so your best bet is to fetch my json at 3min after rotation hour.
I tried to code a system to make a GET request, get the Etag header on Nintendo side, write the Etag in a file, make a request every 15 seconds to check if the Etag changed and then write the file, but since I never coded in Python I was not able to do it.
Hey dude what you've put together looks awesome! Are you going to be manually updating your _wag_session credentials every time your cookie expires or have you set up a way to automate the oauth?

I would love to use this, but for whatever reason the maps aren't coming through as Japanese characters for me, but random European characters e.g.
ヒラメが丘団地
Is this something to do with character encoding?

I'll almost definitely try at set something up with this. Most days I'm getting 1000 - 1500 sessions a day, all of which are hitting the API. I can set up caching and a CRON job pretty easily if you'd rather not get all those hits to your server so just let me know. Awesome work dude!
 

Rei Keima

Inkling
Joined
May 27, 2015
Messages
6
NNID
ReiKeima
I would love to use this, but for whatever reason the maps aren't coming through as Japanese characters for me, but random European characters e.g.
ヒラメが丘団地
Is this something to do with character encoding?
I can say that when the json string is accessed from the application, and not via web browser, it does appear in Japanese.

Here's the output for the current stages from splatapi.ovh/schedule_eu.json from my bot running on a Pokemon battle simulator:

 
Last edited:

PommePatate

Inkling
Joined
Apr 14, 2015
Messages
5
Hey dude what you've put together looks awesome! Are you going to be manually updating your _wag_session credentials every time your cookie expires or have you set up a way to automate the oauth?

I would love to use this, but for whatever reason the maps aren't coming through as Japanese characters for me, but random European characters e.g.
ヒラメが丘団地
Is this something to do with character encoding?

I'll almost definitely try at set something up with this. Most days I'm getting 1000 - 1500 sessions a day, all of which are hitting the API. I can set up caching and a CRON job pretty easily if you'd rather not get all those hits to your server so just let me know. Awesome work dude!
I had the same problem. File is UTF-8 but that's just Chrome being dumb if you're using it. Select automatic detection and it should be fine. but the apps displays the correct Japanese strings.
Thank you! Yes, I'd love if you could take the traffic on your end and get a cron running at like 4min after the rotation. I'm using a new auth method by making a POST request to get the _wag_session for the 3 accounts instead of doing it manually, because it didn't registered the current US Splatfest. So it takes a little longer and I have to start the fetching late because SplatNet update schedule is too unreliable. Sometimes it updates at 1:20, sometimes at 2:15...
 

Casperr

Full Squid
Joined
Jun 5, 2015
Messages
46
I had the same problem. File is UTF-8 but that's just Chrome being dumb if you're using it. Select automatic detection and it should be fine. but the apps displays the correct Japanese strings.
Thank you! Yes, I'd love if you could take the traffic on your end and get a cron running at like 4min after the rotation. I'm using a new auth method by making a POST request to get the _wag_session for the 3 accounts instead of doing it manually, because it didn't registered the current US Splatfest. So it takes a little longer and I have to start the fetching late because SplatNet update schedule is too unreliable. Sometimes it updates at 1:20, sometimes at 2:15...
That's excellent - silly me I should have realised it was Chrome! Do you plan to ever have it output the English names/support for both languages in a similar way to Splatoon.ink? Just so I know how safe it is for me to put in my own translations referencing the nodes you're using.

BTW if you'd ever like help from me on anything please just let me know, although looks like you've got things figured out pretty good :)
 

PommePatate

Inkling
Joined
Apr 14, 2015
Messages
5
Nope I don't plan to serve EN strings, mainly because I don't know how to do multi requests and appending to a json from two different requests in Python. Plus, people can easily implement a parsing function like this (1) (2) to serve the correct language for their apps, and it's more flexible if you want to do multi lang support.

What I'd like to improve is the fetching time. I need to find a way to check the server better to get the json as soon as it's available on Nintendo's ends. That way, It updates for users sooner.
 
Last edited:

Casperr

Full Squid
Joined
Jun 5, 2015
Messages
46
When did this happen? How did people find it? Is there API documentation anywhere?
TBH I think it's what they just use internally as it's pretty easy to find if you know where to look in the JS for it. I don't think it's an official API as such and as you have to create your own custom OAuth (NNID login public API does not yet exist) then I can only assume they have no interest in helping third parties use it. Essentially the endpoint just exists because it's the easiest way for them to AJAX call their own server! That's my understanding, at least
 

boredguy108

Semi-Pro Squid
Joined
Aug 23, 2015
Messages
96
Location
California
So recently, whenever I load up Splatooniverse, it only shows 2 map rotations (current and the next one), instead of 3 (current and the next 2). Was this an Intentional change?

In the case that it wasn't here's a list of things I've done:
  • Cleared cookies
  • Refreshed the page
  • Swapped browsers (Chrome, Firefox, Internet Explorer, and Maxthon)
  • Restarted my computer
  • Loaded Splatooniverse on different devices (Phone and PC)
I'm not sure if it's something on my end, so if anybody can load up the site and confirm (or deny) these issues, that'll be helpful.

Edit: Seems like the problem is gone now. Site is working fine.
 
Last edited:

Users who are viewing this thread

Top Bottom