blob: 973f9540abf920930e84a4af2cbee1048f63c668 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/+ sr=sortug
|%
++ get-contacts
|= =bowl:gall
=/ io ~(. io:sr bowl)
(scry:io %whom /1/contacts/mars whoms)
:: fuck it
+$ res
$: p=@p
contact=(unit contact)
whom=(unit whom)
==
:: %contacts
+$ foreign [for=$@(~ prof) sag=*]
+$ prof [wen=@da con=$@(~ contact)]
+$ rolodex (map ship foreign)
+$ contact
$: nickname=@t
bio=@t
status=@t
color=@ux
avatar=(unit @t)
cover=(unit @t)
groups=(set (pair ship term))
==
:: %whom
+$ whoms (map (each @p @t) whom)
+$ whom
$: info=(map @tas info-field)
profile=(unit profile)
==
+$ access-level ?(%public %mutual)
::
+$ profile
$: info=(map @tas [value=info-field access=access-level])
fields=(map @tas field-def)
==
+$ field-def [name=@t type=field-type-tag]
::
+$ field-type-tag ?(%text %date %look %tint %coll)
::
+$ info-field
$% [%text @t]
[%date @da]
[%look @t] :: link to image
[%tint @ux] :: color (0-255)
[%coll coll] :: collection of items on Urbit (groups, apps, wikis, etc)
==
::
+$ coll (set [=ship slug=@ta])
--
|