ଠିକ୍ ଉପାଦାନ ଚୁକ୍ତି ଖୋଜନ୍ତୁ
ଉପାଦାନ ଖୋଜନ୍ତୁ। ଏହାର ସଠିକ୍ API ପଢ଼ନ୍ତୁ।
ସାର୍ବଜନୀନ ସୂଚୀ, ସଂରଚିତ API ସୂଚକ, ବିଭାଗଭିତ୍ତିକ ସନ୍ଦର୍ଭ ଓ MCP ସନ୍ଧାନରେ ଗୁଣଧର୍ମ, ଘଟଣା, ସ୍ଲଟ୍, ନିର୍ଭରତା ଓ ସ୍ଥାନାନ୍ତର ମାର୍ଗଦର୍ଶନ ମିଳେ। ତେଣୁ କୋଡିଂ ଏଜେଣ୍ଟ ମାର୍କଅପ୍ ଲେଖିବା ପୂର୍ବରୁ ଠିକ୍ ଚୁକ୍ତି ଯାଞ୍ଚ କରିପାରେ।
ଉଦାହରଣ
ଏକ କମ୍ପୋନେଣ୍ଟ ଖୋଜନ୍ତୁ, ତା’ପରେ ଏହାର ସଠିକ୍ API ପଢ଼ନ୍ତୁ।
const origin = 'https://www.lyra-ui.com/api/v1/components';
const search = await fetch(origin + '/search?q=combobox');
if (!search.ok) throw new Error('Component search failed');
const { matches } = await search.json();
const tag = matches[0]?.tag;
if (tag) {
const response = await fetch(origin + '/' + encodeURIComponent(tag));
if (!response.ok) throw new Error('Component reference failed');
const reference = await response.json();
console.log(reference.markdown);
}