Showing Posts For DarkSpirit.7046:

API Development Plans

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

This is a REST~ful Web API, you don’t need to worry, it’s not the same type of API. Apples and oranges.

Apples and oranges are still fruits and therefore can be compared pretty easy :P
And Even with a web api I can create such things as Damage Meters via the use of overlays (yeah I know a cannon for shooting birds, but still).

What I meant to say: Anet should keep the possibilities to the bare necessity, things like buying and selling via the API should not be possible (apart from the security issues of course).

Assuming that Anet would do a good job on securing the api, as a user, I would prefer to be able to buy and sell from my mobile device than not, so it is a matter of wanting to give your users the best possible app experience or not.

There is a paradigm shift when it comes to mobile apps versus PC apps because your users are not going to be able to login immediately, when the trading price is right, as he could be anywhere.

(edited by DarkSpirit.7046)

I got a Trojan

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

It’s always easy to say: hey, it’s open source, just go and read the code.
We both know that an average user of such a program won’t ever read the source because he won’t understand it anyway – he just downloads and executes it and the damage is done.

Then an average user shouldn’t be downloading EXE binaries from an untrusted source in the first place. If the user still chooses to take the risk then that becomes his responsibility.

(edited by DarkSpirit.7046)

[API Suggestion] Events

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

For web services like these, sorted list from the server would be useful if the number of items in the list can change between calls very often. For example, the number of items in a search query from the Trading Post can change at anytime. The TP client can do all the sorting, but that would mean:

1. Getting the entire list from the server first (some performance hit) instead of a partial list (typically done if the list is long).
2. Sort the list
3. Keep the list static as the user navigates between pages of your search result.

All that time, the number of items in that list could have changed, or their prices could have changed, etc while the user is looking through it. This is the price to pay for a client-sorted list. But if the list is quite static, then client-sorted is fine and we save some server resources.

Currently, with the simple data and short list from events.json, I don’t think we need any sorting from the server, but feel free to disagree.

(edited by DarkSpirit.7046)

Mapping the API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Here is an obvious question: Shouldn’t this documentation be provided by ArenaNet for the usage of their api?

I’d be inclined to agree with you. Seems a little odd to just toss it out there without providing some

Doesn’t seem odd to me. They’re just testing the waters, and this is what they got. They just throw it out there and see what we do with it, spending the time on readying new shinies for us.

Documenting would be something to do once the stuff is out there proper and more or less stable. We’ve got smart guys here, we can figure it out :P Maybe that’s what they’re counting on, hoping it’s well documented on the wikis by the community before they have to even lift a finger

The problem with that is the risk of breakage of apps that are written against the api. And the developers may not even know about it beforehand. What if they remove/rename/add some fields in the next game update? How easy it is to track the changes?

Granted that this is still beta and subject to change but I would expect no less from ArenaNet after release. All these should be properly managed in an officially released api by ArenaNet, at least that would be the expectation from a professional developer.

Preferably, they should at least document the expected enums now so we can help them review them at this stage. Reverse engineering the specs from the data can give wrong results. For example, maybe some of the flags are missing from their items. We know that legendary is missing but we may not know all the flags or some other fields that are suppose to be there but are not.

(edited by DarkSpirit.7046)

Mapping the API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Here is an obvious question: Shouldn’t this documentation be provided by ArenaNet for the usage of their api?

Note: Legendary is missing from rarity.

(edited by DarkSpirit.7046)

I got a Trojan

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046


I scanned the source code and didn’t see anything malicious. Of course it’s still possible that the compiled executable could be dangerous even if an author provides the source. The safest route would be to compile the source yourself, if you are suspicious. However, most authors who go through the effort to publish their source code to GitHub are probably not malicious individuals.

That is what I would do if I really want to use the program.

(edited by DarkSpirit.7046)

[API Suggestion] Events

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

A good example that I have in mind would be the website shown here. The fields for each event record should also include:

1. Location (called as Area in the above website) or a x/y co-ordinate position on the map.
2. Type of Event: Normal/Skill Challenge/Meta/Chest
3. DateTime of last status update to the event
4. Number of players participating/participated in the event, if possible.

(edited by DarkSpirit.7046)

[API Suggestion] Items, Recipes, and Crafting

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

The problem with including vendor costs is that different vendors can sell the same item at different prices. I’m not talking just coin versus karma, but I know at one time during beta there was an item that different vendors sold for different amounts of coin.

A better way to present that data would be via a vendor_details.json API, that would key off of actor_id or something and list all the items the vendor sells, along with the prices.

Alternatively we can have a vendor array on each item record with each element in the array containing the vendor id and the gold/karma/laurel/skill point cost for the item.

This would be similar to an item record with something like this:


{...,"SoldBy":[{"NPCExternalID":700000,"KarmaCost":49},{"NPCExternalID":700001,"KarmaCost":77}]}
or

{...,"SoldBy":[{"NPCExternalID":700000,"GoldCost":8}]}

The advantage of this approach is that I won’t need to load the vendor.json, when I am not interested in vendor information, in order to generate a tree view like the one shown in http://www.gw2spidy.com/recipe/3157

(edited by DarkSpirit.7046)

[API Suggestion] Items, Recipes, and Crafting

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I have posted on another suggestion thread before but since now we have an official suggestion thread for items, here goes:

For item details, it would be useful, if the item is sold by a vendor, to get the cost of buying it from a vendor. Besides the price of SELLING it to the vendor, which we can also get from the Trading Post API anyway. Include “Gold Cost”, or “Karma Cost”, “Laurel Cost”, or “Skill point Cost”. This would make such derivations possible, for example:
http://www.gw2spidy.com/recipe/3157
I think gw2spidy is using the data provided by gw2db but now that we have an official source, apps can consider switching to use this provided it has the data that they need.

Another great feature would be supporting Mystic Forge recipes. You can expose mystic forge recipes as belonging to its own unique crafting discipline if you like. Sorry if we are asking for too much.

[API Suggestion] Items, Recipes, and Crafting

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I would like to see an API that gives me all of the recipe details for all of the recipes in one JSON file. Currently, the procedure for getting all of the recipe details is…..

Step 1: Call “recipes” to get the list of recipe_id’s
Step 2: Loop through each recipe_id
Step 3: Call “recipe_details” to get the details of each recipe

This method takes a large amount of bandwidth as the current recipe_id list is 6870 items long….each requiring an individual call to get its details.

I would like to second this suggestion and also include item_details for this suggestion also.

Considering that we would need to be registered developers with api key and set quota, this suggestion for being able to get all the item details in 1 call and recipe details in 1 call, becomes even more important.

[API Suggestion] Trading Post API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

With regards to buying and selling, it would nice if we have an api to:

1. View our character inventory so we can decide what to sell and if we have enough inventory space to buy certain items.

2. We also need an api to find out how much gold our character has.

3. Having a datetime stamp on the buy/sell listings of an item would also be nice.

4. Have a Upgrade field in the item record to point to the upgrade item id of the upgrade socketed within the item.

(edited by DarkSpirit.7046)

[API Suggestion] Trading Post API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I have but one concern about an API to buy and sell in the TP: Security. I bet that as soon as an API to trade in the TP is released, someone will find an exploit to “steal” things from other users (placing a buy order of 1c with his char, and fulfilling it with another person char).

Then they can easily know who the person is and ban him. The developer key used for the api call can also be banned.

If you want to talk about general api security, this is not the thread. Note that this is just an api suggestion thread and the purpose is to actually give suggestions to enable grand scenarios that users would find useful.. We can ask for anything we want here but ArenaNet would only give what they deem to be suitable, which would be a percentage of these scenarios. So I am not worried about security and you should not be at this time! Please don’t let your fear of bots and hackers hinder our brainstorming for legit users app experiences on this thread.

(edited by DarkSpirit.7046)

[API Suggestion] Trading Post API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

You’re the one that keeps going back to it. Bots in particular aren’t relevant but the question of how much power we should have over the trading post with an API very much is.

You basically stated why I was drawn into that discussion in the first place. How much power we should have over the trading post with an API should NOT be relevant to this thread. That is not our call to make but ArenaNet’s. Remember also that developers need to be registered and be given an api key so there would be some accountability if we chose to use the api. In any case, as far as this thread is concerned, let us drop any bot discussion from now on and think only of legit scenarios.

How about accessing the gem store? That should help ArenaNet advertise their gem store items across multiple platforms. Access to view and buy current promotional items and other gem store items would be nice.

(edited by DarkSpirit.7046)

[API Suggestion] Trading Post API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

