Skip to content

Commit b7eddaf

Browse files
committed
Fix httpClient method signatures
1 parent d2a578a commit b7eddaf

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/client/src/httpClient.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,19 @@ export class AlephHttpClient {
6767
*
6868
* @param config The configuration used to fetch a post message.
6969
*/
70-
async getPosts<T = any>(config: PostGetConfiguration) {
70+
async getPost<T = any>(config: PostGetConfiguration) {
7171
return await this.postClient.get<T>(config)
7272
}
7373

74+
/**
75+
* Fetches multiple POST messages on the Aleph network. POST messages are used to store arbitrary JSON data on the Aleph network.
76+
*
77+
* @param config The configuration used to fetch a post message.
78+
*/
79+
async getPosts<T = any>(config: PostGetConfiguration) {
80+
return await this.postClient.getAll<T>(config)
81+
}
82+
7483
/**
7584
* Downloads a file from the Aleph network.
7685
*
@@ -94,7 +103,7 @@ export class AlephHttpClient {
94103
*
95104
* @param itemHash The hash of the message to fetch.
96105
*/
97-
async get_message<T extends MessageType | 'any' = 'any', Content = any>(itemHash: string) {
106+
async getMessage<T extends MessageType | 'any' = 'any', Content = any>(itemHash: string) {
98107
return await this.messageClient.get<T, Content>({ hash: itemHash })
99108
}
100109

0 commit comments

Comments
 (0)