Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 .. 15 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 2 post(s) |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 13:23:54 -
[181] - Quote
Its just very cumbersome to use in most relevant scenarios, it seems to be designed around some theoretic ideal instead of realistic use cases. The Auth mechanism was always intended for HTTP/browsers, as its using OAuth, which is fine. Theres a module for it in EveLib, EveAuth. You need to log in using your browser once to retrieve the authorization code, but the library will handle the rest from there, no redirects needed, just copy it from your browser and provide it to the Auth object.
edit: Speaking of crest, why is the refresh token blank/null now, I'm certain it wasn't before... Did I miss something ? |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.12 13:25:56 -
[182] - Quote
I thought that in order to use it, you have to register an application with CCP and provide a URL call back address? |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 13:35:32 -
[183] - Quote
Register you application here https://developers.eveonline.com/ Set the callback to / Go to https://login.eveonline.com/oauth/authorize/?response_type=code&redirect_uri=/&client_id=YOUR-APP-ID-HERE&scope=&state=devstate and login. The URL in your browser will change, providing you with an auth code. Use that to obtain a refresh token, either through EveAuth or some HTTP client. Store the refresh token somewhere, it can be used indefinitely, and give that to EveAuth when you create a new object :) |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 14:09:26 -
[184] - Quote
Im writing up a quick utility now to make it easier to get refresh tokens, give me a few minutes. Then you shouldn't have to use EveAuth, just run the tool, get your refreshtoken and provide that to EveCrest in EveLib. |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 15:00:11 -
[185] - Quote
Here's a small CLI to assist in obtaining the access- and refresh tokens. It's very rudimentary, but it should do the job. Just follow the instructions, and ask here if there's any issues.
https://github.com/ezet/evelib/releases/download/v1.0-EveAuthUtil/EveAuthUtility.rar
The source is on github as part of evelib, and it uses EveAuth for the actual authentication process :) |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.12 15:09:53 -
[186] - Quote
I may be an idiot, but when I paste in the full url it tells me it is unable to locate the authentication code. Can I paste in the url, or does it need to be entered manually?
Edit: It looks like for some reason the URL in the browser after I login doesn't contain the &state text |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 15:19:49 -
[187] - Quote
You are completely right, for now just add &state=whatever at the end of the url before pasting it. I'll fix it later :p |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.12 15:22:32 -
[188] - Quote
when calling
EveCrest crest = new EveCrest("I know the refresh token goes here", encodedKey);
What is the encodedKey?
Thanks again for all your help. It is nice to know I can ask the basic questions. |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 15:26:00 -
[189] - Quote
It's the base64 encoded clientId + secretKey. Give me 5 minutes and I'll sort these things and upload a new version :) |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 15:36:28 -
[190] - Quote
https://github.com/ezet/evelib/releases/download/v1.1-EveAuthUtil/EveAuthUtility-v1.1.rar
Let me know how that works :) |
|
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.12 15:43:16 -
[191] - Quote
Awesome man, that works great. I create a new EveCrest object and pass that in. I am able to get an alliance name back |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.12 16:04:47 -
[192] - Quote
Does it work? I honestly don't remember, its been like 8 months since I had a look at the CREST part. The CREST documentation pretty sparse, and the documentation I have is in the readme on github. At this point its still very much a work in progress, sorry. I'll see if have time to look at it again in the next few days, but I'll be leaving shortly so I don't have time to look at it right now |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.12 16:18:48 -
[193] - Quote
Right now it just sort of hangs. I'll dig and see what I can find. The alliance query you give as an example works. So the crest auth is working.
Thanks for everything |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.22 18:33:02 -
[194] - Quote
I have a new stupid question.
I am trying to get the fitting of the last ship the character was in. This is what I have so far
Character character = ckey.Characters.Single(c => c.CharacterName == "KillaGouge"); var inventory = character.GetAssetList(); var lastShip = character.GetCharacterInfo().Result.ShipTypeId;
I am not sure what I'd need to do to inventory to get all the instances of items with the same TypeId as lastShip
I thought it would be inventory.Result.Items.Where(item => item.ItemId == lastShip);
but that doesn't return an object I can foeach through.
Anybody have an idea on how I can be less wrong? |
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.22 19:20:32 -
[195] - Quote
KillaGouge wrote:I have a new stupid question. I am trying to get the fitting of the last ship the character was in. This is what I have so far
Character character = ckey.Characters.Single(c => c.CharacterName == "KillaGouge"); var inventory = character.GetAssetList(); var lastShip = character.GetCharacterInfo().Result.ShipTypeId;
I am not sure what I'd need to do to inventory to get all the instances of items with the same TypeId as lastShip I thought it would be inventory.Result.Items.Where(item => item.ItemId == lastShip); but that doesn't return an object I can foeach through. Anybody have an idea on how I can be less wrong?
The list is returned as a hierarchy of containers, ships, positions and such, so you would have to flatten the list or traverse the hierarchies. If you flatten it completely, you will lose information about what the ship contains. I think I wrote a function called Flatten for that, available on the Result object, or the Items list, cant remember exactly.
edit: check http://wiki.eve-id.net/APIv2_Char_AssetList_XML
You probably want to traverse the tree yourself, and if Im not mistaken you only have to go 2 levels deep, since ships cannot be contained in anything else. So you need to check every location, and then every item in that location. |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.22 19:28:28 -
[196] - Quote
var lastShip = character.GetCharacterInfo().Result.ShipTypeId; var lastShipContainer = inventory.Where(item => item.TypeId == lastShip); foreach (var item in lastShipContainer) { foreach (var subItem in item.Items) { resutlLabel.Text += GetItem(subItem.TypeId).Name; } }
This works. I just need to do some testing for cases where |
Clyde en Marland
Raised By Wolves Inc Nerfed Alliance Go Away
6
|
Posted - 2015.06.23 08:47:18 -
[197] - Quote
I think you missed a bit from your post.
Also (seeing as I'm supposed to be pushing Linq for some reason at work), this line
inventory.Where(item => item.TypeId == character.GetCharacterInfo().Result.ShipTypeId).ToList().ForEach(subItem => resutlLabel.Text = string.Concat(resutlLabel.Text, GetItem(subItem.TypeId).Name));
could replace
var lastShip = character.GetCharacterInfo().Result.ShipTypeId; var lastShipContainer = inventory.Where(item => item.TypeId == lastShip); foreach (var item in lastShipContainer) { foreach (var subItem in item.Items) { resutlLabel.Text += GetItem(subItem.TypeId).Name; } }
The string.Concat method is more resource-usage friendly than += for putting multiple strings together, as += creates a new string in memory. |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.23 14:14:41 -
[198] - Quote
inventory.Where(item => item.TypeId == character.GetCharacterInfo().Result.ShipTypeId).ToList().ForEach(subItem => resutlLabel.Text = string.Concat(resutlLabel.Text, GetItem(subItem.TypeId).Name));
Produces this output
Golem
var lastShip = character.GetCharacterInfo().Result.ShipTypeId; var lastShipContainer = inventory.Where(item => item.TypeId == lastShip); foreach (var item in lastShipContainer) { foreach (var subItem in item.Items) { var itemInfo = GetItem(subItem.TypeId); resutlLabel.Text += itemInfo.Name; } }
Produces this output, which is what I am looking for
Mobile Tractor Unit Cruise Missile Launcher II Bastion Module I Salvager I Caldari Navy Large Shield Booster Pithum C-Type Adaptive Invulnerability Field Adaptive Invulnerability Field II Republic Fleet Target Painter Large Micro Jump Drive Caldari Navy Ballistic Control System Large Warhead Flare Catalyst II Caldari Navy Ballistic Control System Large Warhead Flare Catalyst II Salvager I Republic Fleet Target Painter Republic Fleet Target Painter Caldari Navy Ballistic Control System Caldari Navy Ballistic Control System Salvager I Hornet II Hornet II Hornet II Hornet II Cruise Missile Launcher II Cruise Missile Launcher II Cruise Missile Launcher II
|
Icahmura Hasaki
Bearded BattleBears Brave Collective
16
|
Posted - 2015.06.23 14:41:07 -
[199] - Quote
Anyone have any good ideas for a way to pass parameters when querying crest resources? Such as the market orders, or items in a specific group. They want us to pass along the full crest uri of eg. a ItemType as the parameter, and I can't really think of any good way to do this...
Example: https://api-sisi.testeveonline.com/market/10000002/orders/buy/?type=https://api-sisi.testeveonline.com/types/587/
At the moment I there doesn't seem to be a way to navigate to this from the root? So I'll basically have to construct the URL client side, inserting the region ID and all, which seems to be completely the opposite for how they wanted crest to be used.. ? |
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.23 14:50:25 -
[200] - Quote
couldn't you have a method that takes that information as parameters? So it would be GetMarketData(int regionId) and have overloaded constructors to get to the specifics a call would need?
Disclaimer, I am still new to programming |
|
SJ Astralana
Syncore
104
|
Posted - 2015.06.23 20:30:51 -
[201] - Quote
Icahmura Hasaki wrote:Anyone have any good ideas for a way to pass parameters when querying crest resources? Such as the market orders, or items in a specific group. They want us to pass along the full crest uri of eg. a ItemType as the parameter, and I can't really think of any good way to do this... Example: https://api-sisi.testeveonline.com/market/10000002/orders/buy/?type=https://api-sisi.testeveonline.com/types/587/ At the moment I there doesn't seem to be a way to navigate to this from the root? So I'll basically have to construct the URL client side, inserting the region ID and all, which seems to be completely the opposite for how they wanted crest to be used.. ?
Several of us have ranted on inconsistencies like this -- I had to do the same thing unfortunately. I've surfed the code in this library by the way, the CLI utility is inspired, and overall the library is a damn fine piece of work.
Hyperdrive your production business: Eve Production Manager
|
KillaGouge
DelTacos 212
0
|
Posted - 2015.06.26 01:06:56 -
[202] - Quote
Icahmura, I tried adding the NuGet package to a Universal App project in Visual Studio, but apparently it cannnot because of a .Net version targeting error. Do you know how I would get around this?
Thanks |
Clyde en Marland
Raised By Wolves Inc Nerfed Alliance Go Away
6
|
Posted - 2015.06.26 13:52:14 -
[203] - Quote
KillaGouge wrote:Icahmura, I tried adding the NuGet package to a Universal App project in Visual Studio, but apparently it cannnot because of a .Net version targeting error. Do you know how I would get around this?
Thanks
Change the target .NET Framework of your VS Project to 4.5 |
Brain Gehirn
Reikoku Pandemic Legion
71
|
Posted - 2015.07.11 15:41:38 -
[204] - Quote
Hey,
Talking about market orders, the ID is using int32 but its an int64.
Other than that, what would be the best way to grab the public corporation sheet from the API? I have updated the code from GIT and had to rollback some changes to be able to keep querying for that (since the crest corporation endpoint isnt working yet).
Awesome work on this API dude! It's a really good job. I just had to edit a few things to make it usable / easier to use for me and I will leave it as a suggestion: - Grab all URL information (crest, sso, xml and so on) from the web.config using some specific tag - its easier to test/deploy if you do that - At the config class (evelib.core) you are using a fixed appdata value. I had to change that to: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Separator; (I'm using with a website) so maybe you could do some kind of configuration here to set one or another
Other than that I must have made just a few minor implementations. I'm still getting used to GIT so I might attempt to upload these at some point.
Thanks a lot.
What is a signature?
|
Icahmura Hasaki
Bearded BattleBears Against ALL Authorities
16
|
Posted - 2015.07.12 16:31:39 -
[205] - Quote
Thanks for the feedback. I'm actually aware of all of those, just haven't gotten around to fixing it yet. Feel free to send pull requests if you come up with any good solutions.
Can't you just pull the corporation sheet using the regular XML api ? I'm not sure why you would have to roll back any changes for that to work.
I'll have the int32/64 issue fixed, the others might take some time. Glad you like it :) |
Verite Rendition
F.R.E.E. Explorer
144
|
Posted - 2015.07.15 05:02:33 -
[206] - Quote
Icahmura, does the CREST module work with the new sovereignty structures endpoint, or will a new version be required for that? |
Kuja Armitage
Rogue Drones Dancing Tango
0
|
Posted - 2015.08.08 23:24:36 -
[207] - Quote
This may be a noobish question, but how can I achieve getting results as from query:
https://public-crest.eveonline.com/market/types/?group=https://public-crest.eveonline.com/market/groups/150/
using this library?
My current code wich I think should work doesn't even compile:
var crest = new EveCrest(); var root = crest.GetRoot(); var types = root.Query(r => r.MarketTypes); var skillbooks = types.Query(type => type.Where(t => t.MarketGroup.Id == 150));
Basicly what I'm trying to achieve is to get list of all available skillbooks. |
Icahmura Hasaki
Bearded BattleBears I N F A M O U S
16
|
Posted - 2015.08.09 16:28:49 -
[208] - Quote
Verite Rendition wrote:Icahmura, does the CREST module work with the new sovereignty structures endpoint, or will a new version be required for that?
Wasn't aware of the new endpoint, but I'll have to add that to the next version. Holiday ends next week so I'll get it up then. |
Icahmura Hasaki
Bearded BattleBears I N F A M O U S
16
|
Posted - 2015.08.09 16:40:05 -
[209] - Quote
Kuja Armitage wrote:This may be a noobish question, but how can I achieve getting results as from query: https://public-crest.eveonline.com/market/types/?group=https://public-crest.eveonline.com/market/groups/150/
using this library? My current code wich I think should work doesn't even compile: var crest = new EveCrest(); var root = crest.GetRoot(); var types = root.Query(r => r.MarketTypes); var skillbooks = types.Query(type => type.Where(t => t.Id == 150));
Basicly what I'm trying to achieve is to get list of all available skillbooks.
Yeah, there are some issues with the Query API. I sort of gave up on it because I really didn't like CREST much.
I don't know how to query for that of the top of my head, I'll get back to you when I have the lib available to test it. |
Syrsyrian
Hounds of War. Hashashin Cartel
2
|
Posted - 2015.08.11 19:24:11 -
[210] - Quote
Someone in this thread may be able to help me here. I appear to be having a permissions issue of sorts when I have a .net MVC project using this library deployed.
To give an example the following lines work perfectly fine until it is deployed which then gives me the error that follows.
Character character = new Character(key.keyId, key.vCode, characterId);
var assets = character.GetAssetList().Result.Items;
Once deployed I get: Access to the path '\EveLib\EveXmlCache' is denied.
After doing some searching around I gather I do not have permission to access what I assume is the cached xml from the API calls? Or am I missing something incredibly obvious? |
|
|
|
|
Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 .. 15 :: one page |
First page | Previous page | Next page | Last page |