This project is read-only.
1

Closed

Special case: /v2/commerce/exchange

description

The Exchange endpoint is annoying, because it doesn't follow the same URL syntax.

Most importantly, the Exchange endpoint does not support the "id" parameter.

This works:
https://api.guildwars2.com/v2/commerce/exchange/gems?quantity=100

This doesn't work:
https://api.guildwars2.com/v2/commerce/exchange?id=gems&quantity=100

I tried to fit this endpoint in with the rest of the endpoints, but clearly this is a special case that requires custom code.

TODO: create custom request classes for just this endpoint.

This issue is a blocking issue for a related issue: https://gw2dotnet.codeplex.com/workitem/1340
Closed May 28, 2015 at 12:59 PM by

comments

StevenLiekens wrote May 27, 2015 at 10:42 PM

The interface will be dumbed down to just this:

````C# /// Provides the interface for services that trade gems for coins. public interface ICurrencyExchange { Exchange GetCoins(int gems);
    Exchange GetGems(int coins);    }````
Where Exchange is an object that wraps the transaction details plus a timestamp.