Files

10 lines
860 B
Plaintext
Raw Permalink Normal View History

external atom GutenbergCatalogObject id "atom:gutenberg:catalog";
type GutenbergBook = record {ebook:uint32;title:string;author:string;language:string;};
type GutenbergExcerpt = record {book:GutenbergBook;url:string;text:string;words:uint32;};
interface GutenbergCatalog id "interface:gutenberg:catalog" revision "interface:gutenberg:catalog@1" {
queryable value name id "gutenberg:name" : string {get id "gutenberg:name:get" execution snapshot;}
static operation create id "gutenberg:create" : unit -> atom-ref<GutenbergCatalogObject> {call id "gutenberg:create:call" execution transaction;}
operation search id "gutenberg:search" : string -> list<GutenbergBook> {call id "gutenberg:search:call" execution remote;}
operation readBook id "gutenberg:read" : record {ebook:uint32;} -> GutenbergExcerpt {call id "gutenberg:read:call" execution remote;}
}