1"use strict";(globalThis.webpackChunkmy_website=globalThis.webpackChunkmy_website||[]).push([[3121],{15680(e,t,o){o.d(t,{xA:()=>i,yg:()=>y});var l=o(96540);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,l)}return o}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function p(e,t){if(null==e)return{};var o,l,r=function(e,t){if(null==e)return{};var o,l,r={},n=Object.keys(e);for(l=0;l<n.length;l++)o=n[l],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)o=n[l],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var s=l.createContext({}),g=function(e){var t=l.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):a(a({},t),e)),o},i=function(e){var t=g(e.components);return l.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},u=l.forwardRef((function(e,t){var o=e.components,r=e.mdxType,n=e.originalType,s=e.parentName,i=p(e,["components","mdxType","originalType","parentName"]),u=g(o),y=r,d=u["".concat(s,".").concat(y)]||u[y]||c[y]||n;return o?l.createElement(d,a(a({ref:t},i),{},{components:o})):l.createElement(d,a({ref:t},i))}));function y(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=o.length,a=new Array(n);a[0]=u;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p.mdxType="string"==typeof e?e:r,a[1]=p;for(var g=2;g<n;g++)a[g]=o[g];return l.createElement.apply(null,a)}return l.createElement.apply(null,o)}u.displayName="MDXCreateElement"},81425(e,t,o){o.r(t),o.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>c,frontMatter:()=>n,metadata:()=>p,toc:()=>g});var l=o(58168),r=(o(96540),o(15680));const n={},a="Play",p={unversionedId:"guide/blog/play",id:"version-v0.26/guide/blog/play",title:"Play",description:"Create a blog post by Alice",source:"@site/versioned_docs/version-v0.26/02-guide/04-blog/08-play.md",sourceDirName:"02-guide/04-blog",slug:"/guide/blog/play",permalink:"/v0.26/guide/blog/play",draft:!1,tags:[],version:"v0.26",sidebarPosition:8,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"List posts",permalink:"/v0.26/guide/blog/list"},next:{title:"Summary",permalink:"/v0.26/guide/blog/summary"}},s={},g=[{value:"Create a blog post by Alice",id:"create-a-blog-post-by-alice",level:2},{value:"Show a blog post",id:"show-a-blog-post",level:2},{value:"Create a blog post by Bob",id:"create-a-blog-post-by-bob",level:2},{value:"List all blog posts with pagination",id:"list-all-blog-posts-with-pagination",level:2},{value:"Update a blog post",id:"update-a-blog-post",level:2},{value:"Delete a blog post",id:"delete-a-blog-post",level:2},{value:"Delete a blog post unsuccessfully",id:"delete-a-blog-post-unsuccessfully",level:2}],i={toc:g};function c(e){let{components:t,...o}=e;return(0,r.yg)("wrapper",(0,l.A)({},i,o,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"play"},"Play"),(0,r.yg)("h2",{id:"create-a-blog-post-by-alice"},"Create a blog post by Alice"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd tx blog create-post hello world --from alice\n")),(0,r.yg)("h2",{id:"show-a-blog-post"},"Show a blog post"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd q blog show-post 0\n")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-yml"},'post:\n body: world\n creator: cosmos1x33ummgkjdd6h2frlugt3tft7vnc0nxyfxnx9h\n id: "0"\n title: hello\n')),(0,r.yg)("h2",{id:"create-a-blog-post-by-bob"},"Create a blog post by Bob"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd tx blog create-post foo bar --from bob\n")),(0,r.yg)("h2",{id:"list-all-blog-posts-with-pagination"},"List all blog posts with pagination"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd q blog list-post \n")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-yml"},'pagination:\n next_key: null\n total: "2"\npost:\n- body: world\n creator: cosmos1x33ummgkjdd6h2frlugt3tft7vnc0nxyfxnx9h\n id: "0"\n title: hello\n- body: bar\n creator: cosmos1ysl9ws3fdamrrj4fs9ytzrrzw6ul3veddk7gz3\n id: "1"\n title: foo\n')),(0,r.yg)("h2",{id:"update-a-blog-post"},"Update a blog post"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd tx blog update-post hello cosmos 0 --from alice\n")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd q blog show-post 0\n")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-yml"},'post:\n body: cosmos\n creator: cosmos1x33ummgkjdd6h2frlugt3tft7vnc0nxyfxnx9h\n id: "0"\n title: hello\n')),(0,r.yg)("h2",{id:"delete-a-blog-post"},"Delete a blog post"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd tx blog delete-post 0 --from alice\n")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd q blog list-post\n")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-yml"},'pagination:\n next_key: null\n total: "1"\npost:\n- body: bar\n creator: cosmos1ysl9ws3fdamrrj4fs9ytzrrzw6ul3veddk7gz3\n id: "1"\n title: foo\n')),(0,r.yg)("h2",{id:"delete-a-blog-post-unsuccessfully"},"Delete a blog post unsuccessfully"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"blogd tx blog delete-post 1 --from alice\n")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-yml"},"raw_log: 'failed to execute message; message index: 0: incorrect owner: unauthorized'\n")))}c.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.