{"id":439,"date":"2026-03-27T13:50:09","date_gmt":"2026-03-27T13:50:09","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/k_rai\/?p=439"},"modified":"2026-03-27T13:50:09","modified_gmt":"2026-03-27T13:50:09","slug":"cats-03-27-26","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/k_rai\/2026\/03\/27\/cats-03-27-26\/","title":{"rendered":"Cats 03\/27\/26"},"content":{"rendered":"\n<p>Today I decided to work on a simple API website where the button gets me random pictures of cats<\/p>\n\n\n\n<p>I did very simple codes <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"774\" height=\"458\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-1.png\" alt=\"\" class=\"wp-image-440\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-1.png 774w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-1-300x178.png 300w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-1-768x454.png 768w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/figure>\n\n\n\n<p>This html code is responsible for the buttons and the image <\/p>\n\n\n\n<p>the code div id is a button where you can click to get random pictures<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"270\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-2-1024x270.png\" alt=\"\" class=\"wp-image-441\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-2-1024x270.png 1024w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-2-300x79.png 300w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-2-768x203.png 768w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-2.png 1190w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is the Java part of the code where it does the most important part <\/p>\n\n\n\n<p>the line 3 of code is responsible for getting the pictures from a api website  and the await tells the code to wait before <\/p>\n\n\n\n<p>running the other codes and to wait until the pictures are loaded first then start  so the codes don&#8217;t get messed up<\/p>\n\n\n\n<p>the line 9 and 10 are for catching the errors <\/p>\n\n\n\n<p>the document is responsible for button and when you click you get the picture<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-3-1024x536.png\" alt=\"\" class=\"wp-image-442\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-3-1024x536.png 1024w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-3-300x157.png 300w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-3-768x402.png 768w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2026\/03\/cats-3.png 1062w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The style is responsible for look of the website <\/p>\n\n\n\n<p>I Changed fonts and the color of the website to more appealing one <\/p>\n\n\n\n<p>I can&#8217;t seem to have Access to my videos I recorded of my website so I can&#8217;t post it here for the moment <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I decided to work on a simple API website where the button gets me random pictures of cats I did very simple codes This html code is responsible for the buttons and the image the code div id is a button where you can click to get random pictures This is the Java part [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":443,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-439","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free-friday"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/comments?post=439"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/439\/revisions"}],"predecessor-version":[{"id":444,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/439\/revisions\/444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media\/443"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media?parent=439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/categories?post=439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/tags?post=439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}