Skip to content

Latest commit

 

History

History
160 lines (102 loc) · 5.93 KB

NameServiceApi.md

File metadata and controls

160 lines (102 loc) · 5.93 KB

\NameServiceApi

All URIs are relative to https://api.blockchainapi.com/v1

Method HTTP request Description
GetBlockchainIdentifierFromName Post /{blockchain}/{network}/name_service/name_to_blockchain_identifier Get the identifier
GetNameForBlockchainIdentifier Post /{blockchain}/{network}/name_service/blockchain_identifier_to_name Get the name

GetBlockchainIdentifierFromName

InputBlockchainIdentifier GetBlockchainIdentifierFromName(ctx, blockchain, network).InputName(inputName).Execute()

Get the identifier

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    blockchain := "blockchain_example" // string | The blockchain you want to use 
    network := "ropsten" // string | The network of the blockchain you selected  - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet`  Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
    inputName := *openapiclient.NewInputName() // InputName |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NameServiceApi.GetBlockchainIdentifierFromName(context.Background(), blockchain, network).InputName(inputName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NameServiceApi.GetBlockchainIdentifierFromName``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetBlockchainIdentifierFromName`: InputBlockchainIdentifier
    fmt.Fprintf(os.Stdout, "Response from `NameServiceApi.GetBlockchainIdentifierFromName`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
blockchain string The blockchain you want to use
network string The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`

Other Parameters

Other parameters are passed through a pointer to a apiGetBlockchainIdentifierFromNameRequest struct via the builder pattern

Name Type Description Notes

inputName | InputName | |

Return type

InputBlockchainIdentifier

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetNameForBlockchainIdentifier

InputName GetNameForBlockchainIdentifier(ctx, blockchain, network).InputBlockchainIdentifier(inputBlockchainIdentifier).Execute()

Get the name

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    blockchain := "blockchain_example" // string | The blockchain you want to use 
    network := "ropsten" // string | The network of the blockchain you selected  - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet`  Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
    inputBlockchainIdentifier := *openapiclient.NewInputBlockchainIdentifier() // InputBlockchainIdentifier |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NameServiceApi.GetNameForBlockchainIdentifier(context.Background(), blockchain, network).InputBlockchainIdentifier(inputBlockchainIdentifier).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NameServiceApi.GetNameForBlockchainIdentifier``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetNameForBlockchainIdentifier`: InputName
    fmt.Fprintf(os.Stdout, "Response from `NameServiceApi.GetNameForBlockchainIdentifier`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
blockchain string The blockchain you want to use
network string The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`

Other Parameters

Other parameters are passed through a pointer to a apiGetNameForBlockchainIdentifierRequest struct via the builder pattern

Name Type Description Notes

inputBlockchainIdentifier | InputBlockchainIdentifier | |

Return type

InputName

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]