Code Monkey home page Code Monkey logo

api-cdi's Introduction

api-cdi

Collaborative Development Initiative for Public APIs

The contents of this repo are a spec that lays out the current live Guild Wars 2 API.


See the pull requests for the current list of proposals. Pull requests that are merged are considered part of the live API.

Philosophical discussions should happen over in the forums.

We also have gitter set up for semi-synchronous communication, and a waffle board to help track issues.

api-cdi's People

Contributors

apoch avatar archomeda avatar bherbst avatar bryghtshadow avatar chalyflavour avatar codemasher avatar darthmaim avatar degger80 avatar eearslya avatar fishrock123 avatar gitter-badger avatar nightlark avatar prademix avatar queicherius avatar redglow avatar rikkuness avatar ruhrpottpatriot avatar samhurne avatar themrmilchmann avatar tivac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-cdi's Issues

Nested permissions

Yesterday I noted with delight that under the endpoint "/account" the last point is output fractal_level.

Unfortunately, however, only if the API key is authorized progression.

Is there a reason for this?

It is also extremely annoying from my guild members repeatedly demand new API key because the permissions are changed or get worse.

I do not believe that there is a solution that makes the extension of the existing API keys possible, right?

greeting

Markus

Creating an API key in the Baidu Browser fails

One of my users was unable to create an API key, which i found to be caused due to his use of the Baidu Browser.

It seems that when using the Baidu Browser, the request made when trying to create an API key is malformed.

I am not sure which side this problem is at, but i looked at the request in Fiddler and found that the Content-Type is set to application/x-www-form-urlencoded instead of application/json; charset=UTF-8 (as with chrome), changing this and replaying the request created the API key successfully

Idk how many even use that browser, just figured i would report it

Broken Markup on german Authorization Page

The german /oauth2/authorization page has broken html markup:

<p>
    Die App <a href="http://gw2treasures.local/“>#TEST# GW2Treasures</a> möchte auf deinen
    <i>Guild Wars 2</i> Account zugreifen.<br>Wenn du den Zugriff gestattest,
    hat sie zu Folgendem ausschließlich Lesezugriff:
</p>

Notice the wrong quotation mark in the href.

Broken:
authorize_de_small
Working:
authorize_en_small

