func (s *RulesetService) Put(ctx context.Context, path string, rs *regula.Ruleset) (*api.Ruleset, error) {
	req, err := s.client.newRequest("PUT", s.joinPath(path), rs)
	if err != nil {
		return nil, err
	}
	var resp api.Ruleset
	_, err = s.client.try(ctx, req, &resp)
	return &resp, err
}
Put creates a ruleset version on the given path.
package client
import (
	"context"
	"net/http"
	ppath "path"
	"strconv"
	"time"
	"github.com/heetch/regula"
	"github.com/heetch/regula/api"
	"github.com/heetch/regula/rule"
	"github.com/pkg/errors"
)
type RulesetService struct {
	client *Client
}
func (s *RulesetService) joinPath(path string) string {
	path = "./" + ppath.Join("rulesets/", path)
	if path == "./rulesets" {
		return path + "/"
	}
	return path
}
func (s *RulesetService) List(ctx context.Context, prefix string, opt *ListOptions) (*api.Rulesets, error) {
	req, err := s.client.newRequest("GET", s.joinPath(prefix), nil)
	if err != nil {
		return nil, err
	}
	q := req.URL.Query()
	q.Add("list", "")
	if opt != nil {
		if opt.Limit != 0 {
			q.Add("limit", strconv.Itoa(opt.Limit))
		}
		if opt.Continue != "" {
			q.Add("continue", opt.Continue)
		}
	}
	req.URL.RawQuery = q.Encode()
	var rl api.Rulesets
	_, err = s.client.try(ctx, req, &rl)
	return &rl, err
}
func (s *RulesetService) Eval(ctx context.Context, path string, params rule.Params) (*regula.EvalResult, error) {
	return s.EvalVersion(ctx, path, "", params)
}
func (s *RulesetService) EvalVersion(ctx context.Context, path, version string, params rule.Params) (*regula.EvalResult, error) {
	req, err := s.client.newRequest("GET", s.joinPath(path), nil)
	if err != nil {
		return nil, err
	}
	q := req.URL.Query()
	q.Add("eval", "")
	for _, k := range params.Keys() {
		v, err := params.EncodeValue(k)
		if err != nil {
			return nil, err
		}
		q.Add(k, v)
	}
	if version != "" {
		q.Add("version", version)
	}
	req.URL.RawQuery = q.Encode()
	var resp api.EvalResult
	_, err = s.client.try(ctx, req, &resp)
	if err != nil {
		return nil, err
	}
	return &regula.EvalResult{
		Value:   resp.Value,
		Version: resp.Version,
	}, nil
}