Commit graph

46 commits

Author SHA1 Message Date
3a25c73e56 me == stoopid 2020-10-21 03:22:19 +02:00
be921a4f83 cmdr model: fixed for hidden activity 2020-09-29 11:07:00 +02:00
0f452ae401 Positinable.distanceTo is now single dispatch
… but a) that only works for methods in 3.8 so I had to use a wrapper
and b) I don’t know if/how I can actually check for an instance of
Positionable as argument … so it’s kind of half of what I wanted it to
be.
2020-01-17 17:52:58 +01:00
dc18cbb914 Commander.lastActivity is now a proper datetime 2020-01-16 18:16:07 +01:00
82519b9d66 fixed cmdr profile url handling
Will now properly react to a public commander with a hidden profile.
2020-01-13 22:53:24 +01:00
a2c9fb1540 reworded exception messages
now more human readable, less debugging focused
2020-01-13 22:23:02 +01:00
9661e62852 Revert "test data changed"
This reverts commit afde1c4ca2.
2020-01-13 22:13:47 +01:00
f280919e1a spring cleaning 2020-01-13 21:53:40 +01:00
b476c34de5 system list now sorted by default 2020-01-08 14:52:02 +01:00
7c20bc4284 Systems are now comparable! 2020-01-08 14:45:31 +01:00
8e27ffd30e removed obsolete import 2020-01-08 14:40:02 +01:00
318ad17011 implemented Systems endpoint of the Systems API 2020-01-08 13:42:17 +01:00
ef36127bb9 added distaneTo to Commander and System models
They do now implement a “Positionable” interface that allows to
calculate distances to other Positionables or a dict of x,y,z
coordinates.
2020-01-08 11:14:18 +01:00
3909728056 removed obsolete cache.py 2019-12-27 01:24:07 +01:00
c5e5a12086 indentation 2019-12-26 23:57:03 +01:00
14b9fb4965 fixed get parameter handling
Starting to learn how to do things the Python way … it’s a rocky road :)
2019-12-26 23:53:38 +01:00
afde1c4ca2 test data changed
somehow our test planet is now appearing as tidally locked in the database when
it wasn’t before; even though orbital period is still ≠ rotational period.
2019-12-26 23:50:51 +01:00
105a08a683 added Commander model and logs/get-position endpoint 2019-11-24 22:39:18 +01:00
ce11595a38 fixed some test case style … 2019-11-24 22:27:13 +01:00
ca57e86d22 made exception.ServerError more descriptive 2019-11-24 21:58:16 +01:00
8fa672ba28 systemsApi: fixed SystemNotFoundError message 2019-11-24 21:58:16 +01:00
2877d97102 fixed wonky system names
Now url ecoding system names. Fixes problems with e.g. `+`
(BD+<something>) and `[]` in system names.

fixes #1
2019-11-12 10:06:57 +01:00
3c93f24966 docstring copypasta error 2019-11-02 00:58:48 +01:00
f0a54a7fe4 added bodyCount property to System model 2019-10-04 00:07:11 +02:00
d3a4a876ac added Bodies endpoint for the System API
without the actual model for bodies yet, because the first thing I need
is adding a `bodyCount` to the `System` model …
2019-10-04 00:00:17 +02:00
5c22a52291 fetch() now returns self 2019-09-22 03:55:22 +02:00
ed79aaae5d completely refactored models.System
It now allows for

a) instancing with name, id and coords; this will be useful for the
systemAPI implementation that returns lists of systems
b) on-demand fetching data from the API
2019-09-22 03:39:51 +02:00
a3928fbc89 did i forget something? nah. 2019-09-18 16:34:31 +02:00
381f2ea09a added ALL the missing docstrings 2019-09-18 16:09:50 +02:00
db59cd39c1 fixed docstring copypasta error 2019-09-18 16:08:25 +02:00
9e48c8fd30 defaulted optional attributes to None 2019-09-18 16:05:48 +02:00
ec5964db21 Status.lastUpdate is now a proper datetime 2019-09-18 15:59:14 +02:00
2885df1a02 removed deprecated empty default parameter for System() 2019-09-18 15:52:21 +02:00
ec8054912b implementet “status” API 2019-09-18 15:44:32 +02:00
7c9368d273 added default (empty) quary params 2019-09-18 14:31:58 +02:00
573c6c322f fixed exceptions’ __str__() methods. python newb. 2019-09-18 13:53:24 +02:00
13d766a2b9 Fixed query(). You know, inheritance and shit. It’s a thing. 2019-09-18 13:18:16 +02:00
f95326e1f5 fixed Exception naming …
m)
2019-09-18 13:14:23 +02:00
3ba1cfc618 added the rest of the systemsApi.System methods 2019-09-18 11:01:18 +02:00
6325bb72d6 added unittests for the “new” systemsApi module 2019-09-18 11:00:51 +02:00
f61990027b changed System.ids() to return a dict instead of a tuple 2019-09-18 10:34:48 +02:00
4cd572e788 changed the internal modus operandi
API endpoints now just return the raw JSON response. The way to get an
actual object will now always be through the models.
2019-09-18 10:34:04 +02:00
a283e7c97a … not all systems in the DB have id64s yet apparently … 2019-09-18 10:19:24 +02:00
66ace44a62 @classmethods and System model moved to models module
Hey, I think I have now properly understood the difference between
@classmethod and @staticmethod, and that I will probably never again
even try using the latter …
2019-09-17 13:52:49 +02:00
adc6b0285f some usefuel properties 2019-09-17 13:40:19 +02:00
47c9f34a5c Initial working … thing.
Right now can only query full systems from the systems API.
2019-09-17 13:26:13 +02:00