Showing Posts For lynnae.4095:

HEADS UP: rate limiting is coming

in API Development

Posted by: lynnae.4095

lynnae.4095

an unintended bonus of explicit rate limiting is that I will no longer have to guess what’s a reasonable request rate. Being the mostly nice person that I am, I try to minimize my requests, however once my new backend is up and running, I’d like to make calls more often.

A rate limit helps me plan as well

HEADS UP: API temporarily down

in API Development

Posted by: lynnae.4095

lynnae.4095

That’s all UTC

(and have some extra words so the forums let me post. Hi Mom!)

HEADS UP: API temporarily down

in API Development

Posted by: lynnae.4095

lynnae.4095

hmm, here’s the list of times I’ve gotten a response since Saturday morning (hourly checks):

everything fine through 05:09 then nothing. Then sporadic successes:
2017/03/18 23:09:15
2017/03/19 06:09:15
2017/03/19 08:09:15
2017/03/19 10:09:15
2017/03/19 19:14:31 (new server, new time, one day I’ll fix that, but probably not)

I can’t see from here if those all correlate, with that much green I feel unlucky about the big break in hits today

(edited by lynnae.4095)

HEADS UP: API temporarily down

in API Development

Posted by: lynnae.4095

lynnae.4095

The trading post prices endpoint is up and down, can we PM here? I can send you the times logs of when I’ve been able to get trading post data:
https://api.guildwars2.com/v2/commerce/prices
and the associated:
https://api.guildwars2.com/v2/commerce/prices?ids=

Most recently about 30 min ago 19:14 UTC

I’m checking the data that’s been returned now, take me a couple of minutes as today I’ve been moving databases.

Data looks legit from a cursory inspection, as in it hasn’t been the same record being returned each time

(edited by lynnae.4095)

HEADS UP: API temporarily down

in API Development

Posted by: lynnae.4095

lynnae.4095

looks like, at least certain, endpoints have been up and down today. How big is the fire? ie would you appreciate it if people held off work on new features today that would hit the endpoints that seem to be up (or were up last time my services ran)

Javascript wrapper for v2

in API Development

Posted by: lynnae.4095

lynnae.4095

Everyone loves javascript!

(crickets…)

Okay, well, some people do, so I’ve heard, once.

On offer today is a wrapper for the v2 API, available at:
https://github.com/dyanarose/gw2Api.js
or via:
bower install dlr.gw2Api

A playground/test platform which will generate example wrapper code for you and make calls to the API is available at: http://dyanarose.github.io/gw2Api.js

And because wiki’s are wicked: https://github.com/dyanarose/gw2Api.js/wiki

Almost all errors are mine

API implementation library "master list"

in API Development

Posted by: lynnae.4095

lynnae.4095

New javascript implementation of all v2 api endpoints. v0.1 at the present.

authorization header and preflight requests

in API Development

Posted by: lynnae.4095

lynnae.4095

:) thanks. I’m aware.

authorization header and preflight requests

in API Development

Posted by: lynnae.4095

lynnae.4095

ta folks.

Since sending the preflight request is not something you can control when you set the Authorization header in javascript, I’ll try appending it to the query string as indicated.

ta for the tip, think this was the post that shows the query string key https://forum-en.gw2archive.eu/forum/community/api/Cross-Origin-v2-transactions

and the original dev post response that preflight requests are not supported and listing the query string workaround:
https://forum-en.gw2archive.eu/forum/community/api/Launching-v2-commerce-transactions/first#post5077482

(edited by lynnae.4095)

authorization header and preflight requests

in API Development

Posted by: lynnae.4095

lynnae.4095

using javascript XMLHttpRequest and setting the Authorization header via xhr.setRequestHeader(‘Authorization’,’Bearer ’ + token);
causes a preflight request to be sent because Authorization is considered to be a custom header.

Unfortunately the preflight request doesn’t look to be handled and Chrome reports:
XMLHttpRequest cannot load https://api.guildwars2.com/v2/account. No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Is this to be expected, and XMLHttpRequest can’t be used to access the protected resources, or do I have the wrong end of the stick for setting the bearer token? Or have the CORS headers gone walkabout?

(edited by lynnae.4095)

wiki standardization

in API Development

Posted by: lynnae.4095

lynnae.4095

going through the endpoint pages, it’s not as clear as it could be which query params each endpoint accepts.

Though many endpoints do have a “params” section, there isn’t a standard for which params are included.

For example:
https://wiki.guildwars2.com/wiki/API:2/colors only lists the “lang” param specifically, though id and ids are mentioned buried in the text.

Is there an objection to cleaning up the pages, so that the front page for API:2 lists all the common params (which look to be page and page_size) and then each endpoint page lists the params it accepts, along with whether the param is Required or Optional (and possibly mutually exclusive)

API keys are not a viable proof of identity

in API Development

Posted by: lynnae.4095

lynnae.4095

i’m more concerned about the fact that authorization (log in with gw2) is impossible.

Authentication is not possible right now. Delegated authorization is.

I think what you’re looking for is OpenIdConnect, which uses JWT tokens to build authentication using the OAuth specifications.