Skip to content
Snippets Groups Projects
Commit 11df2ae2 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

get_blog/get_blog_entries calls switched into condenser API (removed usage of...

get_blog/get_blog_entries calls switched into condenser API (removed usage of deprecated follow_api)
parent b4bcf567
No related branches found
No related tags found
1 merge request!9Eliminated usage of HF24 deprecated follow_api
...@@ -862,14 +862,14 @@ class Account(BlockchainObject): ...@@ -862,14 +862,14 @@ class Account(BlockchainObject):
if self.blockchain.rpc.get_use_appbase(): if self.blockchain.rpc.get_use_appbase():
try: try:
if raw_data and short_entries: if raw_data and short_entries:
ret = self.blockchain.rpc.get_blog_entries({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='follow') ret = self.blockchain.rpc.get_blog_entries({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='condenser')
if isinstance(ret, dict) and "blog" in ret: if isinstance(ret, dict) and "blog" in ret:
ret = ret["blog"] ret = ret["blog"]
return [ return [
c for c in ret c for c in ret
] ]
elif raw_data: elif raw_data:
ret = self.blockchain.rpc.get_blog({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='follow') ret = self.blockchain.rpc.get_blog({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='condenser')
if isinstance(ret, dict) and "blog" in ret: if isinstance(ret, dict) and "blog" in ret:
ret = ret["blog"] ret = ret["blog"]
return [ return [
...@@ -877,7 +877,7 @@ class Account(BlockchainObject): ...@@ -877,7 +877,7 @@ class Account(BlockchainObject):
] ]
elif not raw_data: elif not raw_data:
from .comment import Comment from .comment import Comment
ret = self.blockchain.rpc.get_blog({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='follow') ret = self.blockchain.rpc.get_blog({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='condenser')
if isinstance(ret, dict) and "blog" in ret: if isinstance(ret, dict) and "blog" in ret:
ret = ret["blog"] ret = ret["blog"]
return [ return [
...@@ -889,17 +889,17 @@ class Account(BlockchainObject): ...@@ -889,17 +889,17 @@ class Account(BlockchainObject):
if not self.blockchain.rpc.get_use_appbase() or not success: if not self.blockchain.rpc.get_use_appbase() or not success:
if raw_data and short_entries: if raw_data and short_entries:
return [ return [
c for c in self.blockchain.rpc.get_blog_entries(account, start_entry_id, limit, api='follow') c for c in self.blockchain.rpc.get_blog_entries(account, start_entry_id, limit, api='condenser')
] ]
elif raw_data: elif raw_data:
return [ return [
c for c in self.blockchain.rpc.get_blog(account, start_entry_id, limit, api='follow') c for c in self.blockchain.rpc.get_blog(account, start_entry_id, limit, api='condenser')
] ]
else: else:
from .comment import Comment from .comment import Comment
blog_list = self.blockchain.rpc.get_blog(account, start_entry_id, limit, api='follow') blog_list = self.blockchain.rpc.get_blog(account, start_entry_id, limit, api='condenser')
if blog_list is None: if blog_list is None:
return [] return []
return [ return [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment