Skip to content
/ fio Public

API client for Fio Banka written in Go.

License

Notifications You must be signed in to change notification settings

jbub/fio

Repository files navigation

fio

GoDoc Build Status Go Report Card

API client for Fio Banka written in Go.

Install

go get github.com/jbub/fio

Docs

https://pkg.go.dev/github.com/jbub/fio

Example

package main

import (
    "fmt"
    "log"
    "time"
    "context"

    "github.com/jbub/fio"
)

func main() {
    client := fio.NewClient("mytoken", nil)

    opts := fio.ByPeriodOptions{
        DateFrom: time.Now(),
        DateTo:   time.Now(),
    }

    resp, err := client.Transactions.ByPeriod(context.Background(), opts)
    if err != nil {
        log.Fatal(err)
    }

    for _, tx := range resp.Transactions {
        fmt.Println(tx.ID)
    }
}