sarcasm on OK, then lets add a teleport function, a wallhack, zoomhack, speedhack, etc. – because… you know: its already possible for a few bots or hack-tools. sarcasm off

There is a huge difference between some bots that are probably able to use the TP and an official, easy-to-use API which allows pretty much every coder to write an app which buys/sells automatically.

Just because many of us have the technical knowledge to write our own bots doesn’t mean we do. They are not that difficult to write and at a minimum, anyone who knows how to write an autoit script can create a simple bot to buy/sell on the TP. You don’t even need to know a real programming language.

The question you should ask yourself is, do you want legit apps to have those capabilities or not? Not whether it is easy to write a bot with those apis as bots do not need official apis to be released to enable bot capabilities one way or another.

I would prefer the “fear of bots” to be taken out of this api discussion, as it is out-of-topic for this thread, and move on to discussing user scenarios and how we can make useful TP apps for legit users. Please move bot discussions to other threads or to the BLTC forum.

(edited by DarkSpirit.7046)

[API Suggestion] Trading Post API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

YEAH! Trading Post bots!!! Awesome idea… not!

As soon as they allow buying/selling stuff using the API, the game is ruined once and for all.

There are already bots in this game even without an api! I have even seen bots that teleport to pick up items. And I am sure there are no released api to support that. Even though the current unofficial TP web api does not support selling of items, that doesn’t stop bots from selling items. I have already seen selling bots mentioned on the internet by bot writers with details on how it works.

Would not releasing an api to buy or sell in the TP prevent bots from appearing in the game or even prevent TP bots from auto buying and selling? I don’t think so. Even if ArenaNet removes the entire web interface for the TP, it is still possible to buy and sell using autoit scripts or by referencing scanned function points in the game client. Bot writers have already written harnesses that expose these function points to plugged-in bot modules. The only thing that would achieve is to make apps less usable for the legit users. I can understand if non-technical players may think that way, but surely you guys, who have more technical knowledge, can see that.

That said, if many players are still uncomfortable to enable buying and selling through apps, then so be it. Only the bots would have those capabilities then. Releasing an official api only serves to bring legit app writers to write apps for users. Not releasing an api has no bearing on bot prevention or bot capabilities. It would only impact the capabilities of legit apps.

(edited by DarkSpirit.7046)

[API Suggestion] Trading Post API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

As for buying and selling there is not much difference with what we already have now anyway.

With websites like gw2spidy and goldwars2, they can already monitor prices for you. And if the app can monitor prices, they can easily notify you if the price hits a certain user-defined limit. All you need to do is login to the game and buy/sell. I don’t see the difference between buying from the app or buying from the game except for maybe a delay of 1 minute to login to the game. This only serves as an added inconvenience to your users and I don’t see any other advantage the app user would have besides this little convenience. But if many of you think that buying through the app is too big an advantage then so be it and I am fine with not having that and the app would just produce notifications. I am just wondering how would I feel if it hits my price limit, my phone app notifies me but I can’t login to the game because I am in the office.

John Smith and ArenaNet should already be aware of gw2spidy and Zicore’s TP notifier tool. There are many users who asked for ArenaNet’s opinion about them but ArenaNet chose not to comment on them at the moment.

(edited by DarkSpirit.7046)

[API Suggestion] Trading Post API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Let’s make this thread a place for suggestions for the Trading Post API. Here are the user scenarios I want to support:

- Mobile device app that the user would be able to view his or her buy/sell/bought/sold transactions.
- Mobile device app that would notify the user when there are items/gold to pick up from the Trading Post NPCs.
- Users would be able to buy/maybe sell (not sure if sell is possible), items from their mobile devices.
- Users would be able to trade gems from their mobile devices.
- Users would be able to monitor item and gem prices from their mobile devices and receive notifications if they hit user-defined limits.
- Users would be able to search for items in the trading post from their mobile devices and also be able to view buy/sell listings for each item.

I know that there is an “unofficial” API to their trading post right now, but that is hardly mobile app friendly since it requires a game session key from your GW2 client for many of its features.

Please post here if you want ArenaNet to release a Trading Post api that is mobile app friendly and offer your suggestions too.

(edited by DarkSpirit.7046)

API Development Plans

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

That is exciting news! I will make a Trading Post api suggestion thread, I have been waiting for ArenaNet to offically release a Trading Post api that would be mobile apps friendly.

