finn-no / go-intigriti

Go library to interact with the intigriti API.

Home Page:https://github.com/hazcod/go-intigriti

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-intigriti

For changes made by Radu Boian check here

Go library and commandline client for interacting with the intigriti v1 and v2 external API. Checkout the docs!

Commandline client

Usage:

% inti company list-programs
% inti company list-submissions

Library

API documentation is available on the ReadMe.

We have a v1/ for the regular external API and a v2/ for the new v2.0 external API. Check with your customer success representative what version you ought to use.

Usage

package main

import (
	inti " github.com/finn-no/go-intigriti/v2"
	"log"
)

func main() {
	intigriti, err := inti.New("my-client-token", "my-client-secret", nil) // or a logrus.Logger
	if err != nil { log.Fatal(err) }
	
	programs, err := intigriti.GetPrograms()
	if err != nil { log.Fatal(err) }

	for _, program := range programs {
		log.Println(program.Name)
	}
}

Testing

# test on production using inti.yml
go test -tags integration -v ./...

# test on staging using inti.yml
INTI_TOKEN_URL=="testing.api.com" INTI_AUTH_URL=="subs.testing.api.com" INTI_API_URL="api.testing.com" go test -tags integration -v ./...

About

Go library to interact with the intigriti API.

https://github.com/hazcod/go-intigriti

License:Apache License 2.0


Languages

Language:Go 100.0%