5
«codificación/hexadecimal»10
"github.com/onflow/flow/protobuf/go/flow/access"16
client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17
ctx := context.Background()19
log.Fatalf("err: %v", err)23
collectionId, err := hex.DecodeString("eb6733050812a58450310980032ea2fdbee8a7c5f6aad252abf1ef9d82fd8ff5")24
collectionResp, err := client.GetCollectionByID(ctx, &access.GetCollectionByIDRequest{Id: collectionId})25
respJSON, err := json.Marshal(collectionResp)27
log.Fatal("get collection by ID failed: ", err)29
fmt.Println("Get Collection by ID:", string(respJSON))
5
«codificación/hexadecimal»10
"github.com/onflow/flow/protobuf/go/flow/access"16
client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17
ctx := context.Background()19
log.Fatalf("err: %v", err)23
collectionId, err := hex.DecodeString("eb6733050812a58450310980032ea2fdbee8a7c5f6aad252abf1ef9d82fd8ff5")24
collectionResp, err := client.GetCollectionByID(ctx, &access.GetCollectionByIDRequest{Id: collectionId})25
respJSON, err := json.Marshal(collectionResp)27
log.Fatal("get collection by ID failed: ", err)29
fmt.Println("Get Collection by ID:", string(respJSON))