And here it is: https://forum-en.gw2archive.eu/forum/community/api/API-Suggestion-Trading-Post-API

(edited by DarkSpirit.7046)

Inconsistencies between ingredients and items

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Thanks for looking into the issues Cliff!

Is Javascript enough to use the API?

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I also doubt the events requests take up much resources either. I’d guess they’re writing data to memcache-like cache on update, then just pull from there.

Even less for map names and world names.

If ArenaNet really wants to save their server bandwidth resources, they should make it easier for us to cache their items and recipes data in 1 call, rather than requiring us to fetch them one at a time. Those kinds of saving would be more significant.

(edited by DarkSpirit.7046)

Is Javascript enough to use the API?

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

You make good points, but in general, unless you never expect to have a sizable user base, it is best to make a single call to the API and cache that, even if you call and re-cache it every minute, rather than making a unique call for each user.

I’m too lazy to start up my Visual Studio environment (it’s installed on my laptop while I’m working now on my PC), so, I decided to create an event page using pure javascript. I won’t release it (I would have to clean up my code and that sounds too much like work and I do that enough during working hours!), so don’t worry about that.

But even with the events, you can cache a lot. I simply saved the result of the event names, world names and map names API’s in a JSON file and load those using JQuery. Only when I want an updated status report, will I go to the server. I only make one call (events.json), getting everything I want for the map or the world (depending if I selected a specific map or not).

I only may need to update those three cached versions every time there’s a major update…

That sounds reasonable and that is what Zicore and I currently do with the items and recipes JSON data from gw2db. This is why I would suggest that ArenaNet makes it possible to grab all the items details in 1 call so that it is easier for us to cache it.

As for the world names, map names, etc. they hardly change so it makes sense for you to cache them too. On the other hand, I doubt those calls take up much of their server resources either compared to events.json.

Is Javascript enough to use the API?

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Listen to this person. While I have no issue with people testing JS client side scripts, I discourage anyone from releasing anything wherein the client-side directly accesses GW2’s API. If it’s not cached and accessed every single time a user opens the page, you’re sending in far more requests than necessary. This is something where, if too many people don’t optimize their applications, we may start seeing API rate limitations.

The problem with caching is that you have to decide how often to refresh your data. For certain data like the items data from this api, it makes sense to cache because they hardly change. For others like the TP data, they change often and most users would rather not make huge investment decisions based on outdated data.

It is also possible to cache your data through a standalone windows app without a database. My TP app minimizes to a system tray icon and runs in the background, refreshing its data at certain time interval with a refresh data command option for the user if he so chooses.

As long as the script/app writer keeps in mind to minimize network bandwidth, it should generally be good enough. That said, I think most of the bandwidth problems would come from non-technical users who use Excel to auto refresh their spreadsheet data too often without being aware of bandwidth issues.

(edited by DarkSpirit.7046)

World_id on events.json required parameter?

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I don’t see how making world_id a required parameter would be better. Right now you have a choice of listing all of the events or filtering them through world_id, map_id, and/or event_id. This means you can choose to have the result filtered for you or not.

Having choices is good.

JS script - servers with available temples

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Unfortunately, some of the comment lines were truncated. Anyway here are the event ids:

“0723E056-E665-439F-99B7-20385442AD4E”; // “Protect the Cathedral of Zephyrs.” – Dwayna
“0372874E-59B7-4A8F-B535-2CF57B8E67E4”; // “Kill the Corrupted High Priestess” – Lyssa
“989A298C-B06B-4E9B-A871-1506A6EE3FEC”; // “Defend the Pact interrupter from Risen attacks.” – Melandru
“DFBFF5FE-5AF0-4B65-9199-B7CACC945ABD”; // “Ensure that the Pact holds the Gates of Arah.” – Arah
“57A8E394-092D-4877-90A5-C238E882C320”; // “Stop the Risen Priest of Grenth from retaking the Cathedral of Silence.” – Grenth
“589B1C41-DD96-4AEE-8A3A-4CC607805B05”; // “Help the Pact hold the Altar of Betrayal from the Risen.” – Balthazar

The discussion was held on this thread:

https://forum-en.gw2archive.eu/forum/community/api/Inaccurate-API-response-for-events/first#post2079579

JS script - servers with available temples

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Here is a fast hack of a windows scripting host scriplet to list the servers with temples that are cleared by checking their corresponding Defense events.

