Yapla API 2.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.8 KiB

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)
}