Skip to main content
Keep in mind that this is maintained by users and the code can change at any time. We do not actively watch for updates, so be sure to check the source yourself.

JuanBrotenelle/go_salamoonder

This GO SDK is actively maintained and includes useful helper functions
Here are some simple examples for each SDK. They come straight from their GitHub, and they might be outdated.
package main

import (
	"context"
	"encoding/json"
	"fmt"
	"log"

	"github.com/juanbrotenelle/go_salamoonder"
)

func main() {
	client, err := salamoonder.New("sr-YOUR-API-KEY", nil)
	if err != nil {
		log.Fatal(err)
	}

	result, err := client.CreateTask(context.Background(), 
		salamoonder.KasadaOptions{
			Pjs:    "https://www.nike.com/.../.../p.js",
			CdOnly: true,
		}
	)
	if err != nil {
		log.Fatal(err)
	}

	taskResult, err := client.Task(context.Background(), result.TaskId)
	if err != nil {
		log.Fatal(err)
	}

	var solution salamoonder.KasadaSolution
	if err := json.Unmarshal(taskResult.Solution, &solution); err != nil {
		log.Fatal(err)
	}

	fmt.Println(solution.UserAgent)
}