To run it, just copy and paste these 2 files in the same directory. Also download json2.js from the internet into the same directory. Then type this in a cmd box:

cscript events.wsf

events.wsf:


<job id="gw2events">
	<Script type="text/javascript" src="json2.js" />
        <Script type="text/javascript" src="gw2events.js" />
	<script type="text/javascript">
		var api = new GW2EVENTS();
		var eventNames = api.EventNames();
		var worldNames = api.WorldNames();
		var mapNames = api.MapNames();

		//var eventIdToCheck = "0723E056-E665-439F-99B7-20385442AD4E"; // "Protect the Cathedral of Zephyrs." - Dwayna

		//var eventIdToCheck = "0372874E-59B7-4A8F-B535-2CF57B8E67E4"; // "Kill the Corrupted High Priestess" - Lyssa

		//var eventIdToCheck = "989A298C-B06B-4E9B-A871-1506A6EE3FEC"; // "Defend the Pact interrupter from Risen attacks." - Melandru

		//var eventIdToCheck = "DFBFF5FE-5AF0-4B65-9199-B7CACC945ABD"; // "Ensure that the Pact holds the Gates of Arah." - Arah

		//var eventIdToCheck = "57A8E394-092D-4877-90A5-C238E882C320"; // "Stop the Risen Priest of Grenth from retaking the Cathedral of 

Silence." - Grenth

		//var eventIdToCheck = "9752677E-FAE7-4F56-A48A-275329095B8A"; // "Hold the Infinity Coil." - CoE

		var eventIdToCheck = "589B1C41-DD96-4AEE-8A3A-4CC607805B05"; // "Help the Pact hold the Altar of Betrayal from the Risen." - Balthazar
		
		for (var i in worldNames) {
			if (api.IsUSWorld(worldNames[i])) {
				var events = api.Events(worldNames[i].id, eventIdToCheck)
				for (var j in events) {
					if (events[j].state != "Fail") {
						WScript.Echo(api.Name(worldNames,worldNames[i].id) + " " + events[j].state);
					}
				}
			}
		}
	</script>
</job>

gw2events.js:


xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

function GW2EVENTS()
{
	this.Name = getName;
    	this.EventNames = getEventNames;
	this.MapNames = getMapNames;
	this.WorldNames = getWorldNames;
	this.Events = getEvents;
	this.IsUSWorld = IsUSWorld;
	this.IsEuropeWorld = IsEuropeWorld;

	function getName(list, id)
	{
		for (var i in list) {
			if (list[i].id == id) return list[i].name;
		}
		return "Unknown";
	}

	function IsUSWorld(world)
	{
		return (world.id.charAt(0) == '1');
	}

	function IsEuropeWorld(world)
	{
		return (world.id.charAt(0) == '2');
	}

        function getEventNames()
	{
	       return _request('event_names.json');
	}

	function getMapNames()
	{
   		return _request('map_names.json');
	}

        function getWorldNames()
        {
		return _request('world_names.json');
        }

	function getEvents(worldId, eventId)
	{
		var param = "", param2 = "";

		if (typeof worldId != "undefined") {
			param = "world_id=" + worldId;
		}
		if (typeof eventId != "undefined") {
			param2 = "event_id=" + eventId;
		}
		return _request('events.json?', param, param2).events;
	}

	function _request()
	{
		var args = Array.prototype.slice.call(arguments)
		try {
			_HttpGet(args);
		}
		catch (e)
		{	
			WScript.Echo ("Error: " + e.number);	
                        WScript.Echo ("Retrying...");

			try {
				_HttpGet(args);
			}
			catch (e)
			{
				WScript.Echo ("Error: " + e.number);
			}	
		}
			
		try {
			var outputString = _JSONParse();
		}
		catch(e) 
		{
			WScript.Echo ("JSON parsing error!  Retrying...");
			_HttpGet(args);
			var outputString = _JSONParse();
		}
         	return(outputString);
	}

	function _HttpGet(args)
	{
		xmlhttp.open("GET", "https://api.guildwars2.com/v1/" + args.join("&"), false);				
		xmlhttp.send();	
	}

	function _JSONParse()
	{
		var parseString = xmlhttp.responseText;
		return JSON.parse(parseString);
	}
}

(edited by DarkSpirit.7046)

Inaccurate API response for events

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

