Skip to content

Kdheeru12/zenduty-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zenduty-go-sdk

Zenduty API client in Go, primarily used by Zenduty provider in Terraform.

Installation

go get github.com/Kdheeru12/zenduty-test/client

Getting started

Before you begin making use of the SDK, make sure you have your Zenduty Access Token.

import "github.com/Kdheeru12/zenduty-test/client"

Configure the Token and Url

config := &client.Config{
	Token: "", // enter token for authentication
	BaseURL: "", // your url 
	}

Based on the service you want to communicate with,Create object for required class,For example, to create Team

Example usage

package main

import (
	"fmt"

	"github.com/Kdheeru12/zenduty-test/client"
)


func main() {
	config := &client.Config{
		Token: "", // enter token for authentication
	}
	c, err := client.NewClient(config)
	if err != nil {
		panic(err)
	}

	newteam := &client.Team{}
	newteam.Name = "test"

	resp, err := c.Teams.CreateTeam(newteam)
	if err != nil {
		panic(err)
	}
	fmt.Printf("%+v\n", resp)

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages