forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK] update typescript sdk to get /get_table_item
- Loading branch information
1 parent
c6163c2
commit 97d03e6
Showing
2 changed files
with
224 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-disable */ | ||
/* tslint:disable */ | ||
/* | ||
* --------------------------------------------------------------- | ||
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## | ||
* ## ## | ||
* ## AUTHOR: acacode ## | ||
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ## | ||
* --------------------------------------------------------------- | ||
*/ | ||
|
||
import { AptosError, TableItemRequest } from "./data-contracts"; | ||
import { ContentType, HttpClient, RequestParams } from "./http-client"; | ||
|
||
export class Tables<SecurityDataType = unknown> { | ||
http: HttpClient<SecurityDataType>; | ||
|
||
constructor(http: HttpClient<SecurityDataType>) { | ||
this.http = http; | ||
} | ||
|
||
/** | ||
* @description Gets a table item for a table identified by the handle and the key for the item. Key and value types need to be passed in to help with key serialization and value deserialization. | ||
* | ||
* @tags state, table | ||
* @name GetTableItem | ||
* @summary Get table item by handle and key. | ||
* @request POST:/tables/{table_handle}/items | ||
*/ | ||
getTableItem = (tableHandle: string, data: TableItemRequest, params: RequestParams = {}) => | ||
this.http.request<object, AptosError>({ | ||
path: `/tables/${tableHandle}/items`, | ||
method: "POST", | ||
body: data, | ||
type: ContentType.Json, | ||
format: "json", | ||
...params, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters