Skip to content

Commit

Permalink
Fix httpClient method signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Mar 8, 2024
1 parent d2a578a commit b7eddaf
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/client/src/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,19 @@ export class AlephHttpClient {
*
* @param config The configuration used to fetch a post message.
*/
async getPosts<T = any>(config: PostGetConfiguration) {
async getPost<T = any>(config: PostGetConfiguration) {
return await this.postClient.get<T>(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<T = any>(config: PostGetConfiguration) {
return await this.postClient.getAll<T>(config)
}

/**
* Downloads a file from the Aleph network.
*
Expand All @@ -94,7 +103,7 @@ export class AlephHttpClient {
*
* @param itemHash The hash of the message to fetch.
*/
async get_message<T extends MessageType | 'any' = 'any', Content = any>(itemHash: string) {
async getMessage<T extends MessageType | 'any' = 'any', Content = any>(itemHash: string) {
return await this.messageClient.get<T, Content>({ hash: itemHash })
}

Expand Down

0 comments on commit b7eddaf

Please sign in to comment.