GetCollectionByID Access API Method
पैरामीटर
Id
डोरी
आवश्यक
लोड हो रहा है...
रिटर्न
collection
वस्तु
लोड हो रहा है...
पहचान
डोरी
लोड हो रहा है...
transaction_ids
सरणी
लोड हो रहा है...
अनुरोध
1पैकेज मुख्य23आयात (4"प्रसंग"5"encoding/hex"6"एनकोडिंग/जेसन"7"एफएमटी"8"लकड़ी का लट्ठा"910"github.com/onflow/flow/protobuf/go/flow/access"11)1213समारोह मुख्य ( ) {1415// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.16client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17ctx := context.Background()18यदि त्रुटि != शून्य {19log.Fatalf("err: %v", err)20}2122// Get Collection by ID23collectionId, err := hex.DecodeString("eb6733050812a58450310980032ea2fdbee8a7c5f6aad252abf1ef9d82fd8ff5")24collectionResp, err := client.GetCollectionByID(ctx, &access.GetCollectionByIDRequest{Id: collectionId})25respJSON, err := json.Marshal(collectionResp)26यदि त्रुटि != शून्य {27log.Fatal("get collection by ID failed: ", err)28}29fmt.Println("Get Collection by ID:", string(respJSON))30}
1पैकेज मुख्य23आयात (4"प्रसंग"5"encoding/hex"6"एनकोडिंग/जेसन"7"एफएमटी"8"लकड़ी का लट्ठा"910"github.com/onflow/flow/protobuf/go/flow/access"11)1213समारोह मुख्य ( ) {1415// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.16client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17ctx := context.Background()18यदि त्रुटि != शून्य {19log.Fatalf("err: %v", err)20}2122// Get Collection by ID23collectionId, err := hex.DecodeString("eb6733050812a58450310980032ea2fdbee8a7c5f6aad252abf1ef9d82fd8ff5")24collectionResp, err := client.GetCollectionByID(ctx, &access.GetCollectionByIDRequest{Id: collectionId})25respJSON, err := json.Marshal(collectionResp)26यदि त्रुटि != शून्य {27log.Fatal("get collection by ID failed: ", err)28}29fmt.Println("Get Collection by ID:", string(respJSON))30}
अब तक कोई खाता नहीं है?
अपना बनाएँ Quicknode endpoint कुछ ही सेकंड में निर्माण शुरू करें
मुफ़्त में शुरुआत करें