Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 843 Bytes

README.md

File metadata and controls

35 lines (26 loc) · 843 Bytes

gomarvel

CircleCI codecov

Description

Package connects to the Marvel official API

Getting started

Using this package requres a valid Marvel API public and private key

Marvel API Documentation

Instalation

go get -u github.com/adrianjjohnson/gomarvel

Example

func main() {
	publicKey := os.Getenv("PUBLIC_KEY")
	privateKey := os.Getenv("PRIVATE_KEY")

	svc := gomarvel.New(publicKey, privateKey)

	character, err := svc.GetAllCharacters()
	if err != nil {
		panic(err)
	}

	for _, i := range character.Data.Results {
		fmt.Println(i.Name)
	}
}