Skip to content

Commit

Permalink
Add slang.net.APIGetSimple
Browse files Browse the repository at this point in the history
  • Loading branch information
jm9e committed Sep 12, 2018
1 parent bdd06b5 commit 6cc535d
Show file tree
Hide file tree
Showing 2 changed files with 200 additions and 0 deletions.
104 changes: 104 additions & 0 deletions slang/net/APIGetSimple.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
services:
main:
in:
type: string
out:
type: map
map:
response:
type: generic
generic: responseType
status:
type: number
valid:
type: boolean
operators:
Convert:
operator: slang.data.Convert
generics:
fromType:
type: string
toType:
type: binary
HTTPClient:
operator: slang.net.HTTPClient
JSONRead:
operator: slang.encoding.JSONRead
generics:
itemType:
type: generic
generic: responseType
Template:
operator: slang.string.Template
properties:
variables:
- url
Value:
operator: slang.data.Value
properties:
value: ""
generics:
valueType:
type: string
Value1:
operator: slang.data.Value
properties:
value: GET
generics:
valueType:
type: string
Value2:
operator: slang.data.Value
properties:
value: []
generics:
valueType:
type: stream
stream:
type: map
map:
key:
type: string
values:
type: stream
stream:
type: string
Value3:
operator: slang.data.Value
properties:
value: '{url}?{query}'
generics:
valueType:
type: string
properties:
params:
type: stream
stream:
type: string
connections:
(:
- (Value
- (Value2
- (Value1
- (Value3
- url(Template
Convert):
- body(HTTPClient
HTTPClient)body:
- (JSONRead
HTTPClient)status:
- )status
JSONRead)item:
- )response
JSONRead)valid:
- )valid
Template):
- url(HTTPClient
Value):
- (Convert
Value1):
- method(HTTPClient
Value2):
- headers(HTTPClient
Value3):
- content(Template
96 changes: 96 additions & 0 deletions slang/net/APIGetSimple_visual.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
geometry:
height: 1255
width: 1201.6666
x: 50
"y": 50
instances:
Convert:
- 1
- 0
- 96.847984
- 0
- 1
- 373.61288
- 0
- 0
- 1
HTTPClient:
- 1
- 0
- 286.29794
- 0
- 1
- 668.4877
- 0
- 0
- 1
JSONRead:
- 1
- 0
- 250.19678
- 0
- 1
- 936.7837
- 0
- 0
- 1
Template:
- 1
- 0
- 868.1271
- 0
- 1
- 367.1436
- 0
- 0
- 1
URLWrite:
- 1
- 0
- 922.2663
- 0
- 1
- 124.25376
- 0
- 0
- 1
Value:
- 1
- 0
- 42.0906
- 0
- 1
- 121.624374
- 0
- 0
- 1
Value1:
- 1
- 0
- 469.80853
- 0
- 1
- 139.70364
- 0
- 0
- 1
Value2:
- 1
- 0
- 276.66214
- 0
- 1
- 136.83685
- 0
- 0
- 1
Value3:
- 1
- 0
- 676.1733
- 0
- 1
- 157.82686
- 0
- 0
- 1

0 comments on commit 6cc535d

Please sign in to comment.