Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.23 KB

README.md

File metadata and controls

43 lines (30 loc) · 1.23 KB

GENOME LINK Go

Go Documentation

GENOME LINK SDK, implemented in Go

Install

$ go get -u github.com/ikasamah/genomelink-go

Usage

import "github.com/ikasamah/genomelink-go/v1"

ctx := context.Background()
cli := genomelink.DefaultClient(ctx, "<YOUR_TOKEN>")

report, _ := cli.Report(ctx, genomelink.PhenotypeNameGeneticEyeColor, genomelink.PopulationEuropean)

fmt.Println(report.Summary.Text) // Tend to not have brown eyes

Run example

$ go run $GOPATH/src/github.com/ikasamah/genomelink-go/example/main.go
Report: Genetic eye color, 0, Tend to not have brown eyes
Sequence: "CACTAAGCACACAGAGAATAATGTCTAGAATCTGAGTGCCATGTTATCAAATTGTA..."

OAuth Example

See Official Document first, and register your app.

Run following.

$ go run $GOPATH/src/github.com/ikasamah/genomelink-go/example/oauth.go -client_id <CLIENT_ID> -client_secret <CLIENT_SECRET>

Then, access http://localhost:8080/ and click auth link to get your personal token.