Skip to content

Commit

Permalink
Merge pull request #21 from esi/add-item-to-location-type-resolver
Browse files Browse the repository at this point in the history
Add item to location type resolver
  • Loading branch information
gitAskur authored Dec 3, 2019
2 parents cb1e162 + a7d8329 commit 16d2a0a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions eve_glue/location_type.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
"""Helpers for resolving the location type by ID."""


def resolve_location_type_enum(location_type_id):
"""Resolve the location type ID to name."""
def resolve_location_type_enum(location_id):
"""Resolve the location item ID to its type name."""

if 30000000 <= location_type_id <= 39999999:
if 30000000 <= location_id <= 39999999:
return "solar_system"
if 60000000 <= location_type_id < 64000000:
if 60000000 <= location_id < 64000000:
return "station"
if location_id >= 100000000:
return "item"

return "other"

0 comments on commit 16d2a0a

Please sign in to comment.