From: Ruben Beltran del Rio Date: Wed, 4 Oct 2023 15:42:20 +0000 (+0200) Subject: Add old reference back X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/commitdiff_plain/bfaa66583b3210ad6da796a26f20e601c03275e4?hp=12629849c4b985f18f27310273cc1168175753ca Add old reference back --- diff --git a/api.gmi b/api.gmi index 62974d0..d0d99ad 100644 --- a/api.gmi +++ b/api.gmi @@ -4,7 +4,31 @@ API Notation is a language-agnostic notation to share the public API of components in code. It was created to standardize software specification documents in teams that need to review code across several languages. -The notation consists of one or more `definitions`, and `comments` +``` +// Anything after two forward slashes is a comment +NameOfClass.WithPossibleNamespace + + class property + - instance property + ~> listened events (socket) + +> listened events (class/module) + -> listened events (instance) + <~ dispatched events (socket) + <+ dispatched events(class/module) + <- dispatched events (instance) + :: class method + # instance method + +Other symbols + => returns + #> throws +[xx] optional + data type + +Recommended order: class first, then sockets, then instance. Internally: +Properties, events, methods. +``` + +Or, with some examples: ``` // Definitions start with object / module / class names, with namespaces