589B1C41-DD96-4AEE-8A3A-4CC607805B05
Help the Pact hold the Altar of Betrayal from the Risen.

I tried it again and using this defense event appears to work at the Temple of Balthazar. If the event status is not Fail, then the temple should be clear. At the moment, Tarnished Coast has the status marked as Warmup and the temple is cleared.

If we can compile a list of all the relevant events for each temple and dungeon, we should be able to know which servers have them available at any time.

(edited by DarkSpirit.7046)

Inconsistencies between ingredients and items

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I wonder if they are keeping track of the bugs reported in this forum. I don’t see a reported bugs thread sticked.

Inconsistencies between ingredients and items

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Good find!

Item id 12151, for example, is Packet[s] of Baking Powder.

You can check it against gw2spidy since their TP api uses the same item id.

http://www.gw2spidy.com/item/12151

But

https://api.guildwars2.com/v1/item_details.json?item_id=12151

..gives an error, so this item is missing from their items api.

(edited by DarkSpirit.7046)

[API Suggestion] Items, Recipes, and Crafting

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

What I miss in this API is a recipe_id for those items that are also created using a recipe.

If you take your recipe example. One of its ingredients is this:

https://api.guildwars2.com/v1/item_details.json?item_id=12812

Which is a crafting material, but one that requires another recipe to craft. It would be nice if there was a recipe_id in there as well, so you can eventually find the base materials of the final crafted item.

That is created by recipe_id 3392.

https://api.guildwars2.com/v1/recipe_details.json?recipe_id=3392

You would have to match the output_item_id from the recipe list.

But that would mean you have to download all recipe_details of each recipe to search for the output_item_id of the item that you need to craft. Since you can only request the recipe_details of 1 recipe at a time it is going to be a performance hit for both server and client.

I suggest we either:

1. Allow output_item_id as a parameter to recipe_details.json.

or

2. Like LadyRhonwyn suggests, have a recipe_id field in the item record. That would also mean having a unique value for this field in items that are not craftable.

or

3. Have a way for recipe_details.json to return all recipes in 1 call. Leaving it to the client to search for the required output_item_id.

(edited by DarkSpirit.7046)

Inaccurate API response for events

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

589B1C41-DD96-4AEE-8A3A-4CC607805B05
Help the Pact hold the Altar of Betrayal from the Risen.

Thanks, for the US servers these are the ones that have a non-fail status right now:

Dragonbrand Warmup
Northern Shiverpeaks Warmup

Unfortunately, I used up my daily Guesting limit so I can’t peek at these servers. Perhaps someone else can check if the Temple of Balthazar is opened there?

(edited by DarkSpirit.7046)

Inaccurate API response for events

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Anyone knows what is the defense event for the Temple of Balthazar?

Let’s compile a list of Defense events for the Orr temples so we can verify this. These are my untested “best guess” picks, so please correct me if I am wrong:

“0723E056-E665-439F-99B7-20385442AD4E”; // “Protect the Cathedral of Zephyrs.” – Dwayna

“0372874E-59B7-4A8F-B535-2CF57B8E67E4”; // “Kill the Corrupted High Priestess” – Lyssa

“989A298C-B06B-4E9B-A871-1506A6EE3FEC”; // “Defend the Pact interrupter from Risen attacks.” – Melandru

“DFBFF5FE-5AF0-4B65-9199-B7CACC945ABD”; // “Ensure that the Pact holds the Gates of Arah.” – Arah

“57A8E394-092D-4877-90A5-C238E882C320”; // “Stop the Risen Priest of Grenth from retaking the Cathedral of Silence.” – Grenth

(edited by DarkSpirit.7046)

Inaccurate API response for events

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I think there is a bug with the status reported by meta events and I don’t trust their current reported status at the moment until the next game patch.

But I’ll be interested to know how this turns out since I am interested to do the same thing.

List of (all) group-events

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Nice list! Love ya!

Using it in my project at http://gw2.thelazy.net/

That is cool! Thank you!

Guide to the Black Lion Trading Co API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Thanks for the update, The Talcmaster. Personally, I am so glad that they added the count parameter to the trading post’s search.json. My app sorting feature for computed columns, is much faster now.

I would be very excited when they officially release their trading post api.

Guide to the Black Lion Trading Co API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

If you want complete C# code using this API, you can look at Zicore’s TP Notifier:

