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

Merge branch 'dk-pre-appbase-api-support' into 'develop'

Pre appbase api support

See merge request !241
parents 8f305e81 ab21439b
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!261Mi livesync hot and trends2,!249Mi hot and trends livesync,!241Pre appbase api support
"""Handles legacy `call` method.""" """Handles legacy `call` method."""
from hive.server.condenser_api.cursor import get_account_reputations, get_reblogged_by
from hive.server.common.helpers import ( from hive.server.common.helpers import (
ApiError, ApiError,
return_error_info, return_error_info,
...@@ -7,7 +8,7 @@ from hive.server.common.helpers import ( ...@@ -7,7 +8,7 @@ from hive.server.common.helpers import (
from hive.server.condenser_api.get_state import get_state from hive.server.condenser_api.get_state import get_state
from hive.server.condenser_api.tags import get_trending_tags from hive.server.condenser_api.tags import get_trending_tags
from hive.server.condenser_api.methods import ( from hive.server.condenser_api.methods import (
get_followers, get_active_votes, get_followers,
get_following, get_following,
get_follow_count, get_follow_count,
get_content, get_content,
...@@ -92,6 +93,11 @@ async def call(context, api, method, params): ...@@ -92,6 +93,11 @@ async def call(context, api, method, params):
elif method == 'get_follow_count': elif method == 'get_follow_count':
return await get_follow_count(context, *_strict_list(params, 1)) return await get_follow_count(context, *_strict_list(params, 1))
elif method == 'get_reblogged_by':
return await get_reblogged_by(context, *_strict_list(params, 2))
elif method == 'get_account_reputations':
return await get_account_reputations(context, *_strict_list(params, 2))
# Content primitives # Content primitives
elif method == 'get_content': elif method == 'get_content':
return await get_content(context, *_strict_list(params, 3, 2)) return await get_content(context, *_strict_list(params, 3, 2))
...@@ -141,5 +147,7 @@ async def call(context, api, method, params): ...@@ -141,5 +147,7 @@ async def call(context, api, method, params):
# Misc/dummy # Misc/dummy
elif method == 'get_account_votes': elif method == 'get_account_votes':
return await get_account_votes(context, *_strict_list(params, 1)) return await get_account_votes(context, *_strict_list(params, 1))
elif method == 'get_active_votes':
return await get_active_votes(context, *_strict_list(params, 2))
raise ApiError("unknown method: %s.%s" % (api, method)) raise ApiError("unknown method: %s.%s" % (api, method))
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