Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 501 Bytes

USAGE.md

File metadata and controls

27 lines (24 loc) · 501 Bytes
package main

import (
	"context"
	cipherswarmagentsdkgo "github.com/unclesp1d3r/cipherswarm-agent-sdk-go"
	"log"
)

func main() {
	s := cipherswarmagentsdkgo.New(
		cipherswarmagentsdkgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
	)
	var id int64 = 135003
	ctx := context.Background()
	res, err := s.Agents.GetAgent(ctx, id)
	if err != nil {
		log.Fatal(err)
	}
	if res.Agent != nil {
		// handle response
	}
}