Skip to content

Commit

Permalink
properly use register_apis and api_id
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Jul 10, 2018
1 parent a176d61 commit 5ef1830
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 8 additions & 1 deletion grapheneapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def __init__(self, urls, user="", password="", **kwargs):
self._active_url = None
self.connect()

@property
def api_id(self):
return self.connection.api_id

@property
def connection(self):
if self._active_url != self.url:
Expand All @@ -47,7 +51,10 @@ def connect(self):
self.error_url()
self.next()
self._active_url = self.url
self.connection.register_apis()
self.register_apis()

def register_apis(self):
pass

def find_next(self):
""" Find the next url in the list
Expand Down
3 changes: 0 additions & 3 deletions grapheneapi/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ def get_request_id(self):
self._request_id += 1
return self._request_id

def register_apis(self):
pass

def connect(self):
pass

Expand Down

0 comments on commit 5ef1830

Please sign in to comment.