Skip to content

Add chat_link field to /v2/items#95

Merged
lye merged 1 commit into
masterfrom
chat-links
Sep 23, 2015
Merged

Add chat_link field to /v2/items#95
lye merged 1 commit into
masterfrom
chat-links

Conversation

@tivac
Copy link
Copy Markdown
Contributor

@tivac tivac commented Sep 18, 2015

Would also like to add to /v2/continents, /v2/skills, /v2/recipes, and /v2/traits but those don't have example files yet.

@codemasher
Copy link
Copy Markdown
Contributor

Oh, pregenerated chatcodes for the lazy - isn't that a bit over the top? :D
It'd be actually cooler if the game would fully support itemstack chatcodes (infusions are missing).

@tivac
Copy link
Copy Markdown
Contributor Author

tivac commented Sep 19, 2015

Chat codes are weird, and the less bit-fiddling people need to understand to get access to them the better.

Barking up the wrong tree for changes to game support though, sorry.

@codemasher
Copy link
Copy Markdown
Contributor

the less bit-fiddling people

There are 10 kinds of people: those who understand binary and those who don't! (€: syntax error)

(Anyway, fair enough, doesn't hurt :octocat: )

lye pushed a commit that referenced this pull request Sep 23, 2015
Add chat_link field to /v2/items
@lye lye merged commit e8e765a into master Sep 23, 2015
@lye lye removed the in progress label Sep 23, 2015
@lye
Copy link
Copy Markdown
Contributor

lye commented Sep 23, 2015

Also some other things appear to have acquired chat links.

_>

@sliekens
Copy link
Copy Markdown

Does a separate endpoint for chat links sound like a good idea?

/v2/chatlinks/:type/:id?params

Examples

  • /v2/chatlinks/items/47941 -> [&AgFFuwAA]
  • /v2/chatlinks/items/47941?suffix_item=24732 -> [&AgFFuwBAnGAAAA==]
  • /v2/chatlinks/items/47941?suffix_item=24732&skin=5730 -> [&AgFFuwDAYhYAAJxgAAA=]
  • /v2/chatlinks/items/12138?quantity=250 -> [&AvpqLwAA]
  • /v2/chatlinks/traits/223 -> [&CN8AAAA=]
  • /v2/chatlinks/coins/100 -> [&AWQAAAA=]

Considering that people still need to fiddle with bits to get any sort of customization for their chat links.

@Artanis
Copy link
Copy Markdown

Artanis commented Nov 2, 2015

@StevenLiekens This is more of a remote procedure call (RPC): you're giving the server item parameters and it does the calculating for you. There's no way this can be pre-calculated like chatlinks in the item definition; there's too many (4 billion in the coins example alone).

There's no need to have the server do that for us. If you need detailed chatlinks like this, use or write a client-side library for that purpose.

@codemasher
Copy link
Copy Markdown
Contributor

A reference on chatlink/itemstack en-/decoding would be welcome. Implementing on the other hand isn't that hard... bit-fiddling though.
https://github.com/codemasher/gw2-database/blob/master/classes/gw2api.class.php#L264

@darthmaim
Copy link
Copy Markdown
Contributor

Yep, an official reference implementation of chatlinks parsing/creating like the actual game does would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants