Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Latest commit

 

History

History
136 lines (88 loc) · 3.38 KB

NavigatorApi.md

File metadata and controls

136 lines (88 loc) · 3.38 KB

\NavigatorApi

All URIs are relative to https://siastats.info:3500/navigator-api

Method HTTP request Description
Hash Get /hash/{hash} Returns the information about any hash (address, Tx, contract...) or block height on the blockchain
Status Get /status Global status and blockchain sync situation of SiaStats nodes

Hash

[]HashResponse Hash(ctx, hash).Execute()

Returns the information about any hash (address, Tx, contract...) or block height on the blockchain

Example

package main

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

func main() {
    hash := "hash_example" // string | hash or block height

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.NavigatorApi.Hash(context.Background(), hash).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NavigatorApi.Hash``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Hash`: []HashResponse
    fmt.Fprintf(os.Stdout, "Response from `NavigatorApi.Hash`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
hash string hash or block height

Other Parameters

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

Name Type Description Notes

Return type

[]HashResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

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

Status

[]Status Status(ctx).Execute()

Global status and blockchain sync situation of SiaStats nodes

Example

package main

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

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.NavigatorApi.Status(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NavigatorApi.Status``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Status`: []Status
    fmt.Fprintf(os.Stdout, "Response from `NavigatorApi.Status`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Status

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

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