/v2/characters/*** bug

I'm getting this error.

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error code="48" module="3" line="389" text="callback (): Error: inventory not emptied! sparsify failure [{"id":21043,"slot":257,"count":1,"binding":"Character"},{"id":8941,"slot":265,"count":1},{"id":23031,"slot":266,"count":1},{"id":15188,"slot":269,"count":1},{"id":19980,"slot":270,"count":1},{"id":24581,"slot":277,"count":1},{"id":23038,"slot":279,"count":1},{"id":20316,"slot":283,"count":1},{"id":20686,"slot":318,"count":1},{"id":13858,"slot":322,"count":1},{"id":28608,"slot":323,"count":1,"upgrades":[24557]},{"id":38132,"slot":338,"count":2},{"id":38209,"slot":344,"count":1}] Error: inventory not emptied! sparsify failure [{"id":21043,"slot":257,"count":1,"binding":"Character"},{"id":8941,"slot":265,"count":1},{"id":23031,"slot":266,"count":1},{"id":15188,"slot":269,"count":1},{"id":19980,"slot":270,"count":1},{"id":24581,"slot":277,"count":1},{"id":23038,"slot":279,"count":1},{"id":20316,"slot":283,"count":1},{"id":20686,"slot":318,"count":1},{"id":13858,"slot":322,"count":1},{"id":28608,"slot":323,"count":1,"upgrades":[24557]},{"id":38132,"slot":338,"count":2},{"id":38209,"slot":344,"count":1}] at c:\arenanet\lliveweb.327\web\js2api\code\v2\controllers\account\characters.js:123:23 at c:\arenanet\lliveweb.327\web\js2api\node_modules\async\lib\async.js:52:16 at c:\arenanet\lliveweb.327\web\js2api\node_modules\async\lib\async.js:363:13 at c:\arenanet\lliveweb.327\web\js2api\node_modules\async\lib\async.js:52:16 at done (c:\arenanet\lliveweb.327\web\js2api\node_modules\async\lib\async.js:248:21) at c:\arenanet\lliveweb.327\web\js2api\node_modules\async\lib\async.js:44:16 at c:\arenanet\lliveweb.327\web\js2api\node_modules\async\lib\async.js:360:17 at c:\arenanet\lliveweb.327\web\js2api\code\v2\controllers\account\characters.js:58:24 at c:\arenanet\lliveweb.327\web\js2api\code\v2\lib\memoize.js:34:24 at c:\arenanet\lliveweb.327\web\jssrv2\code\caches\remote.js:88:13"/>

Ruins not coming through correctly in /v2/wvw/objectives

The ruin objectives do not appear to be coming through correctly in the objectives endpoint.

When I hit https://api.guildwars2.com/v2/wvw/objectives?page=0&page_size=200, I see five copies of the same objective for each map, each with different IDs but the same name and coordinates.

For example, there are five ruins objectives for "RedHome" that are each called "Demontrance Lake" and have the same coordinates in the middle of the lake, but they have different IDs.

Call an Endpoint delete Api-Key & no new Key could be created

Hello There,

I was able to verify with some keys:
Once an endpoint key is called, the key is deleted and it can't also create a new key.

Please check and resolve urgently, otherwise the whole API is likely to be obsolete.

Best Regards

Markus / Plitzz

broken trait ids in /v2/traits

Hi all,

Found at least one broken traits id in the traits api.

ID 14 / Revenant Trait

Character has currently this id in the spezalizations array, but is not in the traits api.

cheers

/v2/wvw/objectives for Desert Borderlands

Would it be possible to get a peek at the data from the /v2/wvw/objectives endpoint for the new Desert Borderlands map before Heart of Thorns launches? The application I'm maintaining requires hard-coded position mappings that can't be pulled directly from the API, so it'd be awesome to get a look at the objective IDs and positions so I can update the application before Heart of Thorns launches.

Access authorization on each "authorize" call

I'm developing a social login for gw2spidy on the base of the OAuth2 and I noticed something strange: Every time I log in with GW2, I get asked to authorize my app. Shouldn't the authorization get remembered or am I understanding something wrong about the process?

/v2/quaggans does not return X-Result-Total

Example request: https://api.guildwars2.com/v2/quaggans?ids=summer,vacation

Actual response headers

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Encoding: gzip
Content-Language: en
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Result-Count: 2
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
Date: Tue, 03 Mar 2015 19:12:37 GMT
Content-Length: 107

Expected response headers

HTTP/1.1 200 OK
...
X-Result-Count: 2
X-Result-Total: 35

Add cache expiration headers

As per this thread, it would be useful if we added the configured per-endpoint cache times in the appropriate headers (currently we return no cache directives, iirc).

Add Population to /v2/worlds

Hello everybody,

after limiting the server population, perhaps there is the possibility that the population and the state of the server or a message if you can switch to the server to issue the API?

greeting

Plitzz

Missing "name" from /v2/tokeninfo

I just ran into a weird bug with an API key a user tried to register in my app, turns out if you create/edit an API with an empty name, the "name" field is missing from /v2/tokeninfo. I think the endpoint used to return an empty string some time ago. Didn't expect the name to be missing and it broke my app.

Probably would be good to add validation to prevent users from creating new keys with empty names.

Example: https://api.guildwars2.com/v2/tokeninfo?access_token=9058814E-A18F-DD4C-BBD7-73DE23ECDB6FF2913C7C-0406-447C-B0FB-92FBE16ADD87

{
  "id": "9058814E-A18F-DD4C-BBD7-73DE23ECDB6F",
  "permissions": [
    "account"
  ]
}

Non-default cache times broken

Endpoints that have non-default cache timings (i.e. /v2/commerce/listings and /v2/commerce/transactions) are incorrectly using the default five minute cache ttls.

Requesting a resource with an unknown identifier results in incorrect HTTP result status code

Example requests with unknown IDs:

When requesting these "resources" the server sends back a HTTP status code 400.
Status Code 400 is defined as:
http://tools.ietf.org/html/rfc2616#section-10.4.1
"The request could not be understood by the server due to malformed
syntax. The client SHOULD NOT repeat the request without
modifications."

Since the requests are not malformed, but the resource is unknown, the server should respond with a 404 status code (or a 410 if the resource has been available before).

WvW Objective Upgrade Status

Hello,

Would it be possible to get the upgrade status (tier 0/1/2/3) of objectives in WvW (as part of /v2/wvw/matches)? The upgrades are based on timers now, so they can be loosely calculated based on time captured, but they're also affected by incoming dolyaks, which reduce the timer. So it'd be useful to get the definite status from the API.

It would also be helpful to get the estimated time of the next upgrade (which would be updated as dolyaks come in), if it's possible.

Something like this:

"objectives":[
    {
        "id": "1099-99",
        "type": "Camp",
        "owner": "Red",
        "last_flipped": "2015-11-20T02:51:21Z",
        "claimed_by": "07605FAA-7629-482E-B4AC-4AE673EC0ECE",
        "claimed_at": "2015-11-20T04:19:01Z",
        "upgrades": 0, // or "None"
        "next_upgrade_at": "2015-11-20T03:21:21Z"
    },
    {
        "id": "1099-100",
        "type": "Camp",
        "owner": "Blue",
        "last_flipped": "2015-11-20T04:23:04Z",
        "claimed_by": null,
        "claimed_at": null,
        "upgrades": 3, // or "Tier3" or something
        "next_upgrade_at": null
    },
    ...
]

Thanks!

/v2/character profession typo

Typo for “Jeweler” discipline in character data. “Jewler”, missing an ‘e’.

{"discipline" : “Jewler” , “rating” : 400 , “active” : true}

ErrBadData on /v2/account and /v2/characters endpoints for some apikeys

Hi,

i got several api keys from an account that only generates keys with the following property:

/v2/tokeninfo tells me those keys got all eight availible permissions, but the following api endpoints return a HTTP 400 with text "ErrBadData":

  • /v2/account/bank,
  • /v2/characters,
  • /v2/account,
  • /v2/account/wallet

i assume it has something to do with the account moving from EU to NA about three days ago, as most the information that is shared between EU and NA anyways works well. This means i get a HTTP 200 and useful data from the following api endpoints:

  • /v2/commerce/transactions,
  • /v2/pvp,
  • /v2/tokeninfo
  • /v2/skins

This happens to all the keys generated by that account (the account is not not mine, i just happened to experiment with the api keys).

i'm 100% sure i use the api correctly as the very same script works with other api keys. its just that single account that causes bugs..

i kind of don't want to publish any information about the account without the owner agreeing so ill eventually add his info later once he confirms.
It would be nice to see a confirmation of the devs if this is a known bug as i was not able to find anything related.

PS: Great work, the game is amazing and with the API i get an even more detailed view of it :)

Missing endpoints in endpoint list

/v2/specializations on https://api.guildwars2.com/v2 is missing, /v2/characters/:id/equipment and /v2/characters/:id/inventory are also still marked as disabled, and even though /v2/traits-beta is just a beta, it should probably also be there (or at least the disabled /v2/traits).

I guess that is still this (source):

[...] there's a bug in the API enumeration that incorrectly and unconditionally lists the characters inventory/equipment endpoints as disabled. We'll look to fix that at some point in the future so it shows the status of those endpoints properly.

Extension of the API Key Permissions

It would be helpful if you could its API Keys not only renaming, but also provided with additional rights.
The description also reads:

Editing API key

Enter a name, description, and permissions for this key. The fields for the name and description are for your personal use. Permissions determine which functions are made possible by using this key. Once the key has been created, you can not change the permissions.

The secrets of rendering guild emblems

So there's the v1/guild_details API that enables us to render guild emblems on the fly - the question still is: how?
The results have been mediocre at best (chance hit) because none of us knows the secrets of postprocessing these images.

So would it be possible for you to give us an example how to properly render guild emblems?
(preferably in a language thats read- and/or usable for most of us (PHP! :P)
The example above has been created by this cheap examply example code.

See also this thread: https://forum-en.guildwars2.com/forum/community/api/API-Suggestion-Guilds/page/2#post2155863

Attribute names in /v2/items

The new attributes Concentration and Expertise are being returned on the items endpoint attributes and buff as BoonDuration and ConditionDuration, the same as actual Boon Duration and Condition Duration. Luckily, on equipment (weapons/armor/trinkets/back) they can be distinguished because Concentration/Expertise actually show up in attributes, whereas Boon/Condition Duration only show up in buff.

However, upgrade components only have a buff, so we have to look to see if the number has a percent sign or not before we can translate Boon/ConditionDuration to Concentration/Expertise.

Is there any way these attribute names can be updated?

PS: the attribute Ferocity is still being returned as CritDamage, although this isn't a major problem because it doesn't create any conflicts.

/v2/characters list of bags no null entries after last bag

My interpretation of characters.js is that the ''bags'' list will always have the size of that character's count of unlocked slots. The example shows a null entry after the last bag, however the API currently does not contain null objects after the last bag object in the list.

Example for a character with 5 bag slots unlocked:

Bags in slot 0 and 1:

{
  ...
  "bags": [
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    },
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    }
  ]
}

Bags in slot 0 and 2:

{
  ...
  "bags": [
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    },
    null,
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    }
  ]
}

Bags in slot 0 and 4:

{
  ...
  "bags": [
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    },
    null,
    null,
    null,
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    }
  ]
}

For fun, bags in slot 1 and 3:

{
  ...
  "bags": [
    null,
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    },
    null,
    {
      "id": 8941,
      "size": 4
      "inventory": [ null, null, null, null ]
    }
  ]
}

Mumble Link tick rate and concurrent access

I'd like to know how often the game client dumps its state to the Mumble Link shared memory block. I measured it to be around every 30 ms, but I'd like an official statement.

I'm asking because we're seeing cases where the update happens as we're trying to read from the memory block. In very exceptional cases, we end up reading a partially updated json string that crashes our json deserializer.

Would it be possible to update the game client so that it uses a named mutex object?

Then we can update our code to use the same named mutex for synchronization.

Support empty parameters

I think that bulk expanded endpoints are broken in the sense that an empty ids parameter is treated as if there was no query string at all.

An example...

https://api.guildwars2.com/v2/items?ids=

Is treated the same as...

https://api.guildwars2.com/v2/items

When I visit that first URL, I would expect one of two things:

  • An error response, content set to {"text":"no ids provided"}
  • A success response, content set to []

Instead, the API returns an array of numeric values, when my program is expecting an array of objects.

Include auth and/or permission scope notes in /v2

Currently, https://api.guildwars2.com/v2 looks like this:

The following paths are exposed by this API:
  /v2/account
  /v2/account/bank
  /v2/account/dyes [d]
  /v2/account/materials
  /v2/account/skins [d]
  /v2/build
  /v2/characters
  /v2/characters/:id/equipment
  /v2/characters/:id/inventory
  /v2/colors [l]
  /v2/commerce/exchange
  /v2/commerce/listings
  /v2/commerce/prices
  /v2/commerce/transactions
  /v2/continents [l]
  /v2/events [l,d]
  /v2/events-state [d]
  /v2/files
  /v2/guild/:id [d]
  /v2/guild/:id/inventory [d]
  /v2/guild/:id/log [d]
  /v2/guild/:id/members [d]
  /v2/guild/:id/ranks [d]
  /v2/guild/permissions [l,d]
  /v2/guild/upgrades [l,d]
  /v2/items [l]
  /v2/leaderboards [d]
  /v2/maps [l]
  /v2/materials [l]
  /v2/quaggans
  /v2/recipes
  /v2/recipes/search
  /v2/skills [d]
  /v2/skins [l]
  /v2/specializations
  /v2/tokeninfo
  /v2/traits [d]
  /v2/traits-beta
  /v2/worlds [l]
  /v2/wvw/matches [d]
  /v2/wvw/objectives [l,d]

Key:
  l : locale aware (via ?lang=<langId>)
  d : currently disabled

As the list expands over time, and more permission scopes are being added, I think it would be nice to include notes about the permissions in the long list of endpoints. Maybe something like the following?

The following paths are exposed by this API:
  /v2/account [+]
  /v2/account/bank [+i]
  /v2/account/dyes [d,+]
  /v2/account/materials [+i]
  /v2/account/skins [d,+]
  /v2/build
  /v2/characters [+c]
  /v2/characters/:id/equipment [+c]
  /v2/characters/:id/inventory [+ci]
  /v2/colors [l]
  /v2/commerce/exchange
  /v2/commerce/listings
  /v2/commerce/prices
  /v2/commerce/transactions [+t]
  /v2/continents [l]
  /v2/events [l,d]
  /v2/events-state [d]
  /v2/files
  /v2/guild/:id [d]
  /v2/guild/:id/inventory [d,+]
  /v2/guild/:id/log [d,+]
  /v2/guild/:id/members [d,+]
  /v2/guild/:id/ranks [d,+]
  /v2/guild/permissions [l,d]
  /v2/guild/upgrades [l,d]
  /v2/items [l]
  /v2/leaderboards [d]
  /v2/maps [l]
  /v2/materials [l]
  /v2/quaggans
  /v2/recipes
  /v2/recipes/search
  /v2/skills [d]
  /v2/skins [l]
  /v2/specializations
  /v2/tokeninfo
  /v2/traits [d]
  /v2/traits-beta
  /v2/worlds [l]
  /v2/wvw/matches [d]
  /v2/wvw/objectives [l,d]

Key:
  l : locale aware (via ?lang=<langId>)
  d : currently disabled
  +: authenticated endpoint (requires default account permission)
  +c: requires additional character permission
  +i: requires additional inventory permission
  +t: requires additional tradingpost permission

I haven't checked if everything is correct, and I don't know how the guild endpoint is going to be set up. But I'm sure that you get what I mean. To me, it should be obvious what's an authenticated endpoint and which permission(s) it requires.

For the rest, keep going! The API looks great already! 😄

Map Tiles Are Out of Date

Is there any chance we can get some updates map tiles for the Tile API?

It still doesn't have the updates Lion's Arch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.