Skip to content
Snippets Groups Projects
Commit 805063bf authored by Lukas's avatar Lukas Committed by mcfarhat
Browse files

Add new methods to fetch single post data

parent 93125e4e
No related branches found
No related tags found
1 merge request!483Lbudginas/#385 single post page
......@@ -32,6 +32,8 @@ type ExplorerNodeApi = {
};
condenser_api: {
get_witnesses_by_vote: TWaxApiRequest<unknown[], Hive.WitnessesByVote>;
get_content: TWaxApiRequest<unknown[], Hive.Content>;
get_content_replies: TWaxApiRequest<unknown[], Hive.Content>;
};
};
......@@ -233,6 +235,25 @@ class FetchingService {
params
);
}
async getContent(
accountName: string,
permlink: string
): Promise<Hive.Content> {
return await this.extendedHiveChain!.api.condenser_api.get_content([
accountName,
permlink,
]);
}
async getContentReplies(
accountName: string,
permlink: string
): Promise<Hive.Content> {
return await this.extendedHiveChain!.api.condenser_api.get_content_replies([
accountName,
permlink,
]);
}
async getOperationTypes(): Promise<Hive.OperationPattern[]> {
return await this.extendedHiveChain!.restApi["hafah-api"].operationTypes();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment