Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Latest commit

 

History

History
79 lines (49 loc) · 1.87 KB

File metadata and controls

79 lines (49 loc) · 1.87 KB

\StatsApi

All URIs are relative to http://localhost

Method HTTP request Description
ReadStats Get /{ledger}/stats Get statistics from a ledger

ReadStats

StatsResponse ReadStats(ctx, ledger).Execute()

Get statistics from a ledger

Example

package main

import (
    "context"
    "fmt"
    "os"
    client "github.com/formancehq/numary-sdk-go"
)

func main() {
    ledger := "ledger001" // string | name of the ledger

    configuration := client.NewConfiguration()
    apiClient := client.NewAPIClient(configuration)
    resp, r, err := apiClient.StatsApi.ReadStats(context.Background(), ledger).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `StatsApi.ReadStats``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ReadStats`: StatsResponse
    fmt.Fprintf(os.Stdout, "Response from `StatsApi.ReadStats`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
ledger string name of the ledger

Other Parameters

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

Name Type Description Notes

Return type

StatsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

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