Created
December 22, 2017 14:48
-
-
Save minodisk/cbb2f305884b82d5b22aaa9fc1e3239d to your computer and use it in GitHub Desktop.
Revisions
-
minodisk created this gist
Dec 22, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ import Client from "@minodisk/medkit"; (async () => { const client = new Client(); const postId = await client.createPost( "<h3>Title</h3><h4>Subtitle</h4><p>Text</p>", ); const html = await client.readPost(postId); // -> "<h1>Title</h1><h2>Subtitle</h2><p>Text</p>" or "<h3>Title</h3><h4>Subtitle</h4><p>Text</p>" await client.updatePost( postId, "<h3>Title</h3><h4>Subtitle</h4><p>Modified</p>", ); await client.destroyPost(postId); await client.close(); })();