Skip to content

Commit a159743

Browse files
StartAutomatingStartAutomating
authored andcommitted
Adding http[s] transpiler (Fixes #169)
1 parent f7a380b commit a159743

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

docs/PipeScript.Protocol.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
2+
PipeScript.Protocol
3+
-------------------
4+
### Synopsis
5+
Core Protocol Transpiler
6+
7+
---
8+
### Description
9+
10+
Enables the transpilation of protocols.
11+
12+
```https://api.github.com/repos/StartAutomating/PipeScript/issues``` is a valid command.
13+
14+
So is ```get https://api.github.com/repos/StartAutomating/PipeScript/issues```.
15+
16+
So is ```MyCustomProtocol:// -Parameter value```.
17+
18+
This transpiler enables commands in protocol format to be transpiled.
19+
20+
---
21+
### Examples
22+
#### EXAMPLE 1
23+
```PowerShell
24+
-ScriptBlock {
25+
https://api.github.com/users/StartAutomating
26+
}
27+
```
28+
29+
#### EXAMPLE 2
30+
```PowerShell
31+
-ScriptBlock {
32+
$userName = 'StartAutomating'
33+
https://$GitHubApi/users/$UserName
34+
}
35+
```
36+
37+
#### EXAMPLE 3
38+
```PowerShell
39+
-ScriptBlock {
40+
$env:GitUserName = 'StartAutomating'
41+
https://api.github.com/users/$env:GitUserName
42+
}
43+
```
44+
45+
---
46+
### Parameters
47+
#### **CommandAst**
48+
49+
The Command Abstract Syntax Tree.
50+
51+
52+
53+
|Type |Requried|Postion|PipelineInput |
54+
|------------------|--------|-------|--------------|
55+
|```[CommandAst]```|true |1 |true (ByValue)|
56+
---
57+
### Syntax
58+
```PowerShell
59+
PipeScript.Protocol [-CommandAst] <CommandAst> [<CommonParameters>]
60+
```
61+
---
62+
### Notes
63+
This transpiler will match any command whose first or second element contains ```://```
64+
65+
66+

0 commit comments

Comments
 (0)