Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
/ redash-sdk-go Public archive

API client library for Redash in go (Unofficial)

License

Notifications You must be signed in to change notification settings

koooge/redash-sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Maintainability Test Coverage Go Report Card GoDoc

redash-sdk-go

Redash client in go. Many APIs are still WIP.

Usage

package main

import (
	"fmt"
	"os"

	"github.com/koooge/redash-sdk-go/redash"
)

const queryId = 1

func main() {
	config := &redash.Config{
		EndpointUrl: os.Getenv("REDASH_ENDPOINT_URL"),
		ApiKey:      os.Getenv("REDASH_API_KEY"),
	}
	client := redash.NewClient(config)

	input := &redash.GetQueryInput{
		QueryId: queryId,
	}

	output := client.GetQuery(input)
	fmt.Println(output.Body)
	fmt.Println(output.StatusCode)
}

See more about sample and doc.

About

API client library for Redash in go (Unofficial)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published