Signed-off-by: Seongmin Lee git@boltless.me
+162
Diff
Round #0
+37
lexicons/actor/defs.json
+37
lexicons/actor/defs.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "sh.tangled.actor.defs",
4
+
"defs": {
5
+
"profileViewBasic": {
6
+
"type": "object",
7
+
"required": ["did", "handle"],
8
+
"properties": {
9
+
"did": { "type": "string", "format": "did" },
10
+
"handle": { "type": "string", "format": "handle" },
11
+
"avatar": { "type": "string", "format": "uri" },
12
+
"viewer": { "type": "ref", "ref": "#viewerState" }
13
+
}
14
+
},
15
+
"profileViewDetailed": {
16
+
"type": "object",
17
+
"description": "profileViewBaisc + follow counts",
18
+
"required": ["did", "handle"],
19
+
"properties": {
20
+
"did": { "type": "string", "format": "did" },
21
+
"handle": { "type": "string", "format": "handle" },
22
+
"avatar": { "type": "string", "format": "uri" },
23
+
"followersCount": { "type": "integer" },
24
+
"followsCount": { "type": "integer" },
25
+
"viewer": { "type": "ref", "ref": "#viewerState" }
26
+
}
27
+
},
28
+
"viewerState": {
29
+
"type": "object",
30
+
"description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
31
+
"properties": {
32
+
"following": { "type": "string", "format": "at-uri" },
33
+
"followedBy": { "type": "string", "format": "at-uri" }
34
+
}
35
+
}
36
+
}
37
+
}
+98
lexicons/feed/getTimeline.json
+98
lexicons/feed/getTimeline.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "sh.tangled.feed.getTimeline",
4
+
"defs": {
5
+
"main": {
6
+
"type": "query",
7
+
"parameters": {
8
+
"type": "params",
9
+
"properties": {
10
+
"viewer": {
11
+
"type": "string",
12
+
"format": "did",
13
+
"description": "TODO: deprecate this and use auth instead."
14
+
},
15
+
"followingOnly": { "type": "boolean" },
16
+
"limit": {
17
+
"type": "integer",
18
+
"minimum": 1,
19
+
"maximum": 100,
20
+
"default": 50
21
+
},
22
+
"cursor": { "type": "string" }
23
+
}
24
+
},
25
+
"output": {
26
+
"encoding": "application/json",
27
+
"schema": {
28
+
"type": "object",
29
+
"required": ["feed"],
30
+
"properties": {
31
+
"feed": {
32
+
"type": "array",
33
+
"items": { "type": "ref", "ref": "#timelineItem" }
34
+
},
35
+
"cursor": { "type": "string" }
36
+
}
37
+
}
38
+
},
39
+
"errors": []
40
+
},
41
+
"timelineItem": {
42
+
"type": "object",
43
+
"required": ["eventAt", "event"],
44
+
"properties": {
45
+
"eventAt": { "type": "string", "format": "datetime" },
46
+
"event": {
47
+
"type": "union",
48
+
"refs": ["#repoEvent", "#starEvent", "#followEvent"]
49
+
}
50
+
}
51
+
},
52
+
"repoEvent": {
53
+
"type": "object",
54
+
"description": "A repository was created (or forked). The actor is repo.owner.",
55
+
"required": ["uri", "cid", "repo"],
56
+
"properties": {
57
+
"uri": { "type": "string", "format": "at-uri" },
58
+
"cid": { "type": "string", "format": "cid" },
59
+
"repo": { "type": "ref", "ref": "sh.tangled.repo.defs#repoViewBasic" },
60
+
"source": {
61
+
"type": "ref",
62
+
"ref": "sh.tangled.repo.defs#repoViewBasic",
63
+
"description": "Fork parent, present only if this repo is a fork."
64
+
}
65
+
}
66
+
},
67
+
"starEvent": {
68
+
"type": "object",
69
+
"description": "A repository was starred.",
70
+
"required": ["uri", "cid", "actor", "repo"],
71
+
"properties": {
72
+
"uri": { "type": "string", "format": "at-uri" },
73
+
"cid": { "type": "string", "format": "cid" },
74
+
"actor": {
75
+
"type": "ref",
76
+
"ref": "sh.tangled.actor.defs#profileViewBasic",
77
+
"description": "Who starred."
78
+
},
79
+
"repo": {
80
+
"type": "ref",
81
+
"ref": "sh.tangled.repo.defs#repoViewBasic",
82
+
"description": "The starred repo."
83
+
}
84
+
}
85
+
},
86
+
"followEvent": {
87
+
"type": "object",
88
+
"description": "A user followed another user.",
89
+
"required": ["uri", "cid", "actor", "subject"],
90
+
"properties": {
91
+
"uri": { "type": "string", "format": "at-uri" },
92
+
"cid": { "type": "string", "format": "cid" },
93
+
"actor": { "type": "ref", "ref": "sh.tangled.actor.defs#profileViewBasic" },
94
+
"subject": { "type": "ref", "ref": "sh.tangled.actor.defs#profileViewDetailed" }
95
+
}
96
+
}
97
+
}
98
+
}
+27
lexicons/repo/defs.json
+27
lexicons/repo/defs.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "sh.tangled.repo.defs",
4
+
"defs": {
5
+
"repoViewBasic": {
6
+
"type": "object",
7
+
"required": ["did", "owner", "slug", "createdAt"],
8
+
"properties": {
9
+
"did": { "type": "string", "format": "did" },
10
+
"owner": { "type": "ref", "ref": "sh.tangled.actor.defs#profileViewBasic" },
11
+
"slug": { "type": "string" },
12
+
"description": { "type": "string" },
13
+
"createdAt": { "type": "string", "format": "datetime" },
14
+
"starCount": { "type": "integer" },
15
+
"viewer": { "type": "ref", "ref": "#viewerState" },
16
+
"isStarred": { "type": "boolean" }
17
+
}
18
+
},
19
+
"viewerState": {
20
+
"type": "object",
21
+
"description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
22
+
"properties": {
23
+
"star": { "type": "string", "format": "at-uri" }
24
+
}
25
+
}
26
+
}
27
+
}
History
2 rounds
0 comments
boltless.me
submitted
#1
1 commit
Expand
Collapse
lexicons:
feed.getTimeline
Signed-off-by: Seongmin Lee <git@boltless.me>
Expand 0 comments
boltless.me
submitted
#0
1 commit
Expand
Collapse
lexicons:
feed.getTimeline
Signed-off-by: Seongmin Lee <git@boltless.me>