eve-val / evelink Goto Github PK
View Code? Open in Web Editor NEWPython bindings for the EVE API.
License: Other
Python bindings for the EVE API.
License: Other
Hey all!
I'm trying to use evelink's char to get a list of certificate IDs for my character, but it doesn't seem to be working. char.character_sheet().result['certificates'] is an empty set.
So far everything else seems to be working correctly (skills, Pilot ID, skill in training, etc) except that. Am I doing something wrong, or is this a legitimate bug? I'm on the pip install version, which is 0.3.1.
Thanks!
As per http://wiki.eve-id.net/APIv2_Char_IndustryJobs_XML
Invention/completedStatus:
0 = failed
1 = delivered
2 = aborted
3 = GM aborted
4 = inflight unanchored
5 = destroyed
If it's not ready yet, completed = 0 and completedStatus is irrelevant/uninitialized/probably 0
If complete = 1 and status = 0, then it failed
Currently evelink returns failed on a job in-progress when it should be reporting something like 'in-progess' or whatever else what might be suitable.
The problem is here https://github.com/eve-val/evelink/blob/master/evelink/constants.py#L31 , and in the parser.
Do you agree? It should be a fairly easy fix.
The EVE-Online API has supported GZIP-Compression for a while now. (Source: https://forums.eveonline.com/default.aspx?g=posts&m=2334177#post2334177)
I would be beneficial if evelink would support this as well. Mostly for Asset dumps which can grow larger in size. (Mine have been over 10MB in size in the past.)
It would require manual adding of the Accept-encoding header and checking of the result is zipped/unzipping it.
The easiest way to include this would be to add a optional parameter for the API-Object on initialization which enables compression.
There will be a dev blog out very soon, but as a heads up here are some upcoming API changes if you are interested in updating: https://forums.eveonline.com/default.aspx?g=posts&m=4318803
Not really an "issue" I know, but seemed the best way to give you a heads up.
the new
def wallet_journal(self, before_id=None, limit=None, api_result=None):
in corp.py is missing the accountKey parameter to select the wallet
old:
def wallet_journal(self, before_id=None, limit=None, accountKey=None):
Why would you hide the currentTime and cachedUntil metadata?
I currently use evelink for a fairly decent sized project, but since there is no way to know the cache times I am going to have to either rewrite the whole thing (no time) or roll something that can do so :/
Edit:
Other then that I like it, good work! :-)
When an asset is in station, the location ID can be converted to a station ID:
http://wiki.eve-id.net/APIv2_Corp_AssetList_XML
evelink.parsing.assets.parse_assets could do the conversion and add a station key to every item result in station. It would be a dict holding the station id and a boolean indicating if the station is NPC (with all attributes in the static data dump) or conquerable (listed at eve/ConquerableStationList.xml.aspx).
It would be up to the user to query the correct data source to get the station name or owner.
nosetests --with-gae
Traceback (most recent call last):
File "/Users/dinoboff/dev/evelink/tests/test_appengine.py", line 47, in test_cache_memcache
self.assertEqual(cache.get('bar'), 1)
AssertionError: None != 1
Ran 130 tests in 1.880s
The following patch to evelink/parsing/wallet_transactions.py will handle that (as the tax fields were handled in parsing/wallet_journal.py):
http://www.uvm.edu/~fcs/EVELink_corp_WalletTransaction.patch
Hello.
CCP would very much like everyone to provide a User-Agent when talking to the API, so they know who to blame/contact if someone is banned/doing bad stuff :-)
15:13 %[CCP]FoxFour | Yes please
15:13 %[CCP]FoxFour | always add user agent :)
15:13 %[CCP]FoxFour | Me likes
15:15 %[CCP]FoxFour | No complaints 15:15 %[CCP]FoxFour | Just nice to know who to contact when things go book
15:15 %[CCP]FoxFour | :)
https://github.com/eve-val/evelink/blob/master/evelink/api.py#L307 Seems to be where it's needed.
I just wanted to ask here if anyone else think it's a good idea, and perhaps have an idea on how to add it :-)
A number of various changes to the EVE API are scheduled to be released with the Crius patch (plus, there are some that came out already, like those mentioned in #159, which we still haven't added support for). Unfortunately, EVE API documentation sucks, and EVE API change documentation sucks even more.
In order to actually comprehensively update EVELink to support the changes up to Crius we need to know what all of the changes are so that we can track update progress. This issue is for that purpose.
2014-03-07
API Changes on SiSi
2014-06-04
POCOs and Wars coming to an API near you!
2014-06-18
Upcoming API Changes for Industry
(If you know of any other relevant posts, please add them to the comment thread.)
https://github.com/bboe/update_checker
Basically just needs to do this in a suitable place (init.py?)
__version__ = '0.3.0' # This will need to be defined somewhere (or grabbed from package ?)
from update_checker import update_check
update_check(__name__, __version__)
This is what PRAW uses if you have used that, it will tell you if there is a newer version of the library available.
I figured this might be something that could be nice for evelink too? :-)
Made the issue instead of a pull-request because I was a bit unsure where it would be best to put this.
AppEngineAPI.get hasn't been updated for the new expected result.
status should be set to pending if the begin time has not happened yet, it would also be cool to show return the difference between installTime and beginTime, but that should perhaps be up to the API user.
Currently it's showing in-progress for something that is pending. Technically speaking the job is in progress but it's waiting in a queue and in-game it shows as Pending.
I suggest comparing the dates with arrow.
I have not looked but I guess the same goes for corporation, but I assume that uses the same parser.
Happy new years by the way :-)
As mentioned in the following posts:
https://forums.eveonline.com/default.aspx?g=posts&m=1983409#post1983409
https://forums.eveonline.com/default.aspx?g=posts&m=1988780#post1988780
it is sometimes useful to know how long the results from a given call will be hitting cache.
Notes from reply in-thread:
I think that there's probably two kinds of data from the EVE API - some of it, no one really cares about cache times on because it either doesn't change or changes frequently enough that you can just assume it updates every X minutes and be fine.
The rest of it actually has some meaningful cache duration (say, an hour). It seems like the latter is what we really want to expose cache expiry timestamps for, and that could probably be worked into the returned data structures in a meaningful way (probably as an cache_expiry_ts or some such).
http://wiki.eve-id.net/APIv2_Corp_Standings_XML
Note that the format is very similar to char/Standings, but the wrapper tag is different.
Since odyssey, failed api call return a 4xx or 5xx code. Those http codes raise exception in API.send_request.
As a result, the error element in a failed responses are never parsed; APIError exceptions are never raised and failed request are never cached.
member tracking request** sent with extended=0 parameter with receive an extended type response. If the key doesn't permission the request will fail.
Instead, the request should be sent without "extended" parameter.
** http://wiki.eveonline.com/en/wiki/EVE_API_Corporation_Member_Tracking
I doubt it's possible since there's so many async library (tornado, twisted, tasklet...).
However evelink could delegate the I/O operations to those libraries and keep doing the parsing... Maybe something like that:
https://github.com/dinoboff/evelink/blob/master/tests/test_appengine.py#L165
In that example, AppEngineAPI has a "get_async" method with return a Future object (the yield used in the tasklet allows other concurrent tasklet to run while the I/O operation complete and automatically return the result out of the Future object); then the result is given to eve.EVE.character_info_from_id via the extra argument "api_result".
The Asset api now enables us to differentiate BPO's and BPC's (http://community.eveonline.com/news/dev-blogs/2324)
However evelink doesn't provide this information currently. The information is encoded in the rawQuantity which is only present when required,
Example rows:
<row itemID="374680079" locationID="60012577" typeID="973" quantity="1" flag="4" singleton="1" rawQuantity="-2"/>
<row itemID="390029855" locationID="60012577" typeID="16243" quantity="1" flag="4" singleton="1" rawQuantity="-1"/>
From eve-dev:
New field - rawQuantity
Items in the AssetList (and ContractItems) now include a rawQuantity attribute if the quantity in the DB is negative. Negative quantities are in fact codes, -1 indicates that the item is a singleton (non-stackable). If the item happens to be a Blueprint, -1 is an Original and -2 is a Blueprint Copy. For further information about negative quantities see this devblog http://www.eveonline.com/devblog.asp?a=blog&nbid=2324
I noticed that caching won't work correctly on python 3 and tracked it down to the hash()
function used in def _cache_key()
The problem is that beginning with python 3.3 hash randomization is enabled by default, so with every launch of the app (or with more then one process) the cache key is different even for the same api calls.
https://docs.python.org/3/reference/datamodel.html#object.__hash__
It's possible to change the behavior with an environment variable, but perhaps it's better to use something from hashlib ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.