These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Odd CREST facility endpoint problem (nodejs)

First post
Author
Moryg H'qarr
The Scope
Gallente Federation
#1 - 2016-01-05 19:43:36 UTC
I've been playing around with the crest and found an issue I have no idea how to resolve.
Calling the industry facilities endpoint (https://public-crest.eveonline.com/industry/facilities/) I only receive 169 stations in return (even the totalCount property claims that's all). Whereas if I call the url from a browser directly, I get 6312.

I'm completely lost on what could've gone wrong. The other things I've tested so far (systems, regions, constellations, item types, market groups) worked fine.

if it's relevant, here's what I'm using for a single request, the job.fail and jub.success are callbacks for when the request ends one way or another.

var job = {
  request: {
    hostname: 'public-crest.eveonline.com',
    path: '/industry/facilities/',
    method: 'GET'
  }
};
https.request(job.request, function (res) {
    var body = '';

    res.on('data', function (d) {
      body += d;
    });

    res.on('end', function () {
      try {
        body = JSON.parse(body);
      } catch (err) {
        job.fail(err);
        return;
      }
      job.success(body);
    });
});
CCP FoxFour
C C P
C C P Alliance
#2 - 2016-01-05 21:30:12 UTC
O_o Never seen anything like this. That is... what...

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Mister Ripley
Ministry of War
Amarr Empire
#3 - 2016-01-05 22:39:47 UTC
Maybe it's somehow related to a bug where you can see only a small amount of available stations in the industry window. It happens sometimes that it shows only 10-15 available stations although there should be 50 or so available (in range from Jita).
Relogging doesn't help. Sessions changes don't help. It just fixes itself after some time.
Zifrian
The Frog Pond
Ribbit.
#4 - 2016-01-05 23:48:09 UTC
I've had this happen from time to time. I won't get the full file to download. After I try again it works. I've never tried to run it in the browser though so not sure. I just thought it was a hiccup or something and since the cache is every 2 hours, it would remedy itself pretty fast anyway. Plus I cache all the station data anyway.

Maximze your Industry Potential! - Download EVE Isk per Hour!

Import CCP's SDE - EVE SDE Database Builder

Hel O'Ween
Men On A Mission
#5 - 2016-01-06 17:43:26 UTC

method: 'GET'


Tried it with POST?

EVEWalletAware - an offline wallet manager.

Johnny Giuliano
Doomheim
#6 - 2016-01-09 12:06:37 UTC
It is a REST API.

GET is used to fetch data, POST is to update data to the API. So what is he doing with GET is correct.
Moryg H'qarr
The Scope
Gallente Federation
#7 - 2016-01-10 13:52:24 UTC
Just wanted to do a quick update - like others have said, it worked correctly later on. Still no idea what happened.