@@ -25,8 +25,8 @@ type Asset struct {
25
25
DepositEntries []DepositEntry `json:"deposit_entries"`
26
26
}
27
27
28
- func AssetList (ctx context.Context , accessToken string ) ([]* Asset , error ) {
29
- body , err := Request (ctx , "GET" , "/assets" , nil , accessToken )
28
+ func AssetListWithRequestID (ctx context.Context , accessToken , requestID string ) ([]* Asset , error ) {
29
+ body , err := RequestWithId (ctx , "GET" , "/assets" , nil , accessToken , requestID )
30
30
if err != nil {
31
31
return nil , err
32
32
}
@@ -49,8 +49,12 @@ func AssetList(ctx context.Context, accessToken string) ([]*Asset, error) {
49
49
return resp .Data , nil
50
50
}
51
51
52
- func AssetShow (ctx context.Context , assetId string , accessToken string ) (* Asset , error ) {
53
- body , err := Request (ctx , "GET" , "/assets/" + assetId , nil , accessToken )
52
+ func AssetList (ctx context.Context , accessToken string ) ([]* Asset , error ) {
53
+ return AssetListWithRequestID (ctx , accessToken , UuidNewV4 ().String ())
54
+ }
55
+
56
+ func AssetShowWithRequestID (ctx context.Context , assetId string , accessToken , requestID string ) (* Asset , error ) {
57
+ body , err := RequestWithId (ctx , "GET" , "/assets/" + assetId , nil , accessToken , requestID )
54
58
if err != nil {
55
59
return nil , err
56
60
}
@@ -72,6 +76,9 @@ func AssetShow(ctx context.Context, assetId string, accessToken string) (*Asset,
72
76
}
73
77
return & resp .Data , nil
74
78
}
79
+ func AssetShow (ctx context.Context , assetId string , accessToken string ) (* Asset , error ) {
80
+ return AssetShowWithRequestID (ctx , assetId , accessToken , UuidNewV4 ().String ())
81
+ }
75
82
76
83
func AssetSearch (ctx context.Context , name string ) ([]* Asset , error ) {
77
84
body , err := Request (ctx , "GET" , "/network/assets/search/" + name , nil , "" )
0 commit comments