From b7eddaf9f09cd4c16da9bf7ac51a7bfc1861102d Mon Sep 17 00:00:00 2001 From: mhh Date: Fri, 8 Mar 2024 10:40:30 +0100 Subject: [PATCH] Fix httpClient method signatures --- packages/client/src/httpClient.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/client/src/httpClient.ts b/packages/client/src/httpClient.ts index ef1a84c4..1f47587f 100644 --- a/packages/client/src/httpClient.ts +++ b/packages/client/src/httpClient.ts @@ -67,10 +67,19 @@ export class AlephHttpClient { * * @param config The configuration used to fetch a post message. */ - async getPosts(config: PostGetConfiguration) { + async getPost(config: PostGetConfiguration) { return await this.postClient.get(config) } + /** + * Fetches multiple POST messages on the Aleph network. POST messages are used to store arbitrary JSON data on the Aleph network. + * + * @param config The configuration used to fetch a post message. + */ + async getPosts(config: PostGetConfiguration) { + return await this.postClient.getAll(config) + } + /** * Downloads a file from the Aleph network. * @@ -94,7 +103,7 @@ export class AlephHttpClient { * * @param itemHash The hash of the message to fetch. */ - async get_message(itemHash: string) { + async getMessage(itemHash: string) { return await this.messageClient.get({ hash: itemHash }) }