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

Blockdaemon/tipe-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tipe-go

GoDoc

Tipe Golang SDK

go get github.com/Blockdaemon/tipe-go

Example

import (
	"context"
	"fmt"

	"github.com/Blockdaemon/tipe-go"
)

type Document struct {
	CreatedBy tipe.CreatedBy `json:"createdBy"`
	Fields    struct {
		Description tipe.TextField `json:"description"`
	} `json:"fields"`
	ID       string        `json:"id"`
	Template tipe.Template `json:"template"`
}

func main() {
	client := tipe.New(
		tipe.Project("test"),
		tipe.Key(""),
		tipe.Offline(true),
		tipe.Port(8000),
	)

	doc := &Document{}

	if err := client.Documents.Get(
		context.Background(),
		doc,
		tipe.GetDocumentOptions{
			SkuID: "MySkuID",
		},
	); err != nil {
		panic(err)
	}

	fmt.Println(doc.Fields.Description.Value)
}

Releases

No releases published

Packages

No packages published

Languages