These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
123Next pageLast page
 

Clonerworks API for Blueprint Materials Required

Author
Louis Vitton
Viziam
Amarr Empire
#1 - 2013-06-27 09:57:16 UTC  |  Edited by: Louis Vitton
Clonerworks API has been taken down due to issue with my time and updating the API for the new industry changes.
The API will be making a comeback however as soon as possible. At this time a new thread will be created.

Cheers,

Louis
Jimmy Riot
fidelis ad mortem
#2 - 2013-06-27 10:54:25 UTC
Would be nice to have also ...

  • the location as param. If you use for example a Advanced S/M/L Ship Assembly Arrays you will have 10% increase in materials required.
  • required time to build stuff
  • implants

Thx 4 the project, Louis.
Louis Vitton
Viziam
Amarr Empire
#3 - 2013-06-28 10:53:10 UTC
Hi Jummy,
That is something i can add to the wanted list. I have some time this weekend so I will start to get something going for it.
Thanks for the ideas I will post once it is up and running with the changes added.
Shimmsters
EvE-COM Academy
#4 - 2013-07-11 03:30:58 UTC
Your api is awesome! Thanks for all the hard work, i know it cant have been easy!

How goes the work on production time? Im not interested in super accurate using all implants ect. Just PE and station modifier to give a good guess at the total time would be awesome!
Louis Vitton
Viziam
Amarr Empire
#5 - 2013-07-16 01:37:20 UTC
Shimmsters wrote:
Your api is awesome! Thanks for all the hard work, i know it cant have been easy!

How goes the work on production time? Im not interested in super accurate using all implants ect. Just PE and station modifier to give a good guess at the total time would be awesome!


The new release is coming very shortly. In fact within the next few days. At the moment i am just finishing off the last bit of code.
The new API will have both PE time calcs as well as material multiples.

With reguards to the PE and Material multiplers i will explain how i have set the URL to recive them and how they will be processed once the code is released.

Updating of the documentation on the web page may take a few more days but i will update the information in the post here right after the new code is deployed.

The new code will not change the existing URL used but the returned JSON object will change as there will be more information in some sections and less in others.
Shimmsters
EvE-COM Academy
#6 - 2013-07-18 01:07:21 UTC
Excellent news thanks for all the good work! Ill be sitting on the edge of my seat waiting :P
Grauth Thorner
Vicious Trading Company
#7 - 2013-07-18 09:00:15 UTC
It seems that the API is offline as I'm getting an URL not found exception. It looks quite interesting though so I'll definetly have a look once it's up again =)

Regards,
Grauth Thorner

View real-time damage statistics in-game

>EVE Live DPS Graph application forum thread

>iciclesoft.com

Louis Vitton
Viziam
Amarr Empire
#8 - 2013-07-18 10:33:33 UTC  |  Edited by: Louis Vitton
Grauth Thorner wrote:
It seems that the API is offline as I'm getting an URL not found exception. It looks quite interesting though so I'll definetly have a look once it's up again =)

Regards,
Grauth Thorner


Sorry about that i took it down for about an hour and performed an update on the API.
I am just finishing some testing - the site shouldnt go down again.
Please check here out for the updates to the API and documentation on the new URL Get Var's added: http://api.clonerworks.com/api/docs/blueprint-calc

Please report any issues you have here and i will be around over the next few days to correct them. Also I have changed the HTML code for the standard pages such as home page and documentation page. It is now a responsive design so should work well with phones and tables let me know how it goes.
Grauth Thorner
Vicious Trading Company
#9 - 2013-07-18 21:35:18 UTC
Looks good, nice job!

View real-time damage statistics in-game

>EVE Live DPS Graph application forum thread

>iciclesoft.com

Rosvenir Dro'Allen
Catskull Cartel
Grimskulls
#10 - 2013-07-21 09:05:10 UTC
Morning

I ran your api for a rifter and I get the wrong amount of materials. As result with URI "http://api.clonerworks.com/api/blueprint-calc/587" I get :
{
"parameters": {
"me": 0,
"pe": 0,
"peSkill": 5,
"peMod": 1,
"industrySkill": 5,
"materialMultiplier": 1
},
"bpDetails": {
"typeID": "587",
"typeName": "Rifter",
"techLevel": "1",
"blueprintTypeID": "691",
"maxProductionLimit": "30",
"wasteFactor": "10",
"productivityModifier": "1200",
"productionTime": "6000"
},
"skillsToBuild": [{
"typeID": "3380",
"typeName": "Industry",
"level": "1"
}],
"materials": {
"baseMaterials": [
{
"typeID": "34",
"typeName": "Tritanium",
"amount": 22
},
{
"typeID": "35",
"typeName": "Pyerite",
"amount": 6
},
{
"typeID": "36",
"typeName": "Mexallon",
"amount": 2
},
{
"typeID": "37",
"typeName": "Isogen",
"amount": 352
},
{
"typeID": "38",
"typeName": "Nocxium",
"amount": 132
},
{
"typeID": "39",
"typeName": "Zydrine",
"amount": 17
},
{
"typeID": "40",
"typeName": "Megacyte",
"amount": 1
}
],
"extraMaterials": [],
"totalMaterials": [
{
"typeID": "34",
"typeName": "Tritanium",
"amount": 22
},
{
"typeID": "35",
"typeName": "Pyerite",
"amount": 6
},
{
"typeID": "36",
"typeName": "Mexallon",
"amount": 2
},
{
"typeID": "37",
"typeName": "Isogen",
"amount": 352
},
{
"typeID": "38",
"typeName": "Nocxium",
"amount": 132
},
{
"typeID": "39",
"typeName": "Zydrine",
"amount": 17
},
{
"typeID": "40",
"typeName": "Megacyte",
"amount": 1
}
]
},
"productionTime": {
"productionTimeSeconds": 6000,
"productionTimeReadable": "01 hour 40 minutes "
}
}
Rosvenir Dro'Allen
Catskull Cartel
Grimskulls
#11 - 2013-07-21 09:14:38 UTC
Another thing(I design api's for a living ;) ) When you make a rest api like this when a resource is not found. it is customary to return a HTTPResponse code of 404 signifying that the resource was not found. This way programs that use your api dont have to parse the content at all.
Louis Vitton
Viziam
Amarr Empire
#12 - 2013-07-21 09:32:27 UTC  |  Edited by: Louis Vitton
Rosvenir Dro'Allen wrote:
Another thing(I design api's for a living ;) ) When you make a rest api like this when a resource is not found. it is customary to return a HTTPResponse code of 404 signifying that the resource was not found. This way programs that use your api dont have to parse the content at all.


Thanks for that idea. I will implement this as soon as possible. I hope to finish the code before the server downtime tomorrow to get it all up and running again normally with some extras.

I have resolved the issue with the incorrect amounts been returned by the API also. This was due to the Json object returning the amounts as int's, i have changed these back to stings and full amounts show again normally.

**please note that at downtime tonight i will be taking the server down for approx 1 hour to complete a few changes not only to the API but to the server OS.**

Site is back online. Please continue to test.
Changes currently are:

  • HTTP Response codes added to calls - you now get a 404 error when you give a URL that doesnt meet the requirements and not just an error message.
  • Material amounts changed to strings from int's as the int's where chopping part of the number off :P.
Rosvenir Dro'Allen
Catskull Cartel
Grimskulls
#13 - 2013-07-21 09:52:52 UTC
wow thanks for the fast reply. I will recheck the api after downtime.

You do realize that if you api becomes a sucess it and the server it runs on will be hammered really hard?
Rosvenir Dro'Allen
Catskull Cartel
Grimskulls
#14 - 2013-07-21 11:53:08 UTC
the change you have made to fix the amounts, has turned the amounts in the json to string values not numeric values. This makes parsing harder. In java terms I would always return an int or Integer.
Louis Vitton
Viziam
Amarr Empire
#15 - 2013-07-21 11:56:48 UTC  |  Edited by: Louis Vitton
Rosvenir Dro'Allen wrote:
the change you have made to fix the amounts, has turned the amounts in the json to string values not numeric values. This makes parsing harder. In java terms I would always return an int or Integer.


Hi Rosvenir,

The issue with the INT's as strings has been resolved and the numeric values of the API have been restored to INT's again. This time returning the whole number and not just part of it.
Please note number formatting was removed to resolve this.
so it used to be 22,550 now is just 22550.

Cheers,
Louis Vitton.
Louis Vitton
Viziam
Amarr Empire
#16 - 2013-07-22 01:23:23 UTC
Hi guys,

Please let me know if there are any other features or ideas your have for the API?
Anything else you want to see added?
let me know here or eve mail me :)

Cheers Louis
Rosvenir Dro'Allen
Catskull Cartel
Grimskulls
#17 - 2013-07-22 09:56:07 UTC
he Louis

Starting to hate me yet?

In the return json when an array is not filled you now return nothing. Customary is to return an empty array:
"extraMaterials":{}
This signals to convertors that they are correct in assuming it is an array (but an empty one). If you return
"extraMaterials": null. A convertor cannot determine what type it is:
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 285

As you can see GSON expected an array (starting with {) but did not get the { so it assumed an object.
Louis Vitton
Viziam
Amarr Empire
#18 - 2013-07-22 10:07:04 UTC
Hi mate,

Never hate anyone for feed back mate. I think its good gives me a chance to improve on what i have and better it for people.
I have changed the code slightly to reflect an empty array now.
So the result of our Rifter is: "extraMaterials": [],
This is an array with nothing in it so empty.
Does this help with the issue?
Rosvenir Dro'Allen
Catskull Cartel
Grimskulls
#19 - 2013-07-22 12:19:00 UTC
Louis Vitton wrote:
Hi mate,

Never hate anyone for feed back mate. I think its good gives me a chance to improve on what i have and better it for people.
I have changed the code slightly to reflect an empty array now.
So the result of our Rifter is: "extraMaterials": [],
This is an array with nothing in it so empty.
Does this help with the issue?


Actually the result should be "extraMaterials": [{}]
Louis Vitton
Viziam
Amarr Empire
#20 - 2013-07-22 13:30:17 UTC
Hi Rosvenir Dro'Allen,

I have deployed a fix to the api to so that it is now producing the correct response for "extraMaterials": [{}]

Cheers Louis

123Next pageLast page