Question - How to expose X-pages in ESI universe/types


(seller1122) #1

Hi,

First off apologies if this is the wrong place to be asking support questions for the EVE API; if so please let me know where I should be asking !!

Second I’m more of a statistician than a developer so sorry if I just have a basic misunderstanding!

So I am trying to get a complete list of all the market type_ids and am doing so by calling on the universe/types. Unfortunately it comes in multiple pages so I had originally set a while loop to keep iterating over it until it returns blank (not the best approach I know). I have since read that there is meant to be a X-pages property in the header of the request however when I look all I see is:

`access-control-expose-headers`
[1] "Content-Type,Warning,X-Pages,X-ESI-Error-Limit-Remain,X-ESI-Error-Limit-Reset"

Doing some basic Google-ing my understanding is that this means I need to adjust the header of my request in order to get these elements returned however no matter what I’ve tried I can’t get the information to be sent to me ! I can’t tell if its an issue with my code / the software i’m using / the api itself. Any help would be appreciated. For reference my code (in R) as well as the output is below:

library(httr)
resp <- GET(
    url = "https://esi.tech.ccp.is/latest/universe/types/" , 
    add_headers(.headers = c("access-control-expose-headers"= "X-Pages"))
)
resp$request
<request>
GET https://esi.tech.ccp.is/latest/universe/types/
Output: write_memory
Options:
* useragent: libcurl/7.56.0 r-curl/3.0 httr/1.3.1
* cainfo: C:/PROGRA~1/R/R-34~1.2/etc/curl-ca-bundle.crt
* httpget: TRUE
Headers:
* Accept: application/json, text/xml, application/xml, */*
* access-control-expose-headers: X-Pages

headers(resp)

$`access-control-allow-credentials`
[1] "true"

$`access-control-allow-headers`
[1] "Content-Type,Authorization,X-User-Agent"

$`access-control-allow-methods`
[1] "GET,OPTIONS"

$`access-control-allow-origin`
[1] "*"

$`access-control-expose-headers`
[1] "Content-Type,Warning,X-Pages,X-ESI-Error-Limit-Remain,X-ESI-Error-Limit-Reset"

$`access-control-max-age`
[1] "600"
......

(Blacksmoke16) #2

This is a bug with ESI, not anything you can do to fix.


(Krysenth) #3

You would be better off using https://esi.tech.ccp.is/ui/#/Market/get_markets_region_id_types instead. This returns things actually ON the market in a given region, rather than everything (including things that may or may not even be possible to place on the market).


(system) #4

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.