at main 80 lines 2.3 kB view raw
1{ 2 "lexicon": 1, 3 "id": "sh.weaver.notebook.getSuggestedNotebooks", 4 "defs": { 5 "main": { 6 "type": "query", 7 "description": "Get notebook recommendations for the authenticated user based on reading history, likes, and follows.", 8 "parameters": { 9 "type": "params", 10 "properties": { 11 "limit": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } 12 } 13 }, 14 "output": { 15 "encoding": "application/json", 16 "schema": { 17 "type": "object", 18 "required": ["notebooks"], 19 "properties": { 20 "notebooks": { 21 "type": "array", 22 "items": { "type": "ref", "ref": "#suggestedNotebook" } 23 } 24 } 25 } 26 } 27 }, 28 "suggestedNotebook": { 29 "type": "object", 30 "required": ["notebook", "reason"], 31 "properties": { 32 "notebook": { "type": "ref", "ref": "sh.weaver.notebook.defs#notebookView" }, 33 "reason": { "type": "ref", "ref": "#suggestionReason" }, 34 "score": { 35 "type": "integer", 36 "description": "Appview-computed relevance score." 37 } 38 } 39 }, 40 "suggestionReason": { 41 "type": "object", 42 "description": "Why this notebook was suggested.", 43 "required": ["type"], 44 "properties": { 45 "type": { 46 "type": "string", 47 "knownValues": [ 48 "similar-tags", 49 "similar-to-liked", 50 "similar-to-read", 51 "followed-author", 52 "popular-in-tag", 53 "trending", 54 "from-list" 55 ] 56 }, 57 "relatedNotebook": { 58 "type": "ref", 59 "ref": "sh.weaver.notebook.defs#notebookView", 60 "description": "If similar-to-X, the notebook it's similar to." 61 }, 62 "relatedAuthor": { 63 "type": "ref", 64 "ref": "sh.weaver.actor.defs#profileViewBasic", 65 "description": "If followed-author, the author." 66 }, 67 "relatedTags": { 68 "type": "array", 69 "items": { "type": "string" }, 70 "description": "Tags that matched." 71 }, 72 "relatedList": { 73 "type": "ref", 74 "ref": "sh.weaver.graph.defs#listView", 75 "description": "If from-list, the list it's from." 76 } 77 } 78 } 79 } 80}