Yapla API 2.0
Go to file
Adrien Kara 40776f4c03
Fix golint
Signed-off-by: Adrien Kara <adrien@iglou.eu>
2021-03-30 01:43:56 +02:00
.gitignore Initial commit 2021-03-24 19:27:22 +00:00
LICENSE Initial commit 2021-03-24 19:27:22 +00:00
README.md Update corverage badge 2021-03-29 23:12:15 +02:00
go.mod v0.0.1 2021-03-27 01:16:34 +01:00
yapla.go Fix golint 2021-03-30 01:43:56 +02:00
yapla_test.go v0.0.1 2021-03-27 01:16:34 +01:00

go-yapla

Go Report Card Go Reference Go coverage Apache V2 License

Support Yapla API 2.0
Official documentation available here

Getting Started

Dependencies

No extra dependency are needed

Go mod

To get a specific release version use @<tag> in your go get command.

go get git.iglou.eu/Production/go-yapla@v0.0.1

Or @latest to get the latest repository change

go get git.iglou.eu/Production/go-yapla@latest

Quick Example

This example shows a complete working Go file which will login a member and showing their information map

package main

import (
	"fmt"
	"log"

	"git.iglou.eu/Production/go-yapla"
)

func main() {
    // Create a new required instance
    //
    // Need to provide a valid Yapla API Key 
    //
    // You can overwrite default configuration
    // For this provide an extra argument like
    // yapla.Config{...}
	y, err := yapla.NewSession("HP1ST252NFKX6Z6RVJ4RKEU23WS2QXSTQHTVYA1JAFWYX306")
	if err != nil {
		log.Fatalln(err)
	}

    // Login a Yapla member of your organisation
    // Need "only" user email and user password
    //
    // Return a struct with the API reply state and data on map format
    //
    // LoginContact() function is also avilable
	yRep, err := y.LoginMember("moncompte@macompagnie.com", "monp4ssW0R4!")
	if err != nil {
		log.Fatalln(err)
	}

	fmt.Println(yRep.Data)
}