Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Release 0.4.4
Browse files Browse the repository at this point in the history
Fix URL for RPC object
  • Loading branch information
holgern committed Apr 25, 2019
1 parent c03c444 commit 6ca253f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
* Add amount quantization to deposit, withdraw, buy and sell
* Add transfer, issue, withdraw, deposit, buy, sell, cancel, buybook, sellbook to CLI

## 0.4.4
* Fix URL for RPC object

## 0.4.3
* Change URL also in RPC object

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ascii = codecs.lookup('ascii')
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs'))

VERSION = '0.4.3'
VERSION = '0.4.4'

tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock', 'parameterized']

Expand Down
7 changes: 5 additions & 2 deletions steemengine/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
class Api(object):
""" Access the steem-engine API
"""
def __init__(self, url=None, user=None, password=None, **kwargs):
def __init__(self, url=None, rpcurl=None, user=None, password=None, **kwargs):
if url is None:
self.url = 'https://api.steem-engine.com/'
else:
self.url = url
self.rpc = RPC(url=url)
if url is not None and rpcurl is None:
self.rpc = RPC(url=url)
else:
self.rpc = RPC(url=rpcurl)

def get_history(self, account, symbol, limit=1000, offset=0, histtype="user"):
""""Get the transaction history for an account and a token"""
Expand Down
6 changes: 3 additions & 3 deletions steemengine/market.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class Market(list):
:param Steem steem_instance: Steem
instance
"""
def __init__(self, url=None, steem_instance=None):
self.api = Api(url=url)
def __init__(self, url=None, rpcurl=None, steem_instance=None):
self.api = Api(url=url, rpcurl=rpcurl)
self.steem = steem_instance or shared_steem_instance()
self.tokens = Tokens()
self.tokens = Tokens(url=url, rpcurl=rpcurl)
self.refresh()

def refresh(self):
Expand Down
2 changes: 1 addition & 1 deletion steemengine/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self, url=None, user=None, password=None, **kwargs):
if url is None:
self.url = 'https://api.steem-engine.com/rpc/'
else:
self.url = url + 'rpc/'
self.url = url
self.session = shared_session_instance()
self.headers = {'User-Agent': 'steemengine v%s' % (steemengine_version),
'content-type': 'application/json'}
Expand Down
4 changes: 2 additions & 2 deletions steemengine/tokenobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class Token(dict):
:param str token: Name of the token
"""
def __init__(self, symbol, url=None):
self.api = Api(url=url)
def __init__(self, symbol, url=None, rpcurl=None):
self.api = Api(url=url, rpcurl=rpcurl)
if isinstance(symbol, dict):
self.symbol = symbol["symbol"]
super(Token, self).__init__(symbol)
Expand Down
4 changes: 2 additions & 2 deletions steemengine/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
class Tokens(list):
""" Access the steem-engine tokens
"""
def __init__(self, url=None, **kwargs):
self.api = Api(url=url)
def __init__(self, url=None, rpcurl=None, **kwargs):
self.api = Api(url=url, rpcurl=rpcurl)
self.refresh()

def refresh(self):
Expand Down
2 changes: 1 addition & 1 deletion steemengine/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
version = '0.4.3'
version = '0.4.4'
4 changes: 2 additions & 2 deletions steemengine/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class Wallet(list):
print(wallet)
"""
def __init__(self, account, url=None, steem_instance=None):
self.api = Api(url=url)
def __init__(self, account, url=None, rpcurl=None, steem_instance=None):
self.api = Api(url=url, rpcurl=rpcurl)
self.steem = steem_instance or shared_steem_instance()
check_account = Account(account, steem_instance=self.steem)
self.account = check_account["name"]
Expand Down

0 comments on commit 6ca253f

Please sign in to comment.