ADDED .deepsource.toml Index: .deepsource.toml ================================================================== --- /dev/null +++ .deepsource.toml @@ -0,0 +1,8 @@ +version = 1 + +[[analyzers]] +name = "go" +enabled = true + + [analyzers.meta] + import_root = "github.com/zettelstore/client" Index: api/const.go ================================================================== --- api/const.go +++ api/const.go @@ -123,10 +123,11 @@ ValueSyntaxHTML = "html" ValueSyntaxMarkdown = "markdown" ValueSyntaxMD = "md" ValueSyntaxMustache = "mustache" ValueSyntaxNone = "none" + ValueSyntaxPikchr = "pikchr" ValueSyntaxSVG = "svg" ValueSyntaxText = "text" ValueSyntaxZmk = "zmk" ValueUserRoleCreator = "creator" ValueUserRoleOwner = "owner" @@ -150,11 +151,11 @@ ) // Values for HTTP query parameter. const ( QueryKeyCommand = "cmd" - QueryKeyCost = "cost" + QueryKeyDepth = "depth" QueryKeyDir = "dir" QueryKeyEncoding = "enc" QueryKeyLimit = "limit" QueryKeyPart = "part" QueryKeyPhrase = "phrase" @@ -168,20 +169,18 @@ ) // Supported encoding values. const ( EncodingHTML = "html" - EncodingMD = "md" EncodingSexpr = "sexpr" EncodingText = "text" EncodingZJSON = "zjson" EncodingZMK = "zmk" ) var mapEncodingEnum = map[string]EncodingEnum{ EncodingHTML: EncoderHTML, - EncodingMD: EncoderMD, EncodingSexpr: EncoderSexpr, EncodingText: EncoderText, EncodingZJSON: EncoderZJSON, EncodingZMK: EncoderZmk, } @@ -206,11 +205,10 @@ // Values for EncoderEnum const ( EncoderUnknown EncodingEnum = iota EncoderHTML - EncoderMD EncoderSexpr EncoderText EncoderZJSON EncoderZmk ) Index: client/client.go ================================================================== --- client/client.go +++ client/client.go @@ -477,22 +477,22 @@ ) // GetZettelContext returns metadata of the given zettel and, more important, // metadata of zettel that for the context of the first zettel. func (c *Client) GetZettelContext( - ctx context.Context, zid api.ZettelID, dir ContextDirection, cost, limit int) ( + ctx context.Context, zid api.ZettelID, dir ContextDirection, depth, limit int) ( *api.ZidMetaRelatedList, error, ) { ub := c.newURLBuilder('x').SetZid(zid) switch dir { case DirBackward: ub.AppendKVQuery(api.QueryKeyDir, api.DirBackward) case DirForward: ub.AppendKVQuery(api.QueryKeyDir, api.DirForward) } - if cost > 0 { - ub.AppendKVQuery(api.QueryKeyCost, strconv.Itoa(cost)) + if depth > 0 { + ub.AppendKVQuery(api.QueryKeyDepth, strconv.Itoa(depth)) } if limit > 0 { ub.AppendKVQuery(api.QueryKeyLimit, strconv.Itoa(limit)) } resp, err := c.buildAndExecuteRequest(ctx, http.MethodGet, ub, nil, nil) Index: www/changes.wiki ================================================================== --- www/changes.wiki +++ www/changes.wiki @@ -1,12 +1,7 @@ Change Log - -

Changes for Version 0.9.0 (2022-12-12)

- * Rename api.QueryKeyDepth to api.QueryKeyCost - * Update encode / syntax names -

Changes for Version 0.6.0 (2022-08-11)

* Add support to build URLs with search expressions * Use Go 1.19 * Fix some bugs Index: www/index.wiki ================================================================== --- www/index.wiki +++ www/index.wiki @@ -1,12 +1,12 @@ Home This repository contains Go client software to access [https://zettelstore.de|Zettelstore] via its API. -

Latest Release: 0.9.0 (2022-12-12)

- * [./changes.wiki#0_9|Change summary] - * [/timeline?p=v0.9.0&bt=v0.8.0&y=ci|Check-ins for version 0.9.0], - [/vdiff?to=v0.9.0&from=v0.8.0|content diff] - * [/timeline?df=v0.9.0&y=ci|Check-ins derived from the 0.9.0 release], - [/vdiff?from=v0.9.0&to=trunk|content diff] +

Latest Release: 0.6.0 (2022-08-11)

+ * [./changes.wiki#0_6|Change summary] + * [/timeline?p=v0.6.0&bt=v0.5&y=ci|Check-ins for version 0.6.0], + [/vdiff?to=v0.6.0&from=v0.5|content diff] + * [/timeline?df=v0.6.0&y=ci|Check-ins derived from the 0.6.0 release], + [/vdiff?from=v0.6.0&to=trunk|content diff] * [/timeline?t=release|Timeline of all past releases]