Skip to content

Commit e8d8d22

Browse files
committed
chore(docs): sync external documentation
1 parent 221aceb commit e8d8d22

6 files changed

Lines changed: 102 additions & 41 deletions

File tree

predicates/did/did_components_2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ did_components(
6969

7070
``` yaml
7171
height: 42
72-
gas_used: 11918
72+
gas_used: 11932
7373
answer:
7474
has_more: false
7575
variables: ["Method", "MethodSpecificId", "Path", "Query", "Fragment"]
@@ -105,7 +105,7 @@ did_components(DID, did(example, '123456', '/foo/bar', 'versionId=1', test)).
105105

106106
``` yaml
107107
height: 42
108-
gas_used: 10800
108+
gas_used: 10814
109109
answer:
110110
has_more: false
111111
variables: ["DID"]
@@ -133,7 +133,7 @@ did_components(foo, Parsed).
133133

134134
``` yaml
135135
height: 42
136-
gas_used: 4301
136+
gas_used: 4315
137137
answer:
138138
has_more: false
139139
variables: ["Parsed"]
@@ -159,7 +159,7 @@ did_components(DID, did(example, '123456', 'path with/space', _, _)).
159159

160160
``` yaml
161161
height: 42
162-
gas_used: 6377
162+
gas_used: 6391
163163
answer:
164164
has_more: false
165165
variables: ["DID"]

predicates/stdlib/uri_encoded_3.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

predicates/stdlib/write_term_3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 101
2+
sidebar_position: 100
33
---
44
[//]: # (This file is auto-generated. Please do not modify it yourself.)
55

predicates/uri/_category_.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Uri library",
3+
"position": 12
4+
}

predicates/uri/uri_encoded_3.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
[//]: # (This file is auto-generated. Please do not modify it yourself.)
5+
6+
# uri_encoded/3
7+
8+
## Module
9+
10+
This predicate is provided by `uri.pl`.
11+
12+
Load this module before using the predicate:
13+
14+
```prolog
15+
:- consult('/v1/lib/uri.pl').
16+
```
17+
18+
## Description
19+
20+
uri_encoded(+Component, -Value, +Encoded) is det.
21+
22+
Encoded is the URI encoding for Value.
23+
24+
Component specifies the URI component where the value is used. It is one of
25+
`query_value`, `fragment`, `path` or `segment`.
26+
27+
Value and Encoded may be atoms, lists of characters, or lists of character
28+
codes. Generated values are returned as atoms.
29+
30+
## Signature
31+
32+
```text
33+
uri_encoded(+Component, +Value, -Encoded) is det
34+
```
35+
36+
## Examples
37+
38+
### Decode a raw path atom
39+
40+
This scenario demonstrates how to decode a raw URI path into plain text.
41+
42+
Here are the steps of the scenario:
43+
44+
- **Given** the query:
45+
46+
``` prolog
47+
consult('/v1/lib/uri.pl'),
48+
uri_encoded(path, Decoded, foo).
49+
```
50+
51+
- **When** the query is run
52+
- **Then** the answer we get is:
53+
54+
``` yaml
55+
height: 42
56+
gas_used: 4709
57+
answer:
58+
has_more: false
59+
variables: ["Decoded"]
60+
results:
61+
- substitutions:
62+
- variable: Decoded
63+
expression: "foo"
64+
```
65+
66+
### Encode a query value with a space
67+
68+
This scenario demonstrates how to percent-encode a query value.
69+
70+
Here are the steps of the scenario:
71+
72+
- **Given** the query:
73+
74+
``` prolog
75+
consult('/v1/lib/uri.pl'),
76+
uri_encoded(query_value, 'foo bar', Encoded).
77+
```
78+
79+
- **When** the query is run
80+
- **Then** the answer we get is:
81+
82+
``` yaml
83+
height: 42
84+
gas_used: 5716
85+
answer:
86+
has_more: false
87+
variables: ["Encoded"]
88+
results:
89+
- substitutions:
90+
- variable: Encoded
91+
expression: "'foo%20bar'"
92+
```

predicates/wasm/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Wasm library",
3-
"position": 12
3+
"position": 13
44
}

0 commit comments

Comments
 (0)