forked from Python3pkg/Crypto-Balances
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All api urls have been moved to config file. Implemented parser of co…
…nfig. Changed all relative imports to absolute.
- Loading branch information
1 parent
4357a8a
commit cffe134
Showing
11 changed files
with
61 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from .checker import get_balance | ||
from cryptobalances.checker import get_balance | ||
|
||
|
||
__all__ = ["get_balance"] | ||
__version__ = '0.9' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
from .services.chain_so import pull_request as chain_request | ||
from .services.ethereum import pull_request as eth_request | ||
from .services.doge import pull_request as doge_request | ||
from cryptobalances.validator import autodetect_currency | ||
from cryptobalances.services.chain_so import pull_request as chain_request | ||
from cryptobalances.services.ethereum import pull_request as eth_request | ||
from cryptobalances.services.doge import pull_request as doge_request | ||
from cryptobalances.services.counterparty import pull_request as xcp_request | ||
|
||
|
||
def get_balance(currency, identifier): | ||
|
||
auto_currency = autodetect_currency(identifier) | ||
|
||
if auto_currency: | ||
currency = auto_currency | ||
|
||
if currency == 'BTC': | ||
return chain_request(currency, identifier) | ||
elif currency == 'LTC': | ||
return chain_request(currency, identifier) | ||
elif currency == 'ETH': | ||
return eth_request(identifier) | ||
return eth_request(currency, identifier) | ||
elif currency == 'DOGE': | ||
return doge_request(identifier) | ||
return doge_request(currency, identifier) | ||
elif currency == 'XCP': | ||
return xcp_request(currency, identifier) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
from .chain_so import pull_request as chain_request | ||
from .ethereum import pull_request as eth_request | ||
from .doge import pull_request as doge_request | ||
from cryptobalances.services.chain_so import pull_request as chain_request | ||
from cryptobalances.services.ethereum import pull_request as eth_request | ||
from cryptobalances.services.doge import pull_request as doge_request | ||
from cryptobalances.services.counterparty import pull_request as xcp_request | ||
|
||
|
||
__all__ = ["chain_request", "eth_request", "doge_request"] | ||
__all__ = ["chain_request", "eth_request", "doge_request", 'xcp_request'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,16 @@ | |
version=cryptobalances.__version__, | ||
author='Aliaksandr Leonau', | ||
author_email='[email protected]', | ||
packages=find_packages(), | ||
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), | ||
package_data={ | ||
'cryptobalances': ['data/*.json'], | ||
}, | ||
description='Python module for getting the balance of a various crypto currency', | ||
long_description=open(join(dirname(__file__), 'README.rst')).read(), | ||
url='https://github.com/AleksandrLeonov/Crypto-Balances', | ||
platforms='Linux', | ||
entry_points={ | ||
'console_scripts': ['main=cryptobalances.main:main'], | ||
} | ||
}, | ||
test_suite='tests' | ||
) |