1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[400],{6979:(e,i,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/anime",function(){return s(2577)}])},2577:(e,i,s)=>{"use strict";s.r(i),s.d(i,{default:()=>p,useTOC:()=>c});var a=s(4848),t=s(7849),n=s(7649),r=s(8023),h=s(7049),l=s(8942),d=s(2996),o=s(2097);function c(e){return[{value:"Endpoint:",id:"endpoint",depth:3},{value:"Return",id:"return",depth:3},{value:"Example:",id:"example",depth:3}]}function k(e,i){throw Error("Expected "+(i?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p=(0,t.e)(function(e){let{toc:i=c(e)}=e,s={blockquote:"blockquote",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",span:"span",...(0,r.R)(),...e.components};return l||k("Callout",!1),l.Icon||k("Callout.Icon",!0),l.Root||k("Callout.Root",!0),l.Text||k("Callout.Text",!0),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h1,{children:"Get information of a given Anime"}),"\n",(0,a.jsxs)(l.Root,{size:"1",color:"orange",children:[(0,a.jsx)(l.Icon,{children:(0,a.jsx)(h.JD_,{})}),(0,a.jsx)(l.Text,{weight:"medium",children:(0,a.jsx)(d.E,{children:"This is a protected endpoint. Authentication requried!"})})]}),"\n",(0,a.jsx)(s.p,{children:"It accepts a valid anime ID or name as path parameter in the endpoint and returns all information on that anime."}),"\n",(0,a.jsx)(s.h3,{id:i[0].id,children:i[0].value}),"\n",(0,a.jsx)(s.pre,{icon:o.k3,tabIndex:"0","data-language":"sh","data-word-wrap":"",children:(0,a.jsxs)(s.code,{children:[(0,a.jsx)(s.span,{children:(0,a.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"# Using anime id"})}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"/anime/"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<anime_id>"})]}),"\n",(0,a.jsx)(s.span,{children:" "}),"\n",(0,a.jsx)(s.span,{children:(0,a.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"# Or using anime name"})}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"/anime/"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"<anime_name>"})]})]})}),"\n",(0,a.jsxs)(s.blockquote,{children:["\n",(0,a.jsx)(s.p,{children:"Event tho both of the above approaches work. Quering an anime information via anime ID is generally recommended for more accurate and faster response. Using anime name can lead to inaccuate results if the name does not match properly."}),"\n"]}),"\n",(0,a.jsx)(s.h3,{id:i[1].id,children:i[1].value}),"\n",(0,a.jsx)(s.p,{children:"It will return the following JSON object:"}),"\n",(0,a.jsx)(s.pre,{tabIndex:"0","data-language":"json","data-word-wrap":"",children:(0,a.jsxs)(s.code,{children:[(0,a.jsx)(s.span,{children:(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"{"})}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:' "status"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"success"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:' "data"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": {"})]}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:' "id"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"188"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:' "name"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"One Punch Man"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:' "episodeCount"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"12"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:' "summary"'}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"The seemingly unimpressive Saitama has a rather unique hobby: being a hero. In order to pursue his childhood dream, Saitama relentlessly trained for three years, losing all of his hair in the process. Now, Saitama is so powerful, he can defeat any enemy with just one punch. However, having no one capable of matching his strength has led Saitama to an unexpected problemâhe is no longer able to enjoy the thrill of battling and has become quite bored. One day, Saitama catches the attention of 19-year-old cyborg Genos, who witnesses his power and wishes to become Saitama\'s disciple. Genos proposes that the two join the Hero Association in order to become certified heroes that will be recognized for their positive contributions to society. Saitama, who is shocked that no one knows who he is, quickly agrees. Meeting new allies and taking on new foes, Saitama embarks on a new journey as a member of the Hero Association to experience the excitement of battle he once felt."'})]}),"\n",(0,a.jsx)(s.span,{children:(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" }"})}),"\n",(0,a.jsx)(s.span,{children:(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"}"})})]})}),"\n",(0,a.jsx)(s.h3,{id:i[2].id,children:i[2].value}),"\n",(0,a.jsxs)(s.blockquote,{children:["\n",(0,a.jsxs)(s.p,{children:["We are using the built-in global ",(0,a.jsx)(s.code,{children:"fetch"})," API here, which is both available in browser and NodeJS as of now. But you can use any other programming language or request lib."]}),"\n"]}),"\n",(0,a.jsx)(s.pre,{icon:o.js,tabIndex:"0","data-language":"js","data-word-wrap":"",children:(0,a.jsxs)(s.code,{children:[(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" response"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" await"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" fetch"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"`${"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"BASE_URL"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"}/anime/188`"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"})]}),"\n",(0,a.jsx)(s.span,{children:(0,a.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// or"})}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" response"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" await"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" fetch"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"`${"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"BASE_URL"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"}/anime/One Punch Man`"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"})]}),"\n",(0,a.jsx)(s.span,{children:" "}),"\n",(0,a.jsxs)(s.span,{children:[(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" quote"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" await"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" response."}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"json"}),(0,a.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}
1,children:"()"})]})]})})]})},"/docs/anime",{filePath:"pages/docs/anime/index.mdx",timestamp:1745305424e3,pageMap:n.O,frontMatter:{},title:"Get information of a given Anime"},"undefined"==typeof RemoteContent?c:RemoteContent.useTOC)},8942:(e,i,s)=>{"use strict";s.r(i),s.d(i,{Icon:()=>x,Root:()=>m,Text:()=>j});var a=s(6540),t=s(6942),n=s(3362),r=s(2996),h=s(2980),l=s(8542),d=s(4084);let o={...h.f,size:{type:"enum",className:"rt-r-size",values:["1","2","3"],default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:["soft","surface","outline"],default:"soft"},...l.un,...d.Z};var c=s(5686),k=s(2276),p=s(7086);let u=a.createContext({}),m=a.forwardRef((e,i)=>{let{size:s=o.size.default}=e,{asChild:r,children:h,className:l,color:d,...k}=(0,c.o)(e,o,p.y),m=r?n.bL:"div";return a.createElement(m,{"data-accent-color":d,...k,className:t("rt-CalloutRoot",l),ref:i},a.createElement(u.Provider,{value:a.useMemo(()=>({size:s}),[s])},h))});m.displayName="Callout.Root";let x=a.forwardRef(({className:e,...i},s)=>a.createElement("div",{...i,className:t("rt-CalloutIcon",e),ref:s}));x.displayName="Callout.Icon";let j=a.forwardRef(({className:e,...i},s)=>{let{size:n}=a.useContext(u);return a.createElement(r.E,{as:"p",size:(0,k.AY)(n,k.Rw),...i,asChild:!1,ref:s,className:t("rt-CalloutText",e)})});j.displayName="Callout.Text"},7649:(e,i,s)=>{"use strict";s.d(i,{O:()=>a});let a=[{name:"docs",route:"/docs",children:[{data:{index:{title:"Overview",theme:{footer:!0,sidebar:!0,toc:!1}},auth:{title:"Authentication",theme:{footer:!0,sidebar:!0,toc:!1}}}},{name:"anime",route:"/docs/anime",children:[{data:{index:{title:"Get anime information"}}},{name:"index",route:"/docs/anime",frontMatter:{sidebarTitle:"Index"}}]},{name:"auth",route:"/docs/auth",frontMatter:{sidebarTitle:"Auth"}},{name:"index",route:"/docs",frontMatter:{sidebarTitle:"Index"}},{name:"quote",route:"/docs/quote",children:[{data:{index:{title:"The `Quote` object"},random:{title:"Get random quote"},"random-via-anime":{title:"Get random quote via anime"},"random-via-character":{title:"Get random quote via character"},"quotes-by-anime":{title:"Get quotes by anime"},"quotes-by-character":{title:"Get quotes by character"},pagination:{title:"Pagination"}}},{name:"index",route:"/docs/quote",frontMatter:{sidebarTitle:"Index"}},{name:"pagination",route:"/docs/quote/pagination",frontMatter:{sidebarTitle:"Pagination"}},{name:"quotes-by-anime",route:"/docs/quote/quotes-by-anime",frontMatter:{sidebarTitle:"Quotes by Anime"}},{name:"quotes-by-character",route:"/docs/quote/quotes-by-character",frontMatter:{sidebarTitle:"Quotes by Character"}},{name:"random-via-anime",route:"/docs/quote/random-via-anime",frontMatter:{sidebarTitle:"Random via Anime"}},{name:"random-via-character",route:"/docs/quote/random-via-character",frontMatter:{sidebarTitle:"Random via Character"}},{name:"random",route:"/docs/quote/random",frontMatter:{sidebarTitle:"Random"}}]}]}]}},e=>{var i=i=>e(e.s=i);e.O(0,[965,849,636,593,792],()=>i(6979)),_N_E=e.O()}]);
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.