https://forum-en.gw2archive.eu/forum/game/bltc/Zicore-s-Trading-Post-Notifier-Open-Source/first

It uses .NET 4.0. I have also written my own C# app in .NET 4.5 (for its async programming) but it is still work-in-progress.

Here are some of the enums that I use:

public enum RarityEnum
{
Junk = 0,
Basic,
Fine,
Masterwork,
Rare,
Exotic,
Ascended,
Legendary
};

public enum TypeEnum
{
Armor = 0,
Back = 1,
Bag = 2,
Consumable,
Container,
[EnumMember(Value = “CraftingMaterial”)]
Crafting_Material,
Gathering,
Gizmo,
MiniPet = 11,
Tool = 13,
Trinket = 15,
Trophy,
[EnumMember(Value = “UpgradeComponent”)]
Upgrade_Component,
Weapon
};

// for TypeEnum.Armor
public enum ArmorSubTypeEnum
{
Coat = 0,
Leggings,
Gloves,
Helm,
[EnumMember(Value = “HelmAquatic”)]
Aquatic_Helm,
Boots,
Shoulders
};

// for TypeEnum.Consumable
public enum ConsumableSubTypeEnum
{
Alcohol = 1,
Generic,
Food = 3,
Tonics = 4, // Suppose to be Generic?
Transmutation = 5,
Unlock,
Skins = 7,
Dyes_and_Recipes = 8, // Suppose to be Unlock?
Utility = 9,
[EnumMember(Value = “ContractNpc”)]
Contract_Npc,
[EnumMember(Value = “AppearanceChange”)]
Appearance_Change,
Immediate,
Halloween
};

// for TypeEnum.Container
public enum ContainerSubTypeEnum
{
Default = 0,
[EnumMember(Value = “GiftBox”)]
Gift_Box
};

// for TypeEnum.Gathering
public enum GatheringSubTypeEnum
{
Foraging = 0,
Logging,
Mining
};

// for TypeEnum.Gizmo
public enum GizmoSubTypeEnum
{
Default = 0,
Salvage = 2,
[EnumMember(Value = “RentableContractNpc”)]
Rentable_Contract_Npc,
[EnumMember(Value = “UnlimitedConsumable”)]
Unlimited_Consumable
};

// for TypeEnum.Tool
public enum ToolSubTypeEnum
{
Crafting = 0,
Salvage = 2
};

// for TypeEnum.Trinket
public enum TrinketSubTypeEnum
{
Accessory = 0,
Amulet,
Ring
};

// for TypeEnum.UpgradeComponent
public enum UpgradeComponentSubTypeEnum
{
Default = 0,
Gem = 1,
Rune = 2,
Sigil = 3
};

// for TypeEnum.Weapon
public enum WeaponSubTypeEnum
{
Sword = 0,
Hammer,
[EnumMember(Value = “LongBow”)]
Long_Bow,
[EnumMember(Value = “ShortBow”)]
Short_Bow,
Axe,
Dagger,
Greatsword,
Mace,
Pistol,
Rifle = 10,
Scepter,
Staff,
Focus,
Torch,
Warhorn,
Shield,
[EnumMember(Value = “Harpoon”)]
Spear = 19,
[EnumMember(Value = “Speargun”)]
Harpoon_Gun,
Trident,
[EnumMember(Value = “TwoHandedToy”)]
Toy
};

Note that there are currently some bugs surrounding ArenaNet’s search filters. They don’t have Back Item search and some of the consumable sub types that I have above, implemented in their TP dialog web page. So keep in mind that these enums may change by the time ArenaNet releases this api.

(edited by DarkSpirit.7046)

Guide to the Black Lion Trading Co API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I would be surprised if ArenaNet finally decides to release their trading post API as it is right now. I don’t think it is ready.

Most of the interesting functions require the game session key and char id guid and having this requirement hampers their use in mobile apps, which is why I didn’t post any detail information about their Trading Post API. I also would not know what I post would be outdated by the time ArenaNet decides to officially release this.

However, since The Talcmaster has already posted this information, I can help by supplementing any info that he may have missed out.

Guide to the Black Lion Trading Co API

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Is it possible to buy with this api or merely watch prices?

Yes it is possible to buy. For buy, you have to do a https post

https://tradingpost-live.ncplatform.net/ws/item/<itemId>/buy

with the following parameters:

{count=int,price=int,charid=<char guid>}

You also need your game session key.

(edited by DarkSpirit.7046)

Suggestion for world_names.json

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Hi,

I’ve updated the API documentation with this information:

https://forum-en.gw2archive.eu/forum/community/api/API-Documentation

In short – the region of a world can be reliably determined from its world_id. Language-specific worlds currently follow a pattern but that pattern is not guaranteed.

Thanks Cliff!

The general suggestion thread

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Sorry, not a programmer at all, but I’m wondering if it would be possible using these tools to make something that tracks the status of Orrian temples and notifies you when a particular Karma vendor is available and what server they’re available on?

In theory, yes there is that potential but because of the existing bugs in this API, we have not figured out a good way to do that at the moment. I am waiting for the next game patch, which is expected to fix these bugs, before looking into this again.

Unless someone would like to enlighten us by providing a working example.

The general suggestion thread

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Nameless Event?

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

They should have a bugs thread at the top of this forum. Another bug:

https://forum-en.gw2archive.eu/forum/community/api/API-Bugged/first#post2068629

Items icons and in-game code

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

(edited by DarkSpirit.7046)

Suggestion for world_names.json

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

A little official documentation on the server IDs wouldn’t hurt if you are right gnakitten584!

Yes, that is what I am looking for.

Items / Recipes

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

I don’t see why not. They already support passing in a collection of item ids in their trading post api and their trading post api also allows you to search via their search filters, which includes item type.

Suggestion for world_names.json

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Look closer at the ID’s and you discover a pattern.
10xx is US
20xx is EU
21xx is EU/French
22xx is EU/German
23xx is EU/Spanish

If that pattern is guaranteed to always hold true, then we wont need this.

Suggestion for world_names.json

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Would be nice if https://api.guildwars2.com/v1/world_names.json would also have a field to show if they are US or Europe servers since users from one zone can’t guest across the other.

[API Suggestion] Items, Recipes, and Crafting

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

For item details, it would be useful, if the item is sold by a vendor, to get the cost of buying it from a vendor. Besides the price of SELLING it to the vendor, which we can also get from the Trading Post API anyway. Include “Gold Cost”, or “Karma Cost”, “Laurel Cost”, or “Skill point Cost”. This would make such derivations possible, for example:

http://www.gw2spidy.com/recipe/3157

I think gw2spidy is using the data provided by gw2db but now that we have an official source, apps can consider switching to use this provided it has the data that they need.

A great bonus would be supporting Mystic Forge recipes. You can expose mystic forge recipes as belonging to its own unique crafting discipline if you like. Sorry if we are asking for too much.

(edited by DarkSpirit.7046)

Inconsistent World Status array size

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

It’s pretty simple: The events are not currently in existence. If someone is in the middle of the chain for taking the event, then there shouldn’t be an instance in the list for the defense events. Grenth is considered unreasonably hard by most, so it’s not surprising that there are only 16 in defense. I don’t know how long an event stays in the listing, but it is likely to disappear by the time the next event in the chain starts.

That would be weird because if that is true then how would you determine the “Success” or “Fail” status. If a server failed the event, then how long would the “Fail” status be up before it disappears?

If you can’t always determine the “Success” or “Fail” status of an event, if they are transitional states that pass quickly, then how are we able to determine the state of the Orr temples? Or maybe we just can’t with this api?

Also I am seeing “Success” status for both “Seize the Altar of Betrayal before Pact morale can be broken” (which is a precursor for “Defeat the Risen Priest of Balthazar before it can summon a horde of Risen”) and “Defeat the Risen Priest of Balthazar before it can summon a horde of Risen” on my server.

(edited by DarkSpirit.7046)

Finding the status of the Orr Temples

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Or put a more depressing way, 35 servers have never succeeded on Grenth?

Yeah that probably doesn’t make sense unless the servers have low population. I would be surprised if Grenth has never been discovered in Jade Quarry.

Maybe it is just a bug.

Their status don’t seem to update all that much over time for me either, weird.

(edited by DarkSpirit.7046)

Finding the status of the Orr Temples

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

See my post here

I already found the relevant defense events, but not all servers are present in the results…

Just a wild guess on my part but perhaps the reason why you are getting different array sizes is because of what is explained here?

https://forum-en.gw2archive.eu/forum/community/api/names-json-static/first#post2064502

Some events may not have been “discovered” by players yet on certain servers?