Giter Site home page Giter Site logo

evelink's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evelink's Issues

character_sheet returns empty certificates set object

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!

Feature request: add station IDs to evelink.parsing.assets.parse_assets results

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.

Google app engine test fail

nosetests --with-gae

......................................F...........................................................................................

FAIL: test_cache_memcache (tests.test_appengine.MemcacheCacheTestCase)

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

Implement update_checker

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.

char/industry_jobs seems to be returning status = failed prematurely.

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.

corp wallet_journal is missing the accountKey parameter

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):

API metadata should be available to the user.

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! :-)

Cache expiry time should be accessible to users

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).

Add support for GZIP Compression

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.

Review api error handling

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.

Add support for BPO/BPC Differentiation

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

Add customizable User-Agent

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 :-)

Add support for asynchronous operation

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".

Industry Jobs does not correctly show a manufacturing job (or any job?) that is pending.

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 :-)

Summarize and research API changes for which EVELink needs updates

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.


Dev blogs and forum posts

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.)

cache bug with python 3

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 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.