bnjns / metabase-sdk-go

An SDK for interacting with the Metabase REST API for the Go programming language.

Home Page:https://metabase-sdk-go.bnjns.uk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metabase SDK Go


An SDK for interacting with the Metabase REST API for the Go programming language.

🧐 About

Metabase is an analytics tool which allows anyone to easily learn and make decisions from their company's data. It allows you to query data directly from your databases (called "questions"), which you can store and share with others, as well as generate reports.

This module provides an SDK to interact with the Metabase API for the Go programming language.

Note

This SDK is not officially maintained or endorsed by Metabase.

🎈 Usage

  1. Add the SDK to your project using go get

    go get github.com:bnjns/metabase-sdk-go
  2. Create an authenticator, to tell the client how to authenticate with the API

     package main
     
     import "github.com/bnjns/metabase-sdk-go/metabase"
     
     func main()  { 
         // Both session-based and API key-based authentication is supported
         authenticator, err := metabase.NewApiKeyAuthenticator("<api key>")
         if err != nil {
             panic(err)
         }
     }
  3. Create the client

     func main() {
         // ...
         client, err := metabase.NewClient("<host>", authenticator)
         if err != nil {
             panic(err)
         }	
     }

See the docs for more details.

πŸ”§ Contributing

Prerequisites

If you wish to update the documentation, you will also need:

Install

To get started, simply clone the repository:

git clone git@github.com:bnjns/metabase-sdk-go.git

Then install the Go dependencies:

go mod download

Running Metabase

Use Task to run and set up Metabase using Docker:

task run:metabase
task setup:metabase

Running tests

go test -v ./...

or, using Task:

task check:test

Linting

task check:lint

πŸ“ Additional Documentation

✍️ Authors

About

An SDK for interacting with the Metabase REST API for the Go programming language.

https://metabase-sdk-go.bnjns.uk/

License:Apache License 2.0


Languages

Language:Go 100.0%