Pages: [1] 2 3 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Louis Vitton
Black Aces Against ALL Authorities
36
|
Posted - 2013.06.27 09:57:00 -
[1] - Quote
Hi All,
I have created a basic json API for the bill of goods required to build blueprints. The API takes into account ME, PE and PE skill levels.
Example URL http://api.clonerworks.com/api/blueprint-calc/2175 The above URL will give details of Infiltrator II's. We have no set a ME, PE or PE skilll variable so it will treat those as default exampled below.
on sucessful return of the API you will get the variable error set to false. if the api fails for any reason you will get a the variable error returned as true, along with this a message variable will also be returned with it detail what the issue was.
Example URL with Error. http://api.clonerworks.com/api/blueprint-calc/2
URL design api.clonerworks.com/api/blueprint-calc/{typeID}/{ME - Default = 0}/{PE - Default = 0}/{PE Skill - Default 5}
Example of full URL http://api.clonerworks.com/api/blueprint-calc/2175/-4/-4/5
The TypeID must be set otherwise the program will error.
Please note this is my first live development. I program for a hobby. Please let me know what you think of the API. Feature requests or anything else - please post here.
|
Jimmy Riot
Riot.
0
|
Posted - 2013.06.27 10:54:00 -
[2] - Quote
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
Black Aces Against ALL Authorities
36
|
Posted - 2013.06.28 10:53:00 -
[3] - Quote
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
0
|
Posted - 2013.07.11 03:30:00 -
[4] - Quote
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
Black Aces Against ALL Authorities
37
|
Posted - 2013.07.16 01:37:00 -
[5] - Quote
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
0
|
Posted - 2013.07.18 01:07:00 -
[6] - Quote
Excellent news thanks for all the good work! Ill be sitting on the edge of my seat waiting :P |
Grauth Thorner
Viziam Amarr Empire
122
|
Posted - 2013.07.18 09:00:00 -
[7] - Quote
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 Creator of the EVE Custom Ship Labeler application: https://forums.eveonline.com/default.aspx?g=posts&t=188954&find=unread |
Louis Vitton
Black Aces Against ALL Authorities
37
|
Posted - 2013.07.18 10:33:00 -
[8] - Quote
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 |
Grauth Thorner
Viziam Amarr Empire
122
|
Posted - 2013.07.18 21:35:00 -
[9] - Quote
Looks good, nice job! Creator of the EVE Custom Ship Labeler application: https://forums.eveonline.com/default.aspx?g=posts&t=188954&find=unread |
Rosvenir Dro'Allen
Sons of Ivaldi Zero Hour Alliance
0
|
Posted - 2013.07.21 09:05:00 -
[10] - Quote
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
Sons of Ivaldi Zero Hour Alliance
0
|
Posted - 2013.07.21 09:14:00 -
[11] - Quote
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
Black Aces Against ALL Authorities
38
|
Posted - 2013.07.21 09:32:00 -
[12] - Quote
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. |
Rosvenir Dro'Allen
Sons of Ivaldi Zero Hour Alliance
1
|
Posted - 2013.07.21 09:52:00 -
[13] - Quote
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
Sons of Ivaldi Zero Hour Alliance
1
|
Posted - 2013.07.21 11:53:00 -
[14] - Quote
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
Black Aces Against ALL Authorities
38
|
Posted - 2013.07.21 11:56:00 -
[15] - Quote
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. I will continue to test the int's issue and work on it. I will only leave the amounts as strings as a temp patch. |
Louis Vitton
Black Aces Against ALL Authorities
38
|
Posted - 2013.07.22 01:23:00 -
[16] - Quote
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
Sons of Ivaldi Zero Hour Alliance
1
|
Posted - 2013.07.22 09:56:00 -
[17] - Quote
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
Black Aces Against ALL Authorities
38
|
Posted - 2013.07.22 10:07:00 -
[18] - Quote
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
Sons of Ivaldi Zero Hour Alliance
1
|
Posted - 2013.07.22 12:19:00 -
[19] - Quote
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
Black Aces Against ALL Authorities
38
|
Posted - 2013.07.22 13:30:00 -
[20] - Quote
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
|
|
Rosvenir Dro'Allen
Sons of Ivaldi Zero Hour Alliance
1
|
Posted - 2013.07.23 13:26:00 -
[21] - Quote
Hi Louis
Marshalling goes right now, however the following URL: http://api.clonerworks.com/api/blueprint-calc/2/0/0 does not give a 404 as expected but a 500. A 500 return code signifies an internal error in the server. When you paste this URL in a browser you will get the "Whoops, looks like something went wrong" message.
Syntactically this URL is correct. it looks for id=2 with me and pe set to 0. It should return a 404.
Louis Vitton wrote: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
|
Louis Vitton
Viziam Amarr Empire
38
|
Posted - 2013.07.23 23:47:00 -
[22] - Quote
Rosvenir Dro'Allen wrote:Hi Louis Marshalling goes right now, however the following URL: http://api.clonerworks.com/api/blueprint-calc/2/0/0 does not give a 404 as expected but a 500. A 500 return code signifies an internal error in the server. When you paste this URL in a browser you will get the "Whoops, looks like something went wrong" message. Syntactically this URL is correct. it looks for id=2 with me and pe set to 0. It should return a 404.
Hi mate,
Sorry about that error, my tried slippery fingers hit the wrong letter in the code, fixed it up now and will deploy tonight at downtime with some other new content i am going to put up also.
Cheers Louis. |
Slvrsmth
Dreddit Test Alliance Please Ignore
1
|
Posted - 2013.07.26 09:52:00 -
[23] - Quote
Hey, this seems like exactly the thing I was looking for. Mind if I use your API to augument http://friendly-merchant.herokuapp.com with ability to appraise blueprints? |
Louis Vitton
The Eighty Eight Brothers of Tangra
38
|
Posted - 2013.07.26 12:30:00 -
[24] - Quote
Hey mate,
Ya thats fine, its what it is there for. Nice site by the way.
Cheers Louis. |
KnifeOrSpoon
Inter Stellar Kredit
1
|
Posted - 2013.08.04 08:27:00 -
[25] - Quote
I've just tried this with a few T2 modules, and one in particular doesn't appear to be playing ball.
22291
api.clonerworks.com/api/blueprint-calc/22291/-4/-4
returns an oops error page... anything I am missing here? |
Louis Vitton
The Eighty Eight Brothers of Tangra
40
|
Posted - 2013.08.04 09:19:00 -
[26] - Quote
Hi KnifeOrSpoon,
I can see the issue in the code that is causing the error. I am working on fixing it now for you.
|
Louis Vitton
3-Strikes Nulli Secunda
44
|
Posted - 2013.08.27 11:10:00 -
[27] - Quote
Hi guys,
I know the site may be down atm giving 404 errors for all calls. Appears there are some issues with the latest php package that was installed.
I am attempting to clear this up. I hope it doesnt impact anyone.
Cheers Louis |
Bruena Huren
Sons of Ivaldi Zero Hour Alliance
0
|
Posted - 2013.08.29 13:48:00 -
[28] - Quote
[ResponseProcessCookies.java:122] Cookie accepted: "[version: 0][name: laravel_session][value: p6b2ejuapiq7kj6gof099c2463][domain: api.clonerworks.com][path: /][expiry: Thu Aug 29 17:46:12 CEST 2013]". [ResponseProcessCookies.java:122] Cookie accepted: "[version: 0][name: laravel_session][value: p6b2ejuapiq7kj6gof099c2463][domain: api.clonerworks.com][path: /][expiry: Thu Aug 29 17:46:12 CEST 2013]". [DefaultRequestDirector.java:540] Connection can be kept alive for 5000 MILLISECONDS [BluePrintReceiver.java:143] reveived code 404
No idea why the forum shows my alt: this is Rosvenir
Louis Vitton wrote:Hi guys,
I know the site may be down atm giving 404 errors for all calls. Appears there are some issues with the latest php package that was installed.
I am attempting to clear this up. I hope it doesnt impact anyone.
Cheers Louis
**update**
Server is back online again not sure why it went down in the first place. I am looking into that. |
Louis Vitton
3-Strikes Nulli Secunda
46
|
Posted - 2013.09.14 00:04:00 -
[29] - Quote
Are you still having issues or have they resolved? |
Bruena Huren
Sons of Ivaldi Zero Hour Alliance
0
|
Posted - 2013.09.15 08:35:00 -
[30] - Quote
Sorry for not responding faster, life has been busy. No all the issues are resolved. And I have the feeling the api is responding faster.
I do have another question. Is it possible for the api to return the amount made? For example, Minmatar Fuel block blueprint creates 40 blocks. |
|
|
|
|
Pages: [1] 2 3 :: one page |
First page | Previous page | Next page | Last page |