Migrates the API out of the yunwah/tennoui repository. The warframe_api.py file is renamed to warpy.py and the API class has been renamed to Worldstate. This rename came about as a result of what parts of the API were implemented. Next steps may include the static data processing part of the API as its own class. Additionally this commit aims to make the library installable however there are no current test files so it may fail. From testing with the interface after installing this current state of warpy works as is. The following are changes made to the API wrapper: Exceptions - used for non valid platforms and languages. Language headers - API now supports getting back results in different languages, the default being en.
29 lines
815 B
Python
29 lines
815 B
Python
import setuptools
|
|
import os
|
|
import codecs
|
|
|
|
cwd = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
def read(rel_path):
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
|
|
return fp.read()
|
|
|
|
def get_version(rel_path):
|
|
for line in read(rel_path).splitlines():
|
|
if line.startswith('__version__'):
|
|
delim = '"' if '"' in line else "'"
|
|
return line.split(delim)[1]
|
|
else:
|
|
raise RuntimeError("Unable to find version string.")
|
|
|
|
|
|
setuptools.setup(
|
|
name='warpy',
|
|
version=get_version('warpy/__init__.py'),
|
|
author='yunwah',
|
|
description='An asynchronous API wrapper for the unofficial WarframeStat.us API.',
|
|
url='https://github.com/yunwah/warpy',
|
|
packages=setuptools.find_packages()
|
|
) |