<commit_before>package main

import (
	"github.com/cseeger-epages/i-doit-go-api"
	"log"
)

func main() {
	// enable Debug
	goidoit.Debug(true)
	//goidoit.SkipTLSVerify(true)

	// create api object using NewLogin for X-RPC-Auth
	a, err := goidoit.NewLogin("https://example.com/src/jsonrpc.php", "yourapikey", "username", "password")

	// check if our login was successfull
	if err != nil {
		log.Fatal(err)
	}

	// do sth like a simple search
	a.Search("test")

	// logout when your done
	a.Logout()
}<commit_msg>added example for using session-key after successfull login<commit_after>package main

import (
	"github.com/cseeger-epages/i-doit-go-api"
	"log"
)

func main() {
	// enable Debug
	goidoit.Debug(true)
	//goidoit.SkipTLSVerify(true)

	// create api object using NewLogin for X-RPC-Auth
	a, err := goidoit.NewLogin("https://example.com/src/jsonrpc.php", "yourapikey", "username", "password")

	// check if our login was successfull
	if err != nil {
		log.Fatal(err)
	}

	// do sth like a simple search
	a.Search("test")

	// logout when your done
	a.Logout()

	// another way is to reuse the session key
	a, err := goidoit.NewLogin("https://example.com/src/jsonrpc.php", "yourapikey", "username", "password")

	// check if our login was successfull
	if err != nil {
		log.Fatal(err)
	}

	// here is the session key
	sessionKey := a.SessionId

	// you can reuse this key without needing the user password anymore as long as the sessionKey is valid
	b := goidoit.Api{"https://example.com/src/jsonrpc.php", "yourapikey", "username", "", sessionKey}

	b.Search("test")

	// destroys the session
	a.Logout()
}
{'fraction_non_alphanumeric': 0.14560099132589838, 'fraction_numerical': 0.0, 'mean_word_length': 3.562146892655367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5477459', 'n_tokens_mistral': 597, 'n_tokens_neox': 572, 'n_words': 158}