diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3ad588aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# dependencies +node_modules + +# misc +.DS_Store + +# debug +npm-debug.log* + diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..fab93065 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,6 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +node ./scripts/update-data-file.js +git add **/data.json +npx lint-staged diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..dca71acf --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "trailingComma": "none", + "bracketSpacing": false, + "arrowParens": "avoid", + "singleQuote": true, + "printWidth": 80, + "useTabs": true, + "tabWidth": 4, + "semi": true +} diff --git a/README.md b/README.md deleted file mode 100644 index f63bb1fb..00000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# DevRel Stack Data - -All the files are in the [production](https://github.com/RapidAPI/DevRel-Stack-Contents/tree/production) branch so that Google won't index GitHub hosted content. diff --git a/authors/ahmad-awais/avatar.png b/authors/ahmad-awais/avatar.png new file mode 100644 index 00000000..6d9d3c39 Binary files /dev/null and b/authors/ahmad-awais/avatar.png differ diff --git a/authors/ahmad-bilal/avatar.png b/authors/ahmad-bilal/avatar.png new file mode 100644 index 00000000..33ae693c Binary files /dev/null and b/authors/ahmad-bilal/avatar.png differ diff --git a/authors/ania-kubow/avatar.png b/authors/ania-kubow/avatar.png new file mode 100644 index 00000000..1811e720 Binary files /dev/null and b/authors/ania-kubow/avatar.png differ diff --git a/authors/catalin-pit/avatar.png b/authors/catalin-pit/avatar.png new file mode 100644 index 00000000..6fcf345b Binary files /dev/null and b/authors/catalin-pit/avatar.png differ diff --git a/authors/code-with-tomi/avatar.png b/authors/code-with-tomi/avatar.png new file mode 100644 index 00000000..cd9d2936 Binary files /dev/null and b/authors/code-with-tomi/avatar.png differ diff --git a/authors/coder-coder/avatar.png b/authors/coder-coder/avatar.png new file mode 100644 index 00000000..db44b2a9 Binary files /dev/null and b/authors/coder-coder/avatar.png differ diff --git a/authors/codestackr/avatar.png b/authors/codestackr/avatar.png new file mode 100644 index 00000000..44a838c1 Binary files /dev/null and b/authors/codestackr/avatar.png differ diff --git a/authors/data.json b/authors/data.json new file mode 100644 index 00000000..f05f18da --- /dev/null +++ b/authors/data.json @@ -0,0 +1,114 @@ +{ + "ahmad-awais": { + "name": "Ahmad Awais", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/ahmad-awais/avatar.png", + "designation": "Head of Developer Relations, RapidAPI", + "isDeveloperProgramMember": true, + "bio": "Ahmad Awais is an award-winning open-source engineer. Head of Developer Relations at RapidAPI. His software serves millions of developers. Code he wrote went to Mars. “What an awesome example for developers,” said Satya Nadella, CEO of Microsoft — featuring Awais’s code contribution to NASA Ingenuity Mars mission. He’s a Google Devs Expert and recipient of the 8th GitHub Stars gold award.​" + }, + "richard-doe": { + "name": "Richard Doe", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/richard-doe/avatar.png", + "designation": "Content Producer @ RapidAPI", + "isDeveloperProgramMember": false, + "bio": "Sample user bio." + }, + "saad": { + "name": "Saad Irfan", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/saad/avatar.png", + "designation": "RapidAPI Content Dev Student Expert", + "isDeveloperProgramMember": true, + "bio": "Saad is a frontend developer, Student Expert at RapidAPI, Next.js Conf 2021 speaker, open-sourcerer, Major League Hacking fellow, former Developer Advocate at Worwox, Technical Writer, and a guitarist. He has authored 20+ open-source tools that are used by thousands of developers. He also founded Google’s Developer Students Club at his college and is a part of Microsoft’s Student program." + }, + "pratham": { + "name": "Pratham", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/pratham/avatar.png", + "designation": "Developer Advocate @ RapidAPI", + "isDeveloperProgramMember": true, + "bio": "I break Web Development into pieces reducing its difficulty to 2%. Over 50 million developers worldwide read my content on Twitter every month. I'm a CSS fanatic who loves to create CSS arts and illustrations on Codepen where thousands of developers love my work. " + }, + "ahmad-bilal": { + "name": "Ahmad Bilal", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/ahmad-bilal/avatar.png", + "designation": "RapidAPI Content Dev Student Expert", + "isDeveloperProgramMember": true, + "bio": "Bilal is a Full Stack Web Engineer and Developer Advocacy Enthusiast. Being an avid open-sourcerer; he has curated & contributed to software being used by many. Google Summer of Code'19. Speaker. Loves to write and create content for developers." + }, + "javascript-mastery": { + "name": "JavaScript Mastery", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/javascript-mastery/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "The purpose of JavaScript Mastery is to help aspiring and established developers to take their development skills to the next level and build awesome apps." + }, + "siraj-raval": { + "name": "Siraj Raval", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/siraj-raval/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": " I'm a technologist on a mission to spread data literacy. Artificial Intelligence, Mathematics, Science, Technology, I simplify these topics to help you understand how they work. Using this knowledge you can build wealth and live a happier, more meaningful life. I live to serve this community. We are the fastest growing AI community in the world! " + }, + "coder-coder": { + "name": "Jessica Chan", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/coder-coder/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "Practical tips for the beginner web developer." + }, + "codestackr": { + "name": "codeSTACKr", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/codestackr/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "I create the best content I possibly can to give away free. My tutorials are generally about web development and include coding languages such as HTML, CSS, Sass, JavaScript, and TypeScript. Subscribe to my YouTube channel for the latest content." + }, + "weibenfalk": { + "name": "Weibenfalk", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/weibenfalk/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "I'm Thomas Weibenfalk. A developer and designer from Sweden. I share my knowledge of modern front end development in a (hopefully) down to earth and fun way! I'll cover topics as React, Vanilla Javascript, Gatsby, CSS, HTML and occasional backend development. A lot of the focus is on ReactJS cause I love it! As I'm also a designer there might even be some UI/UX stuff from time to time." + }, + "naveen-kumar-namachivayam": { + "name": "NaveenKumar Namachivayam", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/naveen-kumar-namachivayam/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "I am a performance engineer ⚡. I break stuffs 🔨. I make videos about performance testing tools, performance engineering and more. If you are still reading this 💙, here is the special discount for you https://qain.si/devweb, coupon code: YOUTUBE. 🙏 Please connect me on LinkedIn https://www.linkedin.com/in/naveenkumarn/ | Join QAInsights Community at https://community.qainsights.com/" + }, + "catalin-pit": { + "name": "Catalin Pit", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/catalin-pit/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "A software engineer that talks about all topics in tech. I create programming tutorials; mostly about Web Development and JavaScript. Occasionally, I cover other topics as well! I also create developer vlogs where I talk about other topics than coding." + }, + "program-with-gio": { + "name": "Gio", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/program-with-gio/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "I've been coding since 2005 & my very first website was built with HTML, CSS, & PHP all in a single index.php file (good old times). I decided to make my own channel and start producing content on things that I know & have learned over the years as well as the things that I will learn along the way. Currently, my main stack consists of PHP, Laravel, GraphQL, React JS (Next.js & Gatsby) & Tailwind CSS. (Though, I am planning on exploring others soon like Flutter & Dart)" + }, + "code-with-tomi": { + "name": "Tomi Tokko", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/code-with-tomi/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "I teach about coding and i build cool projects. So, stay tuned to the channel to get quality contents." + }, + "ania-kubow": { + "name": "Ania Kubów", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/ania-kubow/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "My name is Ania Kubow and I am a Software Developer (ex-Eurostar) who quit the rat race to focus on my channel and teach others how to code by building retro Games and awesome projects. I am also part of the core team @FreeCodeCamp. You can find me putting out videos on there, as well as on my own channel every Wednesday (and sometimes an extra one during the week too)!" + }, + "max": { + "name": "Max Programming", + "avatar": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/authors/max/avatar.png", + "designation": "", + "isDeveloperProgramMember": false, + "bio": "My name is Usman and this channel is mainly focused on programming and web development." + } +} diff --git a/authors/javascript-mastery/avatar.png b/authors/javascript-mastery/avatar.png new file mode 100644 index 00000000..b4be7d02 Binary files /dev/null and b/authors/javascript-mastery/avatar.png differ diff --git a/authors/max/avatar.png b/authors/max/avatar.png new file mode 100644 index 00000000..2cd6ea30 Binary files /dev/null and b/authors/max/avatar.png differ diff --git a/authors/naveen-kumar-namachivayam/avatar.png b/authors/naveen-kumar-namachivayam/avatar.png new file mode 100644 index 00000000..5e22370f Binary files /dev/null and b/authors/naveen-kumar-namachivayam/avatar.png differ diff --git a/authors/pratham/avatar.png b/authors/pratham/avatar.png new file mode 100644 index 00000000..a27ff502 Binary files /dev/null and b/authors/pratham/avatar.png differ diff --git a/authors/program-with-gio/avatar.png b/authors/program-with-gio/avatar.png new file mode 100644 index 00000000..b6415d92 Binary files /dev/null and b/authors/program-with-gio/avatar.png differ diff --git a/authors/richard-doe/avatar.png b/authors/richard-doe/avatar.png new file mode 100644 index 00000000..500b8f95 Binary files /dev/null and b/authors/richard-doe/avatar.png differ diff --git a/authors/saad/avatar.png b/authors/saad/avatar.png new file mode 100644 index 00000000..8f9d50b6 Binary files /dev/null and b/authors/saad/avatar.png differ diff --git a/authors/siraj-raval/avatar.png b/authors/siraj-raval/avatar.png new file mode 100644 index 00000000..c885a8c0 Binary files /dev/null and b/authors/siraj-raval/avatar.png differ diff --git a/authors/weibenfalk/avatar.png b/authors/weibenfalk/avatar.png new file mode 100644 index 00000000..5dfb6c6f Binary files /dev/null and b/authors/weibenfalk/avatar.png differ diff --git a/categories/data.json b/categories/data.json new file mode 100644 index 00000000..c4fad4fa --- /dev/null +++ b/categories/data.json @@ -0,0 +1,34 @@ +{ + "api": { + "name": "API", + "color": "orange" + }, + "http": { + "name": "HTTP", + "color": "yellow" + }, + "interactive": { + "name": "Interactive", + "color": "green" + }, + "apps": { + "name": "Apps", + "color": "brown" + }, + "webApis": { + "name": "Web APIs", + "color": "purple" + }, + "bestPractices": { + "name": "Best Practices", + "color": "maroon" + }, + "rapidapi": { + "name": "RapidAPI", + "color": "blue" + }, + "comparison": { + "name": "Comparison", + "color": "cyan" + } +} diff --git a/courses/assets/favicon-96x96.png b/courses/assets/favicon-96x96.png new file mode 100644 index 00000000..e5934eb7 Binary files /dev/null and b/courses/assets/favicon-96x96.png differ diff --git a/courses/assets/ogg.jpg b/courses/assets/ogg.jpg new file mode 100644 index 00000000..a118b6c2 Binary files /dev/null and b/courses/assets/ogg.jpg differ diff --git a/courses/assets/rapidapi-logo.png b/courses/assets/rapidapi-logo.png new file mode 100644 index 00000000..a18710cd Binary files /dev/null and b/courses/assets/rapidapi-logo.png differ diff --git a/courses/assets/rapidapi-og.png b/courses/assets/rapidapi-og.png new file mode 100644 index 00000000..ae26a519 Binary files /dev/null and b/courses/assets/rapidapi-og.png differ diff --git a/courses/config.json b/courses/config.json new file mode 100644 index 00000000..c749109a --- /dev/null +++ b/courses/config.json @@ -0,0 +1,13 @@ +{ + "siteName": "RapidAPI Courses", + "type": "website", + "description": "Free video courses by RapidAPI and RapidAPI Developer Experts offer short to help you become a pro API Developer.", + "language": "en", + "locale": "en_US", + "siteUrl": "https://rapidapi.com/courses", + "siteLogo": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/courses/assets/rapidapi-logo.png", + "siteFavicon": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/courses/assets/favicon-96x96.png", + "ogImage": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/courses/assets/ogg.jpg", + "socialBanner": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/courses/assets/rapidapi-logo.png", + "twitter": "rapid_api" +} diff --git a/courses/data.json b/courses/data.json new file mode 100644 index 00000000..ce16f272 --- /dev/null +++ b/courses/data.json @@ -0,0 +1,31 @@ +[ + {"source": "wordle-clone-javascript"}, + {"source": "build-deploy-5-javascript-react-api-projects"}, + {"source": "master-use-apis-testing"}, + {"source": "5-api-projects-5-hours"}, + {"source": "word-association-game"}, + {"source": "perceiver-for-cardiac-video-data-classification"}, + {"source": "multiomics-data-for-cancer-diagnosis"}, + {"source": "mint-genome-nft"}, + {"source": "building-health-dao-with-github-copilot"}, + {"source": "build-deploy-number-fact-discord-bot-using-node.js-and-heroku"}, + {"source": "build-deploy-modern-real-estate-app"}, + {"source": "build-deploy-google-search-with-react-tailwind-css"}, + {"source": "build-crypto-dashboard"}, + {"source": "api-crash-course-integrate-build-sell-api"}, + {"source": "build-and-sell-your-own-api"}, + {"source": "turn-api-startup"}, + {"source": "build-deploy-google-maps-travel-companion-application"}, + { + "source": "build-deploy-react-cryptocurrency-app-master-redux-toolkit-video" + }, + {"source": "building-node-js-app-javascript-noob"}, + {"source": "convolutional-networks-heart-disease-prediction"}, + {"source": "4-apis-manage-multiple-apis-application-programming-interface"}, + {"source": "4-steps-millions-api"}, + {"source": "money-developer-selling-apis"}, + {"source": "integrate-multiple-apis-laravel-app-rapidapi"}, + {"source": "react-google-maps-geolocation-react-typescript"}, + {"source": "build-full-working-api-django-publicizing-rapidapi"}, + {"source": "crash-api-testing-rapidapi-github-actions"} +] diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/breaking-news-api.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/breaking-news-api.md new file mode 100644 index 00000000..46670dce --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/breaking-news-api.md @@ -0,0 +1,15 @@ +--- +title: Breaking News API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/chuck-norris-api.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/chuck-norris-api.md new file mode 100644 index 00000000..49f96b3c --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/chuck-norris-api.md @@ -0,0 +1,15 @@ +--- +title: Chuck Norris API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/geo-location-api.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/geo-location-api.md new file mode 100644 index 00000000..31d1f219 --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/geo-location-api.md @@ -0,0 +1,15 @@ +--- +title: Geo Location API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/index-html.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/index-html.md new file mode 100644 index 00000000..c3c3a638 --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/index-html.md @@ -0,0 +1,15 @@ +--- +title: index.html +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/index.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/index.md new file mode 100644 index 00000000..adce8e20 --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/index.md @@ -0,0 +1,22 @@ +--- +title: 4 APIs at ONCE! | How To Manage Multiple APIs (Application Programming Interface) +description: Let's say you have an application that uses multiple APIs from various platforms. Each API has its own key and its own way of managing access. What if I told you that there's a platform where you can manage all of your APIs in one spot? We're going to build an app that consumes multiple APIs using RapidAPI to see how easy it is to use. We'll create a quick project by using Vite.js and Tailwind CSS, then use RapidAPI to connect to 4 APIs and consume their data. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +modules: + - source: index +lessons: + - source: intro + - source: rapidapi-marketplace + - source: project-setup-vite-js + - source: index-html + - source: main-js-setup + - source: geo-location-api + - source: open-weather-api + - source: chuck-norris-api + - source: breaking-news-api +videoId: NFToND6x_nI +--- diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/intro.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/intro.md new file mode 100644 index 00000000..ff83ec65 --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/main-js-setup.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/main-js-setup.md new file mode 100644 index 00000000..7220d048 --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/main-js-setup.md @@ -0,0 +1,15 @@ +--- +title: main.js setup +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/open-weather-api.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/open-weather-api.md new file mode 100644 index 00000000..21d32f32 --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/open-weather-api.md @@ -0,0 +1,15 @@ +--- +title: Open Weather API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/project-setup-vite-js.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/project-setup-vite-js.md new file mode 100644 index 00000000..f77c3287 --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/project-setup-vite-js.md @@ -0,0 +1,15 @@ +--- +title: Project Setup (Vite.js) +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/rapidapi-marketplace.md b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/rapidapi-marketplace.md new file mode 100644 index 00000000..c37ab1ac --- /dev/null +++ b/courses/posts/4-apis-manage-multiple-apis-application-programming-interface/rapidapi-marketplace.md @@ -0,0 +1,15 @@ +--- +title: RapidAPI Marketplace +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/api.md b/courses/posts/4-steps-millions-api/api.md new file mode 100644 index 00000000..87161a42 --- /dev/null +++ b/courses/posts/4-steps-millions-api/api.md @@ -0,0 +1,15 @@ +--- +title: What is an API? +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/build.md b/courses/posts/4-steps-millions-api/build.md new file mode 100644 index 00000000..e90f6a3b --- /dev/null +++ b/courses/posts/4-steps-millions-api/build.md @@ -0,0 +1,15 @@ +--- +title: The Build +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/conclusion.md b/courses/posts/4-steps-millions-api/conclusion.md new file mode 100644 index 00000000..84f3bc9c --- /dev/null +++ b/courses/posts/4-steps-millions-api/conclusion.md @@ -0,0 +1,15 @@ +--- +title: Conclusion +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/host.md b/courses/posts/4-steps-millions-api/host.md new file mode 100644 index 00000000..ada5936c --- /dev/null +++ b/courses/posts/4-steps-millions-api/host.md @@ -0,0 +1,15 @@ +--- +title: The Host +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/idea.md b/courses/posts/4-steps-millions-api/idea.md new file mode 100644 index 00000000..c129dee8 --- /dev/null +++ b/courses/posts/4-steps-millions-api/idea.md @@ -0,0 +1,15 @@ +--- +title: The Idea +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/index.md b/courses/posts/4-steps-millions-api/index.md new file mode 100644 index 00000000..77015fdb --- /dev/null +++ b/courses/posts/4-steps-millions-api/index.md @@ -0,0 +1,21 @@ +--- +title: 4 Steps to Make $Millions with an API +description: There's an API for just about everything these days. Let me show you how to build your own API and make money from it. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +modules: + - source: index +lessons: + - source: intro + - source: api + - source: steps-making-api + - source: idea + - source: build + - source: host + - source: sell + - source: conclusion +videoId: GpYboktUnTY +--- diff --git a/courses/posts/4-steps-millions-api/intro.md b/courses/posts/4-steps-millions-api/intro.md new file mode 100644 index 00000000..5c886db3 --- /dev/null +++ b/courses/posts/4-steps-millions-api/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/sell.md b/courses/posts/4-steps-millions-api/sell.md new file mode 100644 index 00000000..39df8513 --- /dev/null +++ b/courses/posts/4-steps-millions-api/sell.md @@ -0,0 +1,15 @@ +--- +title: The Sell +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/4-steps-millions-api/steps-making-api.md b/courses/posts/4-steps-millions-api/steps-making-api.md new file mode 100644 index 00000000..bacac830 --- /dev/null +++ b/courses/posts/4-steps-millions-api/steps-making-api.md @@ -0,0 +1,15 @@ +--- +title: Steps to making an API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/5-api-projects-5-hours/crypto-dashboard-react-part-2.md b/courses/posts/5-api-projects-5-hours/crypto-dashboard-react-part-2.md new file mode 100644 index 00000000..d207fc9f --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/crypto-dashboard-react-part-2.md @@ -0,0 +1,15 @@ +--- +title: Crypto dashboard - optional part 2 - backend in Node.js +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/5-api-projects-5-hours/crypto-dashboard-react.md b/courses/posts/5-api-projects-5-hours/crypto-dashboard-react.md new file mode 100644 index 00000000..675e72a8 --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/crypto-dashboard-react.md @@ -0,0 +1,15 @@ +--- +title: Crypto dashboard in React +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/5-api-projects-5-hours/index.md b/courses/posts/5-api-projects-5-hours/index.md new file mode 100644 index 00000000..c11f12b0 --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/index.md @@ -0,0 +1,21 @@ +--- +title: 5 API Projects in 5 hours +description: In this video I show you how to use 4 different APIs, and create your own. We will use a Sudoku Solver API, a Crypto Exchange Rate API, A Crypto News API, A Word Association API and create a WebScraper API. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +modules: + - source: index +lessons: + - source: introduction + - source: sudoku-solver-javascript + - source: crypto-dashboard-react + - source: crypto-dashboard-react-part-2 + - source: word-game-react + - source: word-game-react-part-2 + - source: make-your-own-api + +videoId: WDwhJNbWka0 +--- diff --git a/courses/posts/5-api-projects-5-hours/introduction.md b/courses/posts/5-api-projects-5-hours/introduction.md new file mode 100644 index 00000000..a043b451 --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/introduction.md @@ -0,0 +1,15 @@ +--- +title: Introduction +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/5-api-projects-5-hours/make-your-own-api.md b/courses/posts/5-api-projects-5-hours/make-your-own-api.md new file mode 100644 index 00000000..f0c76d2e --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/make-your-own-api.md @@ -0,0 +1,15 @@ +--- +title: Make your own API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/5-api-projects-5-hours/sudoku-solver-javascript.md b/courses/posts/5-api-projects-5-hours/sudoku-solver-javascript.md new file mode 100644 index 00000000..b7226c4e --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/sudoku-solver-javascript.md @@ -0,0 +1,15 @@ +--- +title: Sudoku Solver in JavaScript +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/5-api-projects-5-hours/word-game-react-part-2.md b/courses/posts/5-api-projects-5-hours/word-game-react-part-2.md new file mode 100644 index 00000000..4e97d0db --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/word-game-react-part-2.md @@ -0,0 +1,15 @@ +--- +title: Word game - optional part 2 - backend in Node.js +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/5-api-projects-5-hours/word-game-react.md b/courses/posts/5-api-projects-5-hours/word-game-react.md new file mode 100644 index 00000000..4808931e --- /dev/null +++ b/courses/posts/5-api-projects-5-hours/word-game-react.md @@ -0,0 +1,15 @@ +--- +title: Word game in React +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/breaking-news-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/breaking-news-api.md new file mode 100644 index 00000000..cd04f70a --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/breaking-news-api.md @@ -0,0 +1,15 @@ +--- +title: Breaking News API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/building-an-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/building-an-api.md new file mode 100644 index 00000000..e26400d9 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/building-an-api.md @@ -0,0 +1,15 @@ +--- +title: Building an API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/building-and-sell-your-own-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/building-and-sell-your-own-api.md new file mode 100644 index 00000000..76ed8d08 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/building-and-sell-your-own-api.md @@ -0,0 +1,15 @@ +--- +title: Build and Sell your own API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/chuck-norris-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/chuck-norris-api.md new file mode 100644 index 00000000..73554c61 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/chuck-norris-api.md @@ -0,0 +1,15 @@ +--- +title: Chuck Norris API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/geolocation-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/geolocation-api.md new file mode 100644 index 00000000..d3dc75f2 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/geolocation-api.md @@ -0,0 +1,15 @@ +--- +title: Geolocation API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/hosting-an-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/hosting-an-api.md new file mode 100644 index 00000000..a45c63d8 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/hosting-an-api.md @@ -0,0 +1,15 @@ +--- +title: Hosting an API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/index.md b/courses/posts/api-crash-course-integrate-build-sell-api/index.md new file mode 100644 index 00000000..7b7f5870 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/index.md @@ -0,0 +1,25 @@ +--- +title: API Crash Course - Integrate, Build, & Sell an API +description: In this API Crash Course, I'll teach you what an API is, how to use multiple APIs in your application, and even how to build and sell your own API to make money! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +modules: + - source: index +lessons: + - source: intro + - source: what-is-api + - source: integrating-multiple-apis + - source: geolocation-api + - source: weather-api + - source: chuck-norris-api + - source: breaking-news-api + - source: building-and-sell-your-own-api + - source: building-an-api + - source: testing-our-api-using-paw + - source: hosting-an-api + - source: selling-an-api +videoId: FMJwaA2WMjc +--- diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/integrating-multiple-apis.md b/courses/posts/api-crash-course-integrate-build-sell-api/integrating-multiple-apis.md new file mode 100644 index 00000000..8395665d --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/integrating-multiple-apis.md @@ -0,0 +1,15 @@ +--- +title: Integrating multiple APIs +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/intro.md b/courses/posts/api-crash-course-integrate-build-sell-api/intro.md new file mode 100644 index 00000000..843d3f85 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/selling-an-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/selling-an-api.md new file mode 100644 index 00000000..1e9fa7a6 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/selling-an-api.md @@ -0,0 +1,15 @@ +--- +title: Selling an API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/testing-our-api-using-paw.md b/courses/posts/api-crash-course-integrate-build-sell-api/testing-our-api-using-paw.md new file mode 100644 index 00000000..8afa3a00 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/testing-our-api-using-paw.md @@ -0,0 +1,15 @@ +--- +title: Testing our API using PAW +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/weather-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/weather-api.md new file mode 100644 index 00000000..57bf296f --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/weather-api.md @@ -0,0 +1,15 @@ +--- +title: Weather API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/api-crash-course-integrate-build-sell-api/what-is-api.md b/courses/posts/api-crash-course-integrate-build-sell-api/what-is-api.md new file mode 100644 index 00000000..0a9b1e22 --- /dev/null +++ b/courses/posts/api-crash-course-integrate-build-sell-api/what-is-api.md @@ -0,0 +1,15 @@ +--- +title: What is an API? +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'codestackr' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/adding-endpoints-rapidapi.md b/courses/posts/build-and-sell-your-own-api/adding-endpoints-rapidapi.md new file mode 100644 index 00000000..4a8c2a3a --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/adding-endpoints-rapidapi.md @@ -0,0 +1,15 @@ +--- +title: Adding our Endpoints to RapidAPI +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/adding-pricing-plans.md b/courses/posts/build-and-sell-your-own-api/adding-pricing-plans.md new file mode 100644 index 00000000..37d63599 --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/adding-pricing-plans.md @@ -0,0 +1,15 @@ +--- +title: Adding Pricing Plans +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/creating-api-rapidapi.md b/courses/posts/build-and-sell-your-own-api/creating-api-rapidapi.md new file mode 100644 index 00000000..a0405d8f --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/creating-api-rapidapi.md @@ -0,0 +1,15 @@ +--- +title: Creating our API on RapidAPI +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/creating-node-js-project.md b/courses/posts/build-and-sell-your-own-api/creating-node-js-project.md new file mode 100644 index 00000000..196fcd16 --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/creating-node-js-project.md @@ -0,0 +1,15 @@ +--- +title: Creating our Node.js project +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/creating-rapidapi-account.md b/courses/posts/build-and-sell-your-own-api/creating-rapidapi-account.md new file mode 100644 index 00000000..1fd13100 --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/creating-rapidapi-account.md @@ -0,0 +1,15 @@ +--- +title: Creating a RapidAPI account +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/deploying-heroku.md b/courses/posts/build-and-sell-your-own-api/deploying-heroku.md new file mode 100644 index 00000000..a81f8b83 --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/deploying-heroku.md @@ -0,0 +1,15 @@ +--- +title: Deploying to Heroku +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/index.md b/courses/posts/build-and-sell-your-own-api/index.md new file mode 100644 index 00000000..76479b6d --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/index.md @@ -0,0 +1,27 @@ +--- +title: Build and sell your own API +description: In this video I show you how to make a profitable API and sell it on the RapidAPI Hub. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +modules: + - source: index +lessons: + - source: introduction + - source: overview-of-final-product + - source: creating-rapidapi-account + - source: creating-node-js-project + - source: routing-express + - source: news-source + - source: multiple-news-sources + - source: individual-news-source-parameter + - source: refactoring-prep-deployment + - source: creating-api-rapidapi + - source: deploying-heroku + - source: adding-endpoints-rapidapi + - source: adding-pricing-plans + - source: publishing-api +videoId: GK4Pl-GmPHk +--- diff --git a/courses/posts/build-and-sell-your-own-api/individual-news-source-parameter.md b/courses/posts/build-and-sell-your-own-api/individual-news-source-parameter.md new file mode 100644 index 00000000..a513603c --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/individual-news-source-parameter.md @@ -0,0 +1,15 @@ +--- +title: Getting an individual news source by parameter +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/introduction.md b/courses/posts/build-and-sell-your-own-api/introduction.md new file mode 100644 index 00000000..53f004b5 --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/introduction.md @@ -0,0 +1,15 @@ +--- +title: Introduction +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/multiple-news-sources.md b/courses/posts/build-and-sell-your-own-api/multiple-news-sources.md new file mode 100644 index 00000000..517e5abe --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/multiple-news-sources.md @@ -0,0 +1,15 @@ +--- +title: Getting multiple news sources +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/news-source.md b/courses/posts/build-and-sell-your-own-api/news-source.md new file mode 100644 index 00000000..694729af --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/news-source.md @@ -0,0 +1,15 @@ +--- +title: Getting a news source +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/overview-of-final-product.md b/courses/posts/build-and-sell-your-own-api/overview-of-final-product.md new file mode 100644 index 00000000..9aebe8ea --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/overview-of-final-product.md @@ -0,0 +1,15 @@ +--- +title: Overview of the final product +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/publishing-api.md b/courses/posts/build-and-sell-your-own-api/publishing-api.md new file mode 100644 index 00000000..a18939ba --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/publishing-api.md @@ -0,0 +1,15 @@ +--- +title: Publishing our API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/refactoring-prep-deployment.md b/courses/posts/build-and-sell-your-own-api/refactoring-prep-deployment.md new file mode 100644 index 00000000..3e1a2d21 --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/refactoring-prep-deployment.md @@ -0,0 +1,15 @@ +--- +title: Refactoring and Prep for Deployment +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-and-sell-your-own-api/routing-express.md b/courses/posts/build-and-sell-your-own-api/routing-express.md new file mode 100644 index 00000000..814d8977 --- /dev/null +++ b/courses/posts/build-and-sell-your-own-api/routing-express.md @@ -0,0 +1,15 @@ +--- +title: Routing in Express +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-crypto-dashboard/env-files-react.md b/courses/posts/build-crypto-dashboard/env-files-react.md new file mode 100644 index 00000000..d82a411b --- /dev/null +++ b/courses/posts/build-crypto-dashboard/env-files-react.md @@ -0,0 +1,15 @@ +--- +title: Env files in React +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-crypto-dashboard/exploring-api.md b/courses/posts/build-crypto-dashboard/exploring-api.md new file mode 100644 index 00000000..3477bfe2 --- /dev/null +++ b/courses/posts/build-crypto-dashboard/exploring-api.md @@ -0,0 +1,15 @@ +--- +title: Exploring the API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-crypto-dashboard/index.md b/courses/posts/build-crypto-dashboard/index.md new file mode 100644 index 00000000..714e743f --- /dev/null +++ b/courses/posts/build-crypto-dashboard/index.md @@ -0,0 +1,21 @@ +--- +title: API Project! Build a Crypto Dashboard +description: In this video I show you how to make a Crypto Dashboard using two APIs. This project is great for those looking for fun projects to make with unique APIs. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +modules: + - source: index +lessons: + - source: introduction + - source: exploring-api + - source: setting-up-react-app + - source: lets-get-building + - source: env-files-react + - source: styling-final-fixes + - source: where-to-go-next + +videoId: _itMdiSc0KI +--- diff --git a/courses/posts/build-crypto-dashboard/introduction.md b/courses/posts/build-crypto-dashboard/introduction.md new file mode 100644 index 00000000..ca1591c2 --- /dev/null +++ b/courses/posts/build-crypto-dashboard/introduction.md @@ -0,0 +1,15 @@ +--- +title: Introduction +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-crypto-dashboard/lets-get-building.md b/courses/posts/build-crypto-dashboard/lets-get-building.md new file mode 100644 index 00000000..8aa7fda4 --- /dev/null +++ b/courses/posts/build-crypto-dashboard/lets-get-building.md @@ -0,0 +1,15 @@ +--- +title: Let's get building +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-crypto-dashboard/setting-up-react-app.md b/courses/posts/build-crypto-dashboard/setting-up-react-app.md new file mode 100644 index 00000000..ed6cab75 --- /dev/null +++ b/courses/posts/build-crypto-dashboard/setting-up-react-app.md @@ -0,0 +1,15 @@ +--- +title: Setting up our React App +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-crypto-dashboard/styling-final-fixes.md b/courses/posts/build-crypto-dashboard/styling-final-fixes.md new file mode 100644 index 00000000..7c7cb602 --- /dev/null +++ b/courses/posts/build-crypto-dashboard/styling-final-fixes.md @@ -0,0 +1,15 @@ +--- +title: Styling and final fixes +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-crypto-dashboard/where-to-go-next.md b/courses/posts/build-crypto-dashboard/where-to-go-next.md new file mode 100644 index 00000000..e2bdb310 --- /dev/null +++ b/courses/posts/build-crypto-dashboard/where-to-go-next.md @@ -0,0 +1,15 @@ +--- +title: Where to go next - build a NodeJS backend +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/api-crash-course.md b/courses/posts/build-deploy-5-javascript-react-api-projects/api-crash-course.md new file mode 100644 index 00000000..eaa743cf --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/api-crash-course.md @@ -0,0 +1,15 @@ +--- +title: 'API Crash Course' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/fifth-application.md b/courses/posts/build-deploy-5-javascript-react-api-projects/fifth-application.md new file mode 100644 index 00000000..0af5d2b0 --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/fifth-application.md @@ -0,0 +1,15 @@ +--- +title: 'Fifth application' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/first-application.md b/courses/posts/build-deploy-5-javascript-react-api-projects/first-application.md new file mode 100644 index 00000000..ba6dc0d7 --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/first-application.md @@ -0,0 +1,15 @@ +--- +title: First application +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/fourth-application.md b/courses/posts/build-deploy-5-javascript-react-api-projects/fourth-application.md new file mode 100644 index 00000000..2484017b --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/fourth-application.md @@ -0,0 +1,15 @@ +--- +title: 'Fourth application' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/index.md b/courses/posts/build-deploy-5-javascript-react-api-projects/index.md new file mode 100644 index 00000000..5262f42a --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/index.md @@ -0,0 +1,20 @@ +--- +title: Build and Deploy 5 JavaScript & React API Projects in 10 Hours +description: Welcome to the ultimate course, which will help you become a master of APIs by Building Real Industry Applications. In this compilation of videos, you'll build a Travel Companion App, a Cryptocurrency App, a Real Estate App, a Google Clone App, as well as create your own API! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +modules: + - source: index +lessons: + - source: intro + - source: first-application + - source: api-crash-course + - source: second-application + - source: third-application + - source: fourth-application + - source: fifth-application +videoId: GDa8kZLNhJ4 +--- diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/intro.md b/courses/posts/build-deploy-5-javascript-react-api-projects/intro.md new file mode 100644 index 00000000..86bf83df --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/second-application.md b/courses/posts/build-deploy-5-javascript-react-api-projects/second-application.md new file mode 100644 index 00000000..8499fdf2 --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/second-application.md @@ -0,0 +1,15 @@ +--- +title: 'Second application' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-5-javascript-react-api-projects/third-application.md b/courses/posts/build-deploy-5-javascript-react-api-projects/third-application.md new file mode 100644 index 00000000..3e437ccc --- /dev/null +++ b/courses/posts/build-deploy-5-javascript-react-api-projects/third-application.md @@ -0,0 +1,15 @@ +--- +title: 'Third application' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/change-map-styles.md b/courses/posts/build-deploy-google-maps-travel-companion-application/change-map-styles.md new file mode 100644 index 00000000..eb9a5c4c --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/change-map-styles.md @@ -0,0 +1,15 @@ +--- +title: Change Map Styles +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/demo.md b/courses/posts/build-deploy-google-maps-travel-companion-application/demo.md new file mode 100644 index 00000000..5f337309 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/demo.md @@ -0,0 +1,11 @@ +--- +title: Demo +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/deployment.md b/courses/posts/build-deploy-google-maps-travel-companion-application/deployment.md new file mode 100644 index 00000000..00fa82fc --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/deployment.md @@ -0,0 +1,15 @@ +--- +title: Deployment +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/display-places-map.md b/courses/posts/build-deploy-google-maps-travel-companion-application/display-places-map.md new file mode 100644 index 00000000..361e36c9 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/display-places-map.md @@ -0,0 +1,15 @@ +--- +title: Display Places on the Map +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/env.md b/courses/posts/build-deploy-google-maps-travel-companion-application/env.md new file mode 100644 index 00000000..18208020 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/env.md @@ -0,0 +1,11 @@ +--- +title: ENV +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/folder-structure.md b/courses/posts/build-deploy-google-maps-travel-companion-application/folder-structure.md new file mode 100644 index 00000000..551f6168 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/folder-structure.md @@ -0,0 +1,15 @@ +--- +title: Folder Structure +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/header.md b/courses/posts/build-deploy-google-maps-travel-companion-application/header.md new file mode 100644 index 00000000..81029b57 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/header.md @@ -0,0 +1,15 @@ +--- +title: Header +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/index.md b/courses/posts/build-deploy-google-maps-travel-companion-application/index.md new file mode 100644 index 00000000..0a6bf9b2 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/index.md @@ -0,0 +1,30 @@ +--- +title: Build and Deploy a Google Maps Travel Companion Application +description: 'Geolocation, Google Maps API & Google Places API, fetching API data based on the location, data filtering are just some features that make this Travel Advisor App the best Maps Application that you can currently find on YouTube' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +modules: + - source: index +lessons: + - source: intro + - source: setup + - source: demo + - source: project-setup + - source: folder-structure + - source: header + - source: map + - source: list + - source: working-apis + - source: place-card + - source: display-places-map + - source: scroll-places-filters + - source: places-search + - source: weather-api + - source: change-map-styles + - source: env + - source: deployment +videoId: UKdQjQX1Pko +--- diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/intro.md b/courses/posts/build-deploy-google-maps-travel-companion-application/intro.md new file mode 100644 index 00000000..40111c0e --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/list.md b/courses/posts/build-deploy-google-maps-travel-companion-application/list.md new file mode 100644 index 00000000..3c329442 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/list.md @@ -0,0 +1,11 @@ +--- +title: List +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/map.md b/courses/posts/build-deploy-google-maps-travel-companion-application/map.md new file mode 100644 index 00000000..47c990fd --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/map.md @@ -0,0 +1,11 @@ +--- +title: Map +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/place-card.md b/courses/posts/build-deploy-google-maps-travel-companion-application/place-card.md new file mode 100644 index 00000000..882e8039 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/place-card.md @@ -0,0 +1,15 @@ +--- +title: Place Card +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/places-search.md b/courses/posts/build-deploy-google-maps-travel-companion-application/places-search.md new file mode 100644 index 00000000..2dc43fa8 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/places-search.md @@ -0,0 +1,15 @@ +--- +title: Places Search +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/project-setup.md b/courses/posts/build-deploy-google-maps-travel-companion-application/project-setup.md new file mode 100644 index 00000000..e1157946 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/project-setup.md @@ -0,0 +1,15 @@ +--- +title: Project Setup +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/scroll-places-filters.md b/courses/posts/build-deploy-google-maps-travel-companion-application/scroll-places-filters.md new file mode 100644 index 00000000..152c1142 --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/scroll-places-filters.md @@ -0,0 +1,15 @@ +--- +title: Scroll Places & Filters +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/setup.md b/courses/posts/build-deploy-google-maps-travel-companion-application/setup.md new file mode 100644 index 00000000..449d8cad --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/setup.md @@ -0,0 +1,11 @@ +--- +title: Setup +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/weather-api.md b/courses/posts/build-deploy-google-maps-travel-companion-application/weather-api.md new file mode 100644 index 00000000..b313878c --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/weather-api.md @@ -0,0 +1,15 @@ +--- +title: Weather API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-maps-travel-companion-application/working-apis.md b/courses/posts/build-deploy-google-maps-travel-companion-application/working-apis.md new file mode 100644 index 00000000..396e9e2c --- /dev/null +++ b/courses/posts/build-deploy-google-maps-travel-companion-application/working-apis.md @@ -0,0 +1,15 @@ +--- +title: Working with APIs +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/deployment.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/deployment.md new file mode 100644 index 00000000..bde4cae6 --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/deployment.md @@ -0,0 +1,15 @@ +--- +title: Deployment +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/design.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/design.md new file mode 100644 index 00000000..7bee38f8 --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/design.md @@ -0,0 +1,15 @@ +--- +title: Design & Functionality +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/image-section.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/image-section.md new file mode 100644 index 00000000..5141a931 --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/image-section.md @@ -0,0 +1,15 @@ +--- +title: Image section +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/index.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/index.md new file mode 100644 index 00000000..7bbf8d23 --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/index.md @@ -0,0 +1,20 @@ +--- +title: Build and Deploy Google Search 2.0 with React & Tailwind CSS +description: With the ability to search for up-to-date results, news, images, and videos, modern UI, dark mode, this completely responsive Google Clone is the perfect project you can build to master the use of modern React.js. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +modules: + - source: index +lessons: + - source: intro + - source: design + - source: image-section + - source: video-section + - source: navbar + - source: search + - source: deployment +videoId: NDbruK1fzG8 +--- diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/intro.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/intro.md new file mode 100644 index 00000000..bddc3b27 --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/intro.md @@ -0,0 +1,15 @@ +--- +title: Intro & Setup +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/navbar.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/navbar.md new file mode 100644 index 00000000..6aa4e6c6 --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/navbar.md @@ -0,0 +1,15 @@ +--- +title: Navbar +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/search.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/search.md new file mode 100644 index 00000000..0451cacb --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/search.md @@ -0,0 +1,15 @@ +--- +title: Search +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-google-search-with-react-tailwind-css/video-section.md b/courses/posts/build-deploy-google-search-with-react-tailwind-css/video-section.md new file mode 100644 index 00000000..03511f21 --- /dev/null +++ b/courses/posts/build-deploy-google-search-with-react-tailwind-css/video-section.md @@ -0,0 +1,15 @@ +--- +title: Video section +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/deployment.md b/courses/posts/build-deploy-modern-real-estate-app/deployment.md new file mode 100644 index 00000000..11262b34 --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/deployment.md @@ -0,0 +1,15 @@ +--- +title: Deployment +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/file-folder-structure.md b/courses/posts/build-deploy-modern-real-estate-app/file-folder-structure.md new file mode 100644 index 00000000..e0f60a18 --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/file-folder-structure.md @@ -0,0 +1,15 @@ +--- +title: File & Folder structure +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/index.md b/courses/posts/build-deploy-modern-real-estate-app/index.md new file mode 100644 index 00000000..d802f6cc --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/index.md @@ -0,0 +1,21 @@ +--- +title: Build and Deploy a Modern Real Estate App | React Website Tutorial +description: This video is perfect for you if you want to improve your ReactJS and NextJS skills by building Realtor - an amazing Real Estate Application. With rental homes and for-sale properties, advanced property filtering, property details page with an image carousel, and much more, Realtor is the best Real Estate App that you can currently find on YouTube. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +modules: + - source: index +lessons: + - source: intro + - source: file-folder-structure + - source: real-estate-properties + - source: nav-footer + - source: search-page + - source: search-filters + - source: property-details + - source: deployment +videoId: y47gYvXchXM +--- diff --git a/courses/posts/build-deploy-modern-real-estate-app/intro.md b/courses/posts/build-deploy-modern-real-estate-app/intro.md new file mode 100644 index 00000000..90e3c32a --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/nav-footer.md b/courses/posts/build-deploy-modern-real-estate-app/nav-footer.md new file mode 100644 index 00000000..ec8aa6ca --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/nav-footer.md @@ -0,0 +1,15 @@ +--- +title: Nav & Footer +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/property-details.md b/courses/posts/build-deploy-modern-real-estate-app/property-details.md new file mode 100644 index 00000000..4c277d3a --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/property-details.md @@ -0,0 +1,15 @@ +--- +title: Property details +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/real-estate-properties.md b/courses/posts/build-deploy-modern-real-estate-app/real-estate-properties.md new file mode 100644 index 00000000..3843ba55 --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/real-estate-properties.md @@ -0,0 +1,15 @@ +--- +title: Real Estate Properties +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/search-filters.md b/courses/posts/build-deploy-modern-real-estate-app/search-filters.md new file mode 100644 index 00000000..5d5acce7 --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/search-filters.md @@ -0,0 +1,15 @@ +--- +title: Search filters +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-modern-real-estate-app/search-page.md b/courses/posts/build-deploy-modern-real-estate-app/search-page.md new file mode 100644 index 00000000..bd9a3f02 --- /dev/null +++ b/courses/posts/build-deploy-modern-real-estate-app/search-page.md @@ -0,0 +1,15 @@ +--- +title: Search Page +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/adding-environment-variable.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/adding-environment-variable.md new file mode 100644 index 00000000..76a998d3 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/adding-environment-variable.md @@ -0,0 +1,15 @@ +--- +title: Adding environment variable +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/api-overview.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/api-overview.md new file mode 100644 index 00000000..a4081f2b --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/api-overview.md @@ -0,0 +1,15 @@ +--- +title: API Overview +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/coding-the-bot.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/coding-the-bot.md new file mode 100644 index 00000000..a5368f34 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/coding-the-bot.md @@ -0,0 +1,15 @@ +--- +title: Coding the bot +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/conclusion.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/conclusion.md new file mode 100644 index 00000000..63cce912 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/conclusion.md @@ -0,0 +1,15 @@ +--- +title: Conclusion +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-demo-slash-command.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-demo-slash-command.md new file mode 100644 index 00000000..5b007d8f --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-demo-slash-command.md @@ -0,0 +1,15 @@ +--- +title: Creating demo slash command +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-discord-bot.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-discord-bot.md new file mode 100644 index 00000000..b3434d0a --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-discord-bot.md @@ -0,0 +1,15 @@ +--- +title: Creating discord bot +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-node-app.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-node-app.md new file mode 100644 index 00000000..3e209177 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-node-app.md @@ -0,0 +1,15 @@ +--- +title: Creating Node app +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-other-commands.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-other-commands.md new file mode 100644 index 00000000..a3022f38 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-other-commands.md @@ -0,0 +1,15 @@ +--- +title: Creating other commands +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-slash-command-with-options.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-slash-command-with-options.md new file mode 100644 index 00000000..af33dd8d --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/creating-slash-command-with-options.md @@ -0,0 +1,15 @@ +--- +title: Creating slash command with options +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/deploying-the-bot-to-heroku.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/deploying-the-bot-to-heroku.md new file mode 100644 index 00000000..f4220f7e --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/deploying-the-bot-to-heroku.md @@ -0,0 +1,15 @@ +--- +title: Deploying the bot to Heroku +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/extracting-duplicate-code-into-a-function.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/extracting-duplicate-code-into-a-function.md new file mode 100644 index 00000000..8da773aa --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/extracting-duplicate-code-into-a-function.md @@ -0,0 +1,15 @@ +--- +title: Extracting duplicate code into a function +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/fetching-data-and-replying.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/fetching-data-and-replying.md new file mode 100644 index 00000000..2aedd585 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/fetching-data-and-replying.md @@ -0,0 +1,15 @@ +--- +title: Fetching data and replying +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/index.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/index.md new file mode 100644 index 00000000..35d9aca4 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/index.md @@ -0,0 +1,28 @@ +--- +title: Build & Deploy a Number Fact Discord Bot using Node.js and Heroku | Node.js | Rapid API +description: In this video, we cover how you can make a Discord bot using discord.js and an API by Rapid API and deploy it using Heroku! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +modules: + - source: index +lessons: + - source: introduction + - source: api-overview + - source: creating-discord-bot + - source: creating-node-app + - source: installing-dependencies + - source: adding-environment-variable + - source: inviting-bot-to-the-server + - source: coding-the-bot + - source: creating-demo-slash-command + - source: creating-slash-command-with-options + - source: fetching-data-and-replying + - source: creating-other-commands + - source: extracting-duplicate-code-into-a-function + - source: deploying-the-bot-to-heroku + - source: conclusion +videoId: fxh8wlkxJ2Q +--- diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/installing-dependencies.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/installing-dependencies.md new file mode 100644 index 00000000..0aeaf257 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/installing-dependencies.md @@ -0,0 +1,15 @@ +--- +title: Installing dependencies +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/introduction.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/introduction.md new file mode 100644 index 00000000..26b8dd01 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/introduction.md @@ -0,0 +1,15 @@ +--- +title: Introduction +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/inviting-bot-to-the-server.md b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/inviting-bot-to-the-server.md new file mode 100644 index 00000000..70857584 --- /dev/null +++ b/courses/posts/build-deploy-number-fact-discord-bot-using-node.js-and-heroku/inviting-bot-to-the-server.md @@ -0,0 +1,15 @@ +--- +title: Inviting bot to the server +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - max +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/challenge.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/challenge.md new file mode 100644 index 00000000..ac463175 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/challenge.md @@ -0,0 +1,15 @@ +--- +title: Challenge +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/chart.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/chart.md new file mode 100644 index 00000000..e20922ac --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/chart.md @@ -0,0 +1,11 @@ +--- +title: Chart +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/crypto-details.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/crypto-details.md new file mode 100644 index 00000000..a27cd639 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/crypto-details.md @@ -0,0 +1,15 @@ +--- +title: Crypto Details +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/crypto-news.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/crypto-news.md new file mode 100644 index 00000000..655f9d06 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/crypto-news.md @@ -0,0 +1,15 @@ +--- +title: Crypto News +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/cryptocurrencies.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/cryptocurrencies.md new file mode 100644 index 00000000..3167f914 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/cryptocurrencies.md @@ -0,0 +1,15 @@ +--- +title: Cryptocurrencies +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/homepage.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/homepage.md new file mode 100644 index 00000000..ca220ec4 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/homepage.md @@ -0,0 +1,15 @@ +--- +title: Homepage +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/index.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/index.md new file mode 100644 index 00000000..54399bc0 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/index.md @@ -0,0 +1,24 @@ +--- +title: Build and Deploy a React Cryptocurrency App and Master Redux Toolkit in One Video +description: Learn advanced React best practices, State Management using Redux Toolkit, UI Creation using Ant Design, creating charts using Chart.js, and fetching data from multiple sources using RapidAPI while building the best Cryptocurrency App on YouTube - Cryptoverse. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +modules: + - source: index +lessons: + - source: intro + - source: rapidapi + - source: layout + - source: homepage + - source: redux-toolkit-api-dev + - source: cryptocurrencies + - source: crypto-news + - source: crypto-details + - source: chart + - source: mobile-navigation + - source: challenge +videoId: 9DDX3US3kss +--- diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/intro.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/intro.md new file mode 100644 index 00000000..7b2e095e --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/layout.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/layout.md new file mode 100644 index 00000000..545d6298 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/layout.md @@ -0,0 +1,11 @@ +--- +title: Layout +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/mobile-navigation.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/mobile-navigation.md new file mode 100644 index 00000000..3d2c74d0 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/mobile-navigation.md @@ -0,0 +1,15 @@ +--- +title: Mobile navigation +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/rapidapi.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/rapidapi.md new file mode 100644 index 00000000..755fb9ed --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/rapidapi.md @@ -0,0 +1,15 @@ +--- +title: RapidAPI +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/redux-toolkit-api-dev.md b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/redux-toolkit-api-dev.md new file mode 100644 index 00000000..7c2d7850 --- /dev/null +++ b/courses/posts/build-deploy-react-cryptocurrency-app-master-redux-toolkit-video/redux-toolkit-api-dev.md @@ -0,0 +1,15 @@ +--- +title: Redux Toolkit & API Dev +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/build-full-working-api-django-publicizing-rapidapi/build-api-django.md b/courses/posts/build-full-working-api-django-publicizing-rapidapi/build-api-django.md new file mode 100644 index 00000000..cadc83f9 --- /dev/null +++ b/courses/posts/build-full-working-api-django-publicizing-rapidapi/build-api-django.md @@ -0,0 +1,15 @@ +--- +title: Build An API In Django +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'code-with-tomi' +--- + + diff --git a/courses/posts/build-full-working-api-django-publicizing-rapidapi/deploy-django-api-heroku.md b/courses/posts/build-full-working-api-django-publicizing-rapidapi/deploy-django-api-heroku.md new file mode 100644 index 00000000..49b02ed6 --- /dev/null +++ b/courses/posts/build-full-working-api-django-publicizing-rapidapi/deploy-django-api-heroku.md @@ -0,0 +1,15 @@ +--- +title: Deploy A Django API To Heroku +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'code-with-tomi' +--- + + diff --git a/courses/posts/build-full-working-api-django-publicizing-rapidapi/index.md b/courses/posts/build-full-working-api-django-publicizing-rapidapi/index.md new file mode 100644 index 00000000..3883b403 --- /dev/null +++ b/courses/posts/build-full-working-api-django-publicizing-rapidapi/index.md @@ -0,0 +1,17 @@ +--- +title: How To Build A Full Working API In Django and Publicizing IT On RapidAPI +description: In this video, we will build a basic API in Django using the Django Rest Framework, deploy it on heroku and put it on RapidAPI Hub. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'code-with-tomi' +modules: + - source: index +lessons: + - source: intro + - source: build-api-django + - source: deploy-django-api-heroku + - source: putting-api-rapidapi-hub +videoId: Zy0k1KnkO9w +--- diff --git a/courses/posts/build-full-working-api-django-publicizing-rapidapi/intro.md b/courses/posts/build-full-working-api-django-publicizing-rapidapi/intro.md new file mode 100644 index 00000000..97e90b98 --- /dev/null +++ b/courses/posts/build-full-working-api-django-publicizing-rapidapi/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'code-with-tomi' +--- + + diff --git a/courses/posts/build-full-working-api-django-publicizing-rapidapi/putting-api-rapidapi-hub.md b/courses/posts/build-full-working-api-django-publicizing-rapidapi/putting-api-rapidapi-hub.md new file mode 100644 index 00000000..82c294e7 --- /dev/null +++ b/courses/posts/build-full-working-api-django-publicizing-rapidapi/putting-api-rapidapi-hub.md @@ -0,0 +1,15 @@ +--- +title: Putting Our API On RapidAPI Hub +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'code-with-tomi' +--- + + diff --git a/courses/posts/building-health-dao-with-github-copilot/index.md b/courses/posts/building-health-dao-with-github-copilot/index.md new file mode 100644 index 00000000..6eadf3e2 --- /dev/null +++ b/courses/posts/building-health-dao-with-github-copilot/index.md @@ -0,0 +1,14 @@ +--- +title: 'Building a Health DAO with GitHub CoPilot' +description: Decentralized Autonomous Organizations (DAOs) are the future of the Web. In this episode, we'll build a simple DAO that let's users submit their health data to a marketplace and let's health organizations buy that data, with the proceeds going directly to users. This is an idea I've been toying with for a few weeks as I'm really interested in ways of incentivizing people to be healthy. We'll learn about how DAOs work, then we'll build a toy DAO example. I'll then show you how to build a DAO without coding, then we'll build the Health DAO using Solidity, Truffle, Metamask, Ganache, IPFS, and Javascript. Interspersed in all of this are demos of GitHub's CoPilot tool that I now have access to, which auto-completes your code in an incredible way. Get hype! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +modules: + - source: index +lessons: + - source: intro +videoId: yD3BMT_cXew +--- diff --git a/courses/posts/building-health-dao-with-github-copilot/intro.md b/courses/posts/building-health-dao-with-github-copilot/intro.md new file mode 100644 index 00000000..b4ffc21c --- /dev/null +++ b/courses/posts/building-health-dao-with-github-copilot/intro.md @@ -0,0 +1,15 @@ +--- +title: 'Building a Health DAO with GitHub CoPilot' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +--- + + diff --git a/courses/posts/building-node-js-app-javascript-noob/api-key-secure-dotenv.md b/courses/posts/building-node-js-app-javascript-noob/api-key-secure-dotenv.md new file mode 100644 index 00000000..8d479b5c --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/api-key-secure-dotenv.md @@ -0,0 +1,15 @@ +--- +title: How to keep your API key secure using dotenv +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +--- + + diff --git a/courses/posts/building-node-js-app-javascript-noob/asynchronous-javascript-json-data-server-side-client.md b/courses/posts/building-node-js-app-javascript-noob/asynchronous-javascript-json-data-server-side-client.md new file mode 100644 index 00000000..238290e5 --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/asynchronous-javascript-json-data-server-side-client.md @@ -0,0 +1,15 @@ +--- +title: Use asynchronous JavaScript to get JSON data from server-side to client +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +--- + + diff --git a/courses/posts/building-node-js-app-javascript-noob/dynamically-generate-image-tag-javascript.md b/courses/posts/building-node-js-app-javascript-noob/dynamically-generate-image-tag-javascript.md new file mode 100644 index 00000000..68a91af7 --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/dynamically-generate-image-tag-javascript.md @@ -0,0 +1,15 @@ +--- +title: Dynamically generate image tag using JavaScript +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +--- + + diff --git a/courses/posts/building-node-js-app-javascript-noob/index.md b/courses/posts/building-node-js-app-javascript-noob/index.md new file mode 100644 index 00000000..348911d0 --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/index.md @@ -0,0 +1,20 @@ +--- +title: Building a Node.js app (as a JavaScript noob) +description: 'In this video, we will be building a basic web app using Node.js (Express.js) loading external API data using asynchronous JavaScript.' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +modules: + - source: index +lessons: + - source: intro + - source: set-website-files-local-express-js-site + - source: set-route-node-js-load-api-data-fetch + - source: asynchronous-javascript-json-data-server-side-client + - source: dynamically-generate-image-tag-javascript + - source: api-key-secure-dotenv + - source: style-website-css +videoId: wYALykLb5oY +--- diff --git a/courses/posts/building-node-js-app-javascript-noob/intro.md b/courses/posts/building-node-js-app-javascript-noob/intro.md new file mode 100644 index 00000000..42959c35 --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +--- + + diff --git a/courses/posts/building-node-js-app-javascript-noob/set-route-node-js-load-api-data-fetch.md b/courses/posts/building-node-js-app-javascript-noob/set-route-node-js-load-api-data-fetch.md new file mode 100644 index 00000000..81035ca7 --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/set-route-node-js-load-api-data-fetch.md @@ -0,0 +1,15 @@ +--- +title: Set up route in Node.js to load API data using fetch() +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +--- + + diff --git a/courses/posts/building-node-js-app-javascript-noob/set-website-files-local-express-js-site.md b/courses/posts/building-node-js-app-javascript-noob/set-website-files-local-express-js-site.md new file mode 100644 index 00000000..f911af74 --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/set-website-files-local-express-js-site.md @@ -0,0 +1,15 @@ +--- +title: Set up website files and local Express.js site +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +--- + + diff --git a/courses/posts/building-node-js-app-javascript-noob/style-website-css.md b/courses/posts/building-node-js-app-javascript-noob/style-website-css.md new file mode 100644 index 00000000..c8e015cd --- /dev/null +++ b/courses/posts/building-node-js-app-javascript-noob/style-website-css.md @@ -0,0 +1,15 @@ +--- +title: Style the website with CSS +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'coder-coder' +--- + + diff --git a/courses/posts/convolutional-networks-heart-disease-prediction/index.md b/courses/posts/convolutional-networks-heart-disease-prediction/index.md new file mode 100644 index 00000000..423873fd --- /dev/null +++ b/courses/posts/convolutional-networks-heart-disease-prediction/index.md @@ -0,0 +1,14 @@ +--- +title: Convolutional Networks for Heart Disease Prediction +description: AlphaCare is an open-source project that Keshav Boudaria and I have been working on for the past few weeks, and it's built entirely on top of freely available open-source data, algorithms, and compute. In this first video of the AlphaCare series, I'll explain how we can use it to classify ECG data from patient heartbeats to accurately predict the likelihood of different types of heart disease, mainly Arrhythmia. The goal of AlphaCare is to progressively improve it's capabilities as a community until it's able to be used as a tool to treat and prevent the top 10 major disease globally. Ultimately, we'd like to use it to treat the root cause of all diseases, Aging. AlphaCare is a work in progress, we have a lot of work to do together. I can't wait to learn and grow with all of you, let's make a massive positive impact together! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +modules: + - source: index +lessons: + - source: intro +videoId: fGv6VmfGMLc +--- diff --git a/courses/posts/convolutional-networks-heart-disease-prediction/intro.md b/courses/posts/convolutional-networks-heart-disease-prediction/intro.md new file mode 100644 index 00000000..1e3dfdb4 --- /dev/null +++ b/courses/posts/convolutional-networks-heart-disease-prediction/intro.md @@ -0,0 +1,15 @@ +--- +title: Convolutional Networks for Heart Disease Prediction +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/conclusion.md b/courses/posts/crash-api-testing-rapidapi-github-actions/conclusion.md new file mode 100644 index 00000000..1247a5ae --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/conclusion.md @@ -0,0 +1,15 @@ +--- +title: Conclusion +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-api-performance.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-api-performance.md new file mode 100644 index 00000000..e76012f6 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-api-performance.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] API Performance' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-creating-test-rapidapi-testing.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-creating-test-rapidapi-testing.md new file mode 100644 index 00000000..5a59c5de --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-creating-test-rapidapi-testing.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] Creating a Test in RapidAPI Testing' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-executing-rapidapi-github-action.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-executing-rapidapi-github-action.md new file mode 100644 index 00000000..711a6e66 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-executing-rapidapi-github-action.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] Executing RapidAPI GitHub Action' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-developer-dashboard.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-developer-dashboard.md new file mode 100644 index 00000000..daf1ac96 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-developer-dashboard.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI Developer Dashboard' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-github-action.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-github-action.md new file mode 100644 index 00000000..d5529e97 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-github-action.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI GitHub Action' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-marketplace-search.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-marketplace-search.md new file mode 100644 index 00000000..e4172597 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-marketplace-search.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI Marketplace Search' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-marketplace.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-marketplace.md new file mode 100644 index 00000000..07472ad4 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-marketplace.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI Marketplace' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-provide-dashboard.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-provide-dashboard.md new file mode 100644 index 00000000..61534e25 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-provide-dashboard.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI Provide Dashboard' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-signin.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-signin.md new file mode 100644 index 00000000..b670a0f1 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-signin.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI Signin' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-test-endpoint.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-test-endpoint.md new file mode 100644 index 00000000..6463d115 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-test-endpoint.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI Test Endpoint' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-testing.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-testing.md new file mode 100644 index 00000000..cd640469 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-rapidapi-testing.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] RapidAPI Testing' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/demo-testing-apis.md b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-testing-apis.md new file mode 100644 index 00000000..6ee6fe95 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/demo-testing-apis.md @@ -0,0 +1,15 @@ +--- +title: '[Demo] Testing the APIs' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/index.md b/courses/posts/crash-api-testing-rapidapi-github-actions/index.md new file mode 100644 index 00000000..4d4ef249 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/index.md @@ -0,0 +1,31 @@ +--- +title: 'Crash Course: API Testing with RapidAPI & GitHub Actions' +description: 'In this tutorial you will learn about RapidAPI, API testing using RapidAPI Testing solution, how to monitor the performance of the API, RapidAPI GitHub Action and more.' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +modules: + - source: index +lessons: + - source: intro + - source: rapidapi + - source: rapidapi-products + - source: rapidapi-testing + - source: rapidapi-github-action + - source: demo-rapidapi-signin + - source: demo-rapidapi-marketplace + - source: demo-rapidapi-developer-dashboard + - source: demo-rapidapi-marketplace-search + - source: demo-rapidapi-test-endpoint + - source: demo-rapidapi-provide-dashboard + - source: demo-rapidapi-testing + - source: demo-creating-test-rapidapi-testing + - source: demo-testing-apis + - source: demo-api-performance + - source: demo-rapidapi-github-action + - source: demo-executing-rapidapi-github-action + - source: conclusion +videoId: yCE7QvwG1-c +--- diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/intro.md b/courses/posts/crash-api-testing-rapidapi-github-actions/intro.md new file mode 100644 index 00000000..c86a8fa0 --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-github-action.md b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-github-action.md new file mode 100644 index 00000000..fc2d83de --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-github-action.md @@ -0,0 +1,15 @@ +--- +title: RapidAPI GitHub Action +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-products.md b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-products.md new file mode 100644 index 00000000..c3ccdecc --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-products.md @@ -0,0 +1,15 @@ +--- +title: RapidAPI Products +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-testing.md b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-testing.md new file mode 100644 index 00000000..14c1997c --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi-testing.md @@ -0,0 +1,15 @@ +--- +title: RapidAPI Testing +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi.md b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi.md new file mode 100644 index 00000000..f4f626fc --- /dev/null +++ b/courses/posts/crash-api-testing-rapidapi-github-actions/rapidapi.md @@ -0,0 +1,15 @@ +--- +title: What is RapidAPI? +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'naveen-kumar-namachivayam' +--- + + diff --git a/courses/posts/integrate-multiple-apis-laravel-app-rapidapi/index.md b/courses/posts/integrate-multiple-apis-laravel-app-rapidapi/index.md new file mode 100644 index 00000000..7652318f --- /dev/null +++ b/courses/posts/integrate-multiple-apis-laravel-app-rapidapi/index.md @@ -0,0 +1,14 @@ +--- +title: How to integrate multiple APIs with your Laravel app using RapidAPI +description: In this video we review what RapidAPI is & how you can use it to connect & integrate multiple APIs into your Laravel application with a single API key. We are going to integrate with a currency conversion API & build a flexible API wrapper that we can use to connect to multiple APIs that are on RapidAPI. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'program-with-gio' +modules: + - source: index +lessons: + - source: intro +videoId: c8Zc0kbaR5I +--- diff --git a/courses/posts/integrate-multiple-apis-laravel-app-rapidapi/intro.md b/courses/posts/integrate-multiple-apis-laravel-app-rapidapi/intro.md new file mode 100644 index 00000000..d09002a7 --- /dev/null +++ b/courses/posts/integrate-multiple-apis-laravel-app-rapidapi/intro.md @@ -0,0 +1,15 @@ +--- +title: How to integrate multiple APIs with your Laravel app using RapidAPI +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'program-with-gio' +--- + + diff --git a/courses/posts/master-use-apis-testing/api-best-practices.md b/courses/posts/master-use-apis-testing/api-best-practices.md new file mode 100644 index 00000000..2e86614d --- /dev/null +++ b/courses/posts/master-use-apis-testing/api-best-practices.md @@ -0,0 +1,15 @@ +--- +title: API Best Practices +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/master-use-apis-testing/api-testing-part-1.md b/courses/posts/master-use-apis-testing/api-testing-part-1.md new file mode 100644 index 00000000..d468fa6f --- /dev/null +++ b/courses/posts/master-use-apis-testing/api-testing-part-1.md @@ -0,0 +1,15 @@ +--- +title: 'API Testing #1' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/master-use-apis-testing/api-testing-part-2.md b/courses/posts/master-use-apis-testing/api-testing-part-2.md new file mode 100644 index 00000000..848ccf0f --- /dev/null +++ b/courses/posts/master-use-apis-testing/api-testing-part-2.md @@ -0,0 +1,15 @@ +--- +title: 'API Testing #2' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/master-use-apis-testing/apis-crash-course.md b/courses/posts/master-use-apis-testing/apis-crash-course.md new file mode 100644 index 00000000..8274ff56 --- /dev/null +++ b/courses/posts/master-use-apis-testing/apis-crash-course.md @@ -0,0 +1,15 @@ +--- +title: APIs Crash Course +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/master-use-apis-testing/index.md b/courses/posts/master-use-apis-testing/index.md new file mode 100644 index 00000000..339ea81b --- /dev/null +++ b/courses/posts/master-use-apis-testing/index.md @@ -0,0 +1,17 @@ +--- +title: Master the use of APIs and API Testing | Complete Crash Course +description: In this video, you'll learn what an API is and how to create and deploy your APIs. You'll also learn about the concepts of REST & CRUD. And finally, we're going to pick a few publicly available APIs to do API Testing. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +modules: + - source: index +lessons: + - source: apis-crash-course + - source: api-testing-part-1 + - source: api-best-practices + - source: api-testing-part-2 +videoId: fvowySuuEIw +--- diff --git a/courses/posts/mint-genome-nft/index.md b/courses/posts/mint-genome-nft/index.md new file mode 100644 index 00000000..8b162f6d --- /dev/null +++ b/courses/posts/mint-genome-nft/index.md @@ -0,0 +1,14 @@ +--- +title: 'Mint a Genome NFT' +description: DeepMind recently released a new type of Transformer called the Perceiver IO, which was able to achieve state of the art accuracy across multiple data types (text, images, point clouds, and more). In this episode of the AlphaCare series, I'll explain how Perceiver works, and how we used it to improve accuracy scores for Cardiac video data. The EchoNet dataset was recently made public by Stanford University, and it contains 10K privatized heart videos from patients. We'll also discuss why Transformer networks work so well, and how by using 2 key features (Cross attention & positional embeddings), the Perceiver improved on all variants of Transformers. Get hype! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +modules: + - source: index +lessons: + - source: intro +videoId: XOCuQAKhsMw +--- diff --git a/courses/posts/mint-genome-nft/intro.md b/courses/posts/mint-genome-nft/intro.md new file mode 100644 index 00000000..63cab7f1 --- /dev/null +++ b/courses/posts/mint-genome-nft/intro.md @@ -0,0 +1,15 @@ +--- +title: 'Mint a Genome NFT' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +--- + + diff --git a/courses/posts/money-developer-selling-apis/api.md b/courses/posts/money-developer-selling-apis/api.md new file mode 100644 index 00000000..ebe45eb7 --- /dev/null +++ b/courses/posts/money-developer-selling-apis/api.md @@ -0,0 +1,15 @@ +--- +title: What's an API? +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/money-developer-selling-apis/apis.md b/courses/posts/money-developer-selling-apis/apis.md new file mode 100644 index 00000000..37a681fd --- /dev/null +++ b/courses/posts/money-developer-selling-apis/apis.md @@ -0,0 +1,15 @@ +--- +title: Why do we need APIs? +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/money-developer-selling-apis/build-api.md b/courses/posts/money-developer-selling-apis/build-api.md new file mode 100644 index 00000000..435838f6 --- /dev/null +++ b/courses/posts/money-developer-selling-apis/build-api.md @@ -0,0 +1,15 @@ +--- +title: Build the API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/money-developer-selling-apis/deploy-api.md b/courses/posts/money-developer-selling-apis/deploy-api.md new file mode 100644 index 00000000..ef9664d6 --- /dev/null +++ b/courses/posts/money-developer-selling-apis/deploy-api.md @@ -0,0 +1,15 @@ +--- +title: Deploy the API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/money-developer-selling-apis/index.md b/courses/posts/money-developer-selling-apis/index.md new file mode 100644 index 00000000..74913029 --- /dev/null +++ b/courses/posts/money-developer-selling-apis/index.md @@ -0,0 +1,21 @@ +--- +title: Make Money As A Developer By Selling APIs +description: 'Building and selling APIs is a great way to create a new source of passive income. Thus, in this video, you will see how to monetize your API!' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +modules: + - source: index +lessons: + - source: introduction + - source: api + - source: apis + - source: rapidapi-hub + - source: build-api + - source: deploy-api + - source: rapidapi-monetize-api + - source: leaving +videoId: TvRe8NLbF30 +--- diff --git a/courses/posts/money-developer-selling-apis/introduction.md b/courses/posts/money-developer-selling-apis/introduction.md new file mode 100644 index 00000000..5156438f --- /dev/null +++ b/courses/posts/money-developer-selling-apis/introduction.md @@ -0,0 +1,15 @@ +--- +title: Introduction +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/money-developer-selling-apis/leaving.md b/courses/posts/money-developer-selling-apis/leaving.md new file mode 100644 index 00000000..085ae6a3 --- /dev/null +++ b/courses/posts/money-developer-selling-apis/leaving.md @@ -0,0 +1,15 @@ +--- +title: Before leaving +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/money-developer-selling-apis/rapidapi-hub.md b/courses/posts/money-developer-selling-apis/rapidapi-hub.md new file mode 100644 index 00000000..160fbbda --- /dev/null +++ b/courses/posts/money-developer-selling-apis/rapidapi-hub.md @@ -0,0 +1,15 @@ +--- +title: RapidAPI Hub +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/money-developer-selling-apis/rapidapi-monetize-api.md b/courses/posts/money-developer-selling-apis/rapidapi-monetize-api.md new file mode 100644 index 00000000..2caa8ef5 --- /dev/null +++ b/courses/posts/money-developer-selling-apis/rapidapi-monetize-api.md @@ -0,0 +1,15 @@ +--- +title: Use RapidAPI to monetize the API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'catalin-pit' +--- + + diff --git a/courses/posts/multiomics-data-for-cancer-diagnosis/index.md b/courses/posts/multiomics-data-for-cancer-diagnosis/index.md new file mode 100644 index 00000000..0dfe0baa --- /dev/null +++ b/courses/posts/multiomics-data-for-cancer-diagnosis/index.md @@ -0,0 +1,14 @@ +--- +title: 'Multiomics Data for Cancer Diagnosis (AlphaCare: Episode 3)' +description: The amount of molecular biology datasets available are growing exponentially every month. Multiomics consist of all the layers of the molecular biome; the genome, epigenome, transcriptome, proteome, and metabolome. In this episode, we're going to learn how each of the layers of the molecular biology stack work, and then look at 3 different real world use cases for Cancer patients (diagnostic, prognostic, and predictive) using open-source python code on GitHub. Then we'll look at how a Generative Adversarial Network can be used to generate synthetic genomic data to battle imbalanced classes. Enjoy! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +modules: + - source: index +lessons: + - source: intro +videoId: XYSZZxWoVuw +--- diff --git a/courses/posts/multiomics-data-for-cancer-diagnosis/intro.md b/courses/posts/multiomics-data-for-cancer-diagnosis/intro.md new file mode 100644 index 00000000..a73f6247 --- /dev/null +++ b/courses/posts/multiomics-data-for-cancer-diagnosis/intro.md @@ -0,0 +1,15 @@ +--- +title: 'Multiomics Data for Cancer Diagnosis (AlphaCare: Episode 3)' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +--- + + diff --git a/courses/posts/perceiver-for-cardiac-video-data-classification/index.md b/courses/posts/perceiver-for-cardiac-video-data-classification/index.md new file mode 100644 index 00000000..b16fcf33 --- /dev/null +++ b/courses/posts/perceiver-for-cardiac-video-data-classification/index.md @@ -0,0 +1,14 @@ +--- +title: 'Perceiver for Cardiac Video Data Classification (AlphaCare: Episode 2)' +description: DeepMind recently released a new type of Transformer called the Perceiver IO, which was able to achieve state of the art accuracy across multiple data types (text, images, point clouds, and more). In this episode of the AlphaCare series, I'll explain how Perceiver works, and how we used it to improve accuracy scores for Cardiac video data. The EchoNet dataset was recently made public by Stanford University, and it contains 10K privatized heart videos from patients. We'll also discuss why Transformer networks work so well, and how by using 2 key features (Cross attention & positional embeddings), the Perceiver improved on all variants of Transformers. Get hype! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +modules: + - source: index +lessons: + - source: intro +videoId: PrqdEJZOrWE +--- diff --git a/courses/posts/perceiver-for-cardiac-video-data-classification/intro.md b/courses/posts/perceiver-for-cardiac-video-data-classification/intro.md new file mode 100644 index 00000000..65e4a0db --- /dev/null +++ b/courses/posts/perceiver-for-cardiac-video-data-classification/intro.md @@ -0,0 +1,15 @@ +--- +title: 'Perceiver for Cardiac Video Data Classification (AlphaCare: Episode 2)' +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'siraj-raval' +--- + + diff --git a/courses/posts/react-google-maps-geolocation-react-typescript/api-data-map-markers.md b/courses/posts/react-google-maps-geolocation-react-typescript/api-data-map-markers.md new file mode 100644 index 00000000..e7849d1a --- /dev/null +++ b/courses/posts/react-google-maps-geolocation-react-typescript/api-data-map-markers.md @@ -0,0 +1,15 @@ +--- +title: API data and Map Markers +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - weibenfalk +--- + + diff --git a/courses/posts/react-google-maps-geolocation-react-typescript/api-water-data.md b/courses/posts/react-google-maps-geolocation-react-typescript/api-water-data.md new file mode 100644 index 00000000..9b061a0a --- /dev/null +++ b/courses/posts/react-google-maps-geolocation-react-typescript/api-water-data.md @@ -0,0 +1,15 @@ +--- +title: API for water data +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - weibenfalk +--- + + diff --git a/courses/posts/react-google-maps-geolocation-react-typescript/create-google-map.md b/courses/posts/react-google-maps-geolocation-react-typescript/create-google-map.md new file mode 100644 index 00000000..1f8bc473 --- /dev/null +++ b/courses/posts/react-google-maps-geolocation-react-typescript/create-google-map.md @@ -0,0 +1,15 @@ +--- +title: Create the Google Map +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - weibenfalk +--- + + diff --git a/courses/posts/react-google-maps-geolocation-react-typescript/geolocation.md b/courses/posts/react-google-maps-geolocation-react-typescript/geolocation.md new file mode 100644 index 00000000..cb147860 --- /dev/null +++ b/courses/posts/react-google-maps-geolocation-react-typescript/geolocation.md @@ -0,0 +1,15 @@ +--- +title: Geolocation +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - weibenfalk +--- + + diff --git a/courses/posts/react-google-maps-geolocation-react-typescript/index.md b/courses/posts/react-google-maps-geolocation-react-typescript/index.md new file mode 100644 index 00000000..065253ed --- /dev/null +++ b/courses/posts/react-google-maps-geolocation-react-typescript/index.md @@ -0,0 +1,19 @@ +--- +title: React Google Maps - Geolocation with React and TypeScript +description: In this tutorial, you'll learn how to create a Google Map with React.js and Typescript. The app will find the nearest bars both by click and geolocation. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - weibenfalk +modules: + - source: index +lessons: + - source: intro + - source: tech-starter-files + - source: create-google-map + - source: api-data-map-markers + - source: api-water-data + - source: geolocation +videoId: I9F-CMiKOz4 +--- diff --git a/courses/posts/react-google-maps-geolocation-react-typescript/intro.md b/courses/posts/react-google-maps-geolocation-react-typescript/intro.md new file mode 100644 index 00000000..b9503d23 --- /dev/null +++ b/courses/posts/react-google-maps-geolocation-react-typescript/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - weibenfalk +--- + + diff --git a/courses/posts/react-google-maps-geolocation-react-typescript/tech-starter-files.md b/courses/posts/react-google-maps-geolocation-react-typescript/tech-starter-files.md new file mode 100644 index 00000000..19aed634 --- /dev/null +++ b/courses/posts/react-google-maps-geolocation-react-typescript/tech-starter-files.md @@ -0,0 +1,15 @@ +--- +title: Tech used and starter files +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - weibenfalk +--- + + diff --git a/courses/posts/turn-api-startup/about-apis-and-setup.md b/courses/posts/turn-api-startup/about-apis-and-setup.md new file mode 100644 index 00000000..476189bd --- /dev/null +++ b/courses/posts/turn-api-startup/about-apis-and-setup.md @@ -0,0 +1,15 @@ +--- +title: About APIs and Setup +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/turn-api-startup/adding-endpoints.md b/courses/posts/turn-api-startup/adding-endpoints.md new file mode 100644 index 00000000..d9442284 --- /dev/null +++ b/courses/posts/turn-api-startup/adding-endpoints.md @@ -0,0 +1,15 @@ +--- +title: Adding endpoints +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/turn-api-startup/create-server.md b/courses/posts/turn-api-startup/create-server.md new file mode 100644 index 00000000..20c97819 --- /dev/null +++ b/courses/posts/turn-api-startup/create-server.md @@ -0,0 +1,15 @@ +--- +title: Create a Server +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/turn-api-startup/deployment-preparation.md b/courses/posts/turn-api-startup/deployment-preparation.md new file mode 100644 index 00000000..f93e1c31 --- /dev/null +++ b/courses/posts/turn-api-startup/deployment-preparation.md @@ -0,0 +1,15 @@ +--- +title: Deployment Preparation +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/turn-api-startup/hosting.md b/courses/posts/turn-api-startup/hosting.md new file mode 100644 index 00000000..8fde9d77 --- /dev/null +++ b/courses/posts/turn-api-startup/hosting.md @@ -0,0 +1,15 @@ +--- +title: Hosting +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/turn-api-startup/index.md b/courses/posts/turn-api-startup/index.md new file mode 100644 index 00000000..f9715133 --- /dev/null +++ b/courses/posts/turn-api-startup/index.md @@ -0,0 +1,20 @@ +--- +title: Turn an API into a Startup?! Build & Sell an API with JavaScript +description: "The only Node JS API tutorial you need. Learn how to Build and Deploy your own fully custom JavaScript API with Node and Express from scratch. Once you've learned that, I'll teach you how to put it on a platform called RapidAPI, set the pricing tiers, start selling, and finally, build a business around it." +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +modules: + - source: index +lessons: + - source: intro + - source: about-apis-and-setup + - source: create-server + - source: adding-endpoints + - source: deployment-preparation + - source: hosting + - source: rapidapi-marketplace +videoId: be9sHQ7xqo0 +--- diff --git a/courses/posts/turn-api-startup/intro.md b/courses/posts/turn-api-startup/intro.md new file mode 100644 index 00000000..c711868e --- /dev/null +++ b/courses/posts/turn-api-startup/intro.md @@ -0,0 +1,11 @@ +--- +title: Intro +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/turn-api-startup/rapidapi-marketplace.md b/courses/posts/turn-api-startup/rapidapi-marketplace.md new file mode 100644 index 00000000..187c6779 --- /dev/null +++ b/courses/posts/turn-api-startup/rapidapi-marketplace.md @@ -0,0 +1,15 @@ +--- +title: RapidAPI Marketplace +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'javascript-mastery' +--- + + diff --git a/courses/posts/word-association-game/checking-for-correct-answers.md b/courses/posts/word-association-game/checking-for-correct-answers.md new file mode 100644 index 00000000..f46c8983 --- /dev/null +++ b/courses/posts/word-association-game/checking-for-correct-answers.md @@ -0,0 +1,15 @@ +--- +title: Checking for correct Answers and adding to arrays using useState +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/disabling-multiple-buttons-with-react-hooks.md b/courses/posts/word-association-game/disabling-multiple-buttons-with-react-hooks.md new file mode 100644 index 00000000..6949fb0a --- /dev/null +++ b/courses/posts/word-association-game/disabling-multiple-buttons-with-react-hooks.md @@ -0,0 +1,15 @@ +--- +title: Disabling multiple buttons with React hooks +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/displaying-score.md b/courses/posts/word-association-game/displaying-score.md new file mode 100644 index 00000000..382391bc --- /dev/null +++ b/courses/posts/word-association-game/displaying-score.md @@ -0,0 +1,15 @@ +--- +title: Displaying the score +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/env-files-react.md b/courses/posts/word-association-game/env-files-react.md new file mode 100644 index 00000000..f651298b --- /dev/null +++ b/courses/posts/word-association-game/env-files-react.md @@ -0,0 +1,15 @@ +--- +title: Env files in React +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/exploring-api.md b/courses/posts/word-association-game/exploring-api.md new file mode 100644 index 00000000..b8eac986 --- /dev/null +++ b/courses/posts/word-association-game/exploring-api.md @@ -0,0 +1,15 @@ +--- +title: Exploring the API +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/getting-data-into-our-app.md b/courses/posts/word-association-game/getting-data-into-our-app.md new file mode 100644 index 00000000..1ac2cc2c --- /dev/null +++ b/courses/posts/word-association-game/getting-data-into-our-app.md @@ -0,0 +1,15 @@ +--- +title: Getting data into our App +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/index.md b/courses/posts/word-association-game/index.md new file mode 100644 index 00000000..ff0ecc2c --- /dev/null +++ b/courses/posts/word-association-game/index.md @@ -0,0 +1,26 @@ +--- +title: API Project! Word Association Game +description: In this video I show you how to make a Word Association Game using an API. This project is great for those looking for fun projects to make with unique APIs. +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +modules: + - source: index +lessons: + - source: introduction + - source: exploring-api + - source: setting-up-react-app + - source: getting-data-into-our-app + - source: selecting-levels + - source: mapping-out-questions-onto-cards + - source: checking-for-correct-answers + - source: disabling-multiple-buttons-with-react-hooks + - source: displaying-score + - source: styling + - source: env-files-react + - source: where-to-go-next + +videoId: khM21aJ8uOE +--- diff --git a/courses/posts/word-association-game/introduction.md b/courses/posts/word-association-game/introduction.md new file mode 100644 index 00000000..ab657ec0 --- /dev/null +++ b/courses/posts/word-association-game/introduction.md @@ -0,0 +1,15 @@ +--- +title: Introduction +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/mapping-out-questions-onto-cards.md b/courses/posts/word-association-game/mapping-out-questions-onto-cards.md new file mode 100644 index 00000000..2cae0792 --- /dev/null +++ b/courses/posts/word-association-game/mapping-out-questions-onto-cards.md @@ -0,0 +1,15 @@ +--- +title: Mapping out questions onto cards +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/selecting-levels.md b/courses/posts/word-association-game/selecting-levels.md new file mode 100644 index 00000000..e9b2036d --- /dev/null +++ b/courses/posts/word-association-game/selecting-levels.md @@ -0,0 +1,15 @@ +--- +title: Selecting levels +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/setting-up-react-app.md b/courses/posts/word-association-game/setting-up-react-app.md new file mode 100644 index 00000000..ae2a28ba --- /dev/null +++ b/courses/posts/word-association-game/setting-up-react-app.md @@ -0,0 +1,15 @@ +--- +title: Setting up our React App +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/styling.md b/courses/posts/word-association-game/styling.md new file mode 100644 index 00000000..40f99a98 --- /dev/null +++ b/courses/posts/word-association-game/styling.md @@ -0,0 +1,15 @@ +--- +title: Styling +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/word-association-game/where-to-go-next.md b/courses/posts/word-association-game/where-to-go-next.md new file mode 100644 index 00000000..a7808bd0 --- /dev/null +++ b/courses/posts/word-association-game/where-to-go-next.md @@ -0,0 +1,15 @@ +--- +title: Where to go next - build a NodeJS backend +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/courses/posts/wordle-clone-javascript/index.md b/courses/posts/wordle-clone-javascript/index.md new file mode 100644 index 00000000..ce574392 --- /dev/null +++ b/courses/posts/wordle-clone-javascript/index.md @@ -0,0 +1,15 @@ +--- +title: Wordle Clone in JavaScript! +description: In this video, I show you my approach to creating the game of Wordle in JavaScript, with the added benefit of using API's in order to generate random 5 letter words for us, and check if the words we are using for our guesses exist! +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +modules: + - source: index +lessons: + - source: introduction + +videoId: mpby4HiElek +--- diff --git a/courses/posts/wordle-clone-javascript/introduction.md b/courses/posts/wordle-clone-javascript/introduction.md new file mode 100644 index 00000000..f8c598fc --- /dev/null +++ b/courses/posts/wordle-clone-javascript/introduction.md @@ -0,0 +1,11 @@ +--- +title: Wordle Clone in JavaScript! +description: '' +publishedDate: 2021-09-22T17:49:44.101Z +lastModifiedDate: 2021-09-22T17:49:44.101Z +coverImage: '' +authors: + - 'ania-kubow' +--- + + diff --git a/developers/assets/favicon-96x96.png b/developers/assets/favicon-96x96.png new file mode 100644 index 00000000..e5934eb7 Binary files /dev/null and b/developers/assets/favicon-96x96.png differ diff --git a/developers/assets/ogg.jpg b/developers/assets/ogg.jpg new file mode 100644 index 00000000..f650e064 Binary files /dev/null and b/developers/assets/ogg.jpg differ diff --git a/developers/assets/rapidapi-logo.png b/developers/assets/rapidapi-logo.png new file mode 100644 index 00000000..a18710cd Binary files /dev/null and b/developers/assets/rapidapi-logo.png differ diff --git a/developers/assets/rapidapi-og.png b/developers/assets/rapidapi-og.png new file mode 100644 index 00000000..ae26a519 Binary files /dev/null and b/developers/assets/rapidapi-og.png differ diff --git a/developers/config.json b/developers/config.json new file mode 100644 index 00000000..1f5d6174 --- /dev/null +++ b/developers/config.json @@ -0,0 +1,13 @@ +{ + "siteName": "RapidAPI Developers", + "type": "website", + "description": "Join our community and let’s build the web together.", + "language": "en", + "locale": "en_US", + "siteUrl": "https://rapidapi.com/developers", + "siteLogo": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/developers/assets/rapidapi-logo.png", + "siteFavicon": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/developers/assets/favicon-96x96.png", + "ogImage": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/developers/assets/ogg.jpg", + "socialBanner": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/developers/assets/rapidapi-logo.png", + "twitter": "rapid_api" +} diff --git a/engineering/assets/favicon-96x96.png b/engineering/assets/favicon-96x96.png new file mode 100644 index 00000000..e5934eb7 Binary files /dev/null and b/engineering/assets/favicon-96x96.png differ diff --git a/engineering/assets/ogg.jpg b/engineering/assets/ogg.jpg new file mode 100644 index 00000000..c3093358 Binary files /dev/null and b/engineering/assets/ogg.jpg differ diff --git a/engineering/assets/rapidapi-logo.png b/engineering/assets/rapidapi-logo.png new file mode 100644 index 00000000..a18710cd Binary files /dev/null and b/engineering/assets/rapidapi-logo.png differ diff --git a/engineering/assets/rapidapi-og.png b/engineering/assets/rapidapi-og.png new file mode 100644 index 00000000..ae26a519 Binary files /dev/null and b/engineering/assets/rapidapi-og.png differ diff --git a/engineering/config.json b/engineering/config.json new file mode 100644 index 00000000..ec687705 --- /dev/null +++ b/engineering/config.json @@ -0,0 +1,13 @@ +{ + "siteName": "RapidAPI Engineering", + "type": "website", + "description": "", + "language": "en", + "locale": "en_US", + "siteUrl": "https://rapidapi.com/engineering", + "siteLogo": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/rapidapi-logo.png", + "siteFavicon": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/favicon-96x96.png", + "ogImage": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/ogg.jpg", + "socialBanner": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/rapidapi-logo.png", + "twitter": "rapid_api" +} diff --git a/engineering/data.json b/engineering/data.json new file mode 100644 index 00000000..7df8523e --- /dev/null +++ b/engineering/data.json @@ -0,0 +1 @@ +[{"source": "hiring"}] diff --git a/engineering/posts/hiring/post.md b/engineering/posts/hiring/post.md new file mode 100644 index 00000000..fdffab31 --- /dev/null +++ b/engineering/posts/hiring/post.md @@ -0,0 +1,12 @@ +--- +title: Hiring +description: Description +--- + + + +Lead + + + +RapidAPI is a team of developers building for developers. We are the world’s largest API Marketplace where over 3 million devs find, test, and connect to 30,000 APIs (and growing!) — all with a single account, single API key & single SDK. diff --git a/examples/assets/favicon-96x96.png b/examples/assets/favicon-96x96.png new file mode 100644 index 00000000..e5934eb7 Binary files /dev/null and b/examples/assets/favicon-96x96.png differ diff --git a/examples/assets/ogg.jpg b/examples/assets/ogg.jpg new file mode 100644 index 00000000..c9a7db63 Binary files /dev/null and b/examples/assets/ogg.jpg differ diff --git a/examples/assets/rapidapi-logo.png b/examples/assets/rapidapi-logo.png new file mode 100644 index 00000000..a18710cd Binary files /dev/null and b/examples/assets/rapidapi-logo.png differ diff --git a/examples/assets/rapidapi-og.png b/examples/assets/rapidapi-og.png new file mode 100644 index 00000000..ae26a519 Binary files /dev/null and b/examples/assets/rapidapi-og.png differ diff --git a/examples/config.json b/examples/config.json new file mode 100644 index 00000000..95c4eb7a --- /dev/null +++ b/examples/config.json @@ -0,0 +1,13 @@ +{ + "siteName": "RapidAPI Examples", + "type": "website", + "description": "Starter kits for building APIs & Applications with RapidAPI.", + "language": "en", + "locale": "en_US", + "siteUrl": "https://rapidapi.com/examples", + "siteLogo": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/examples/assets/rapidapi-logo.png", + "siteFavicon": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/examples/assets/favicon-96x96.png", + "ogImage": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/examples/assets/ogg.jpg", + "socialBanner": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/examples/assets/rapidapi-logo.png", + "twitter": "rapid_api" +} diff --git a/guides/assets/favicon-96x96.png b/guides/assets/favicon-96x96.png new file mode 100644 index 00000000..e5934eb7 Binary files /dev/null and b/guides/assets/favicon-96x96.png differ diff --git a/guides/assets/ogg.jpg b/guides/assets/ogg.jpg new file mode 100644 index 00000000..c3093358 Binary files /dev/null and b/guides/assets/ogg.jpg differ diff --git a/guides/assets/rapidapi-logo.png b/guides/assets/rapidapi-logo.png new file mode 100644 index 00000000..a18710cd Binary files /dev/null and b/guides/assets/rapidapi-logo.png differ diff --git a/guides/assets/rapidapi-og.png b/guides/assets/rapidapi-og.png new file mode 100644 index 00000000..ae26a519 Binary files /dev/null and b/guides/assets/rapidapi-og.png differ diff --git a/guides/config.json b/guides/config.json new file mode 100644 index 00000000..e33e88c6 --- /dev/null +++ b/guides/config.json @@ -0,0 +1,13 @@ +{ + "siteName": "RapidAPI Guides", + "type": "website", + "description": "Guides by RapidAPI offer short and long form API Development content with interactive examples & visuals to help you become a pro API Developer.", + "language": "en", + "locale": "en_US", + "siteUrl": "https://rapidapi.com/guides", + "siteLogo": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/rapidapi-logo.png", + "siteFavicon": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/favicon-96x96.png", + "ogImage": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/ogg.jpg", + "socialBanner": "https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/assets/rapidapi-logo.png", + "twitter": "rapid_api" +} diff --git a/guides/data.json b/guides/data.json new file mode 100644 index 00000000..3c1f1c7a --- /dev/null +++ b/guides/data.json @@ -0,0 +1,236 @@ +[ + {"source": "ten-api-projects-2"}, + {"source": "learn-api-request-parameters"}, + {"source": "five-security-apis"}, + {"source": "api-request-schedule"}, + {"source": "navigation-timing-api"}, + {"source": "intersection-observer-api"}, + {"source": "file-system-access-api"}, + {"source": "build-rest-api-in-flask"}, + {"source": "parallel-api-requests"}, + {"source": "call-apis-svelte-axios"}, + {"source": "api-requests-intervals"}, + {"source": "ten-api-projects"}, + {"source": "picture-in-picture-api"}, + {"source": "permissions-api"}, + {"source": "history-api"}, + {"source": "build-rest-api"}, + {"source": "build-random-user-generator-app"}, + {"source": "graphql-client-caching"}, + {"source": "fetch-api-async-await"}, + {"source": "call-apis-go"}, + {"source": "build-lyrics-app"}, + {"source": "xmlhttprequest-api"}, + {"source": "make-api-call-python"}, + {"source": "handle-cors-flask"}, + {"source": "handle-cors-express"}, + {"source": "build-topic-generator-app"}, + {"source": "graphql-subscriptions"}, + {"source": "webgl"}, + {"source": "url-pattern-api"}, + {"source": "put-vs-patch"}, + {"source": "build-stocks-app"}, + {"source": "build-grammar-checker-app"}, + {"source": "graphql-apis-svelte"}, + {"source": "rapidapi-github-action"}, + {"source": "call-apis-svelte"}, + {"source": "api-documentation-tools"}, + {"source": "build-screenshot-app"}, + {"source": "practices-api-authentication"}, + {"source": "practices-api-errors"}, + {"source": "encoding-api"}, + {"source": "css-object-model-app"}, + {"source": "channel-messaging-api"}, + {"source": "build-word-usage-app"}, + {"source": "build-coordinate-distance-calculator-app"}, + {"source": "css-font-loading-api"}, + {"source": "build-post-office-info-app"}, + {"source": "learn-notifications-api"}, + {"source": "build-real-estate-app"}, + {"source": "api-schemas"}, + {"source": "api-caching-techniques"}, + {"source": "use-apollo-for-graphql"}, + {"source": "mediaquerylist-api"}, + {"source": "build-us-zip-code-info-app"}, + {"source": "broadcast-channel-api"}, + {"source": "css-painting-api"}, + {"source": "cookie-api"}, + {"source": "build-uk-restaurant-app"}, + {"source": "build-food-nutrient-app"}, + {"source": "background-fetch-api"}, + {"source": "api-google-sheets"}, + {"source": "build-carbon-footprint-app"}, + {"source": "api-call-typescript"}, + {"source": "learn-cache-api"}, + {"source": "drag-and-drop-api"}, + {"source": "build-random-facts-app"}, + {"source": "build-game-news-app"}, + {"source": "beacon-api"}, + {"source": "pipedream-rapidapi"}, + {"source": "build-recipe-app"}, + {"source": "learn-canvas-api"}, + {"source": "practices-naming-api-endpoints"}, + {"source": "api-document-rapidapi-hub"}, + {"source": "api-developer-experience"}, + {"source": "build-streaming-app"}, + {"source": "aysnc-vs-sync-apis"}, + {"source": "api-best-practices"}, + {"source": "web-worker-api"}, + {"source": "video-audio-api"}, + {"source": "url-api"}, + {"source": "build-horoscope-app"}, + {"source": "build-car-data-app"}, + {"source": "build-domain-app"}, + {"source": "loading-state-react"}, + {"source": "rest-parameter-types"}, + {"source": "api-documentation"}, + {"source": "use-axios-for-api-requests"}, + {"source": "javascript-api-web-extensions"}, + {"source": "indexeddb-api"}, + {"source": "build-quote-app"}, + {"source": "build-joke-app"}, + {"source": "web-storage-api"}, + {"source": "top-weather-apis"}, + {"source": "top-text-apis"}, + {"source": "build-public-holiday-app"}, + {"source": "build-phone-number-validation-app"}, + {"source": "build-hotel-app"}, + {"source": "top-crypto-apis"}, + {"source": "build-trademark-app"}, + {"source": "top-news-apis"}, + {"source": "top-web-scraping-apis"}, + {"source": "how-to-mock-api"}, + {"source": "web-animation-api"}, + {"source": "practices-designing-api"}, + {"source": "differences-apis-web-services"}, + {"source": "build-covid-vaccine-stats-app"}, + {"source": "build-anime-search-app"}, + {"source": "service-mesh"}, + {"source": "pricing-strategies"}, + {"source": "api-first"}, + {"source": "how-to-rate-limit"}, + {"source": "use-react-hooks"}, + {"source": "web-services"}, + {"source": "learn-browser-api"}, + {"source": "difference-api-sdk"}, + {"source": "build-language-detection-app"}, + {"source": "build-email-validator-app"}, + {"source": "graphql-mutations"}, + {"source": "api-governance"}, + {"source": "api-mocking"}, + {"source": "build-sports-app"}, + {"source": "graphql-aliases-variables"}, + {"source": "use-rapidapi-teams"}, + {"source": "response-chaining"}, + {"source": "build-crypto-news-app"}, + {"source": "build-text-sentiment-analysis-app"}, + {"source": "build-time-app"}, + {"source": "learn-dom-api"}, + {"source": "rest-api-concepts"}, + {"source": "api-rate-limiting"}, + {"source": "build-superhero-app"}, + {"source": "build-graphql-app"}, + {"source": "use-rapidapi-client"}, + {"source": "graphql-axios"}, + {"source": "graphql-fetch-ways"}, + {"source": "use-graphql-apis"}, + {"source": "graphql-fields-arguments"}, + {"source": "build-dictionary-app"}, + {"source": "learn-fetch-api"}, + {"source": "build-text-extraction-app"}, + {"source": "async-api"}, + {"source": "build-spell-checker-app"}, + {"source": "build-paraphrase-app"}, + {"source": "build-movie-details-app"}, + {"source": "build-music-app"}, + {"source": "build-qrcode-app"}, + {"source": "rapidapi-teams"}, + {"source": "rapidql"}, + {"source": "rapidapi-testing"}, + {"source": "rapidapi-client"}, + {"source": "graphql-schema-stitching"}, + {"source": "fetch-api"}, + {"source": "dom-api"}, + {"source": "canvas-api"}, + {"source": "browser-api"}, + {"source": "difference-kafka-rest"}, + {"source": "difference-graphql-kafka"}, + {"source": "practices-working-kafka-api"}, + {"source": "apache-kafka"}, + {"source": "api-pagination"}, + {"source": "increase-api-adoption"}, + {"source": "build-covid-app"}, + {"source": "internal-api"}, + {"source": "build-news-app"}, + {"source": "authentication-authorization"}, + {"source": "top-five-voice-recognition-apis"}, + {"source": "composite-api"}, + {"source": "difference-api-microservices"}, + {"source": "create-text-sentiment-analysis-app-using-react"}, + {"source": "api-management-practices"}, + {"source": "everything-need-know-http-request-methods"}, + {"source": "http-compression"}, + {"source": "rest-api-principles"}, + {"source": "build-currency-conversion-app"}, + {"source": "top-four-apis-can-make-web-accessible"}, + {"source": "api-gateway"}, + {"source": "top-five-sms-apis"}, + {"source": "use-api-from-rapidapi"}, + {"source": "top-five-amazing-text-analysis-apis"}, + {"source": "top-five-voice-sports-apis"}, + {"source": "api-caching"}, + {"source": "optimize-api"}, + {"source": "difference-rest-graphql"}, + {"source": "top-five-food-recipe-apis"}, + {"source": "top-five-machine-learning-apis"}, + {"source": "top-five-movie-apis"}, + {"source": "api-vulnerabilities"}, + {"source": "top-five-facial-recognition-apis"}, + {"source": "top-five-covid-apis"}, + {"source": "api"}, + {"source": "top-five-random-quote-generator-apis"}, + {"source": "top-five-geocoding-location-apis"}, + {"source": "http-request-method"}, + {"source": "practices-designing-rest-apis"}, + {"source": "introduction-publish-subscribe-pattern-based-api"}, + {"source": "http-status-code"}, + {"source": "authentication-rest-api"}, + {"source": "ten-widely-used-http-headers"}, + {"source": "secure-api"}, + {"source": "introduction-api-testing"}, + {"source": "build-weather-app"}, + {"source": "web-api"}, + {"source": "jamstack"}, + {"source": "authenticate-authorize-graphql"}, + {"source": "dns"}, + {"source": "update-graphql-api"}, + {"source": "difference-gRPC-rest"}, + {"source": "difference-gRPC-graphql"}, + {"source": "gRPC"}, + {"source": "websockets"}, + {"source": "tls"}, + {"source": "webrtc"}, + {"source": "common-http-status-code"}, + {"source": "oath2.0"}, + {"source": "ssl"}, + {"source": "api-gateway"}, + {"source": "api-spec"}, + {"source": "difference-json-xml"}, + {"source": "http-2"}, + {"source": "intro-http-headers"}, + {"source": "open-api-spec"}, + {"source": "application-programming-interface"}, + {"source": "http-cookies"}, + {"source": "webhook"}, + {"source": "practices-designing-soap-api"}, + {"source": "difference-rest-soap"}, + {"source": "practices-designing-graphql-api"}, + {"source": "practices-versioning-rest-api"}, + {"source": "http"}, + {"source": "cors"}, + {"source": "api-testing"}, + {"source": "top-five-gaming-apis"}, + {"source": "what-is-rest-and-when-you-should-use-it"}, + {"source": "what-is-graphql-and-when-you-should-use-it"}, + {"source": "top-five-http-headers-might-not-know"} +] diff --git a/guides/posts/apache-kafka/post.md b/guides/posts/apache-kafka/post.md new file mode 100644 index 00000000..12207d80 --- /dev/null +++ b/guides/posts/apache-kafka/post.md @@ -0,0 +1,52 @@ +--- +title: Introduction to Apache Kafka +description: Apache Kafka is used to build services like real-time data streams. It provides five core APIs for Java and Scala to implement such services. In this piece, we are going to briefly look at it and its core APIs. +publishedDate: 2021-11-03T16:27:05.876Z +lastModifiedDate: 2021-11-03T16:27:05.876Z +authors: + - saad +categories: + - api +tags: + - apache-kafka + - kafka +coverImage: '' +--- + + + +When developing an application, sometimes you need to implement a data pipeline or real-time data streams, etc. You can use Apache Kafka to build such features, and it provides five core APIs for Java and Scala to implement such services. + + + +## What is Apache Kafka + +[Apache Kafta](https://kafka.apache.org/) is an event streaming platform that combines three capabilities so that you can implement different use cases. Event streaming is used to get data in real-time from other event sources like databases, sensors, mobile devices, cloud services, and software applications in the form of streams of events. + +The three capabilities are as follow: + +- Publishing and subscribing to the streams of events +- The user might need to store streams of events. So Apache Kafka also stores streams of events durably and reliably. +- Process streams of events as they occur. + +Let’s take a look at the core APIs of Apache Kafka. + +### Admin API + +It is used to manage and inspect topics, brokers, and other Kafka objects. + +### Producer API + +You use Producer API to publish or write a stream of events to one or more Kafka topics. It allows the client to connect to Kafka servers running in the cluster and publish the stream of topics. + +### Consumer API + +It is used to subscribe or read one or more topics and process the stream of events produced to them. It connects to Kafka servers running in the cluster and then costumes streams of records. + +### Streams API + +Apache Kafka is widely used for implementing stream processing applications and microservices. It does this using Stream API. It provides the client with higher-order functions to process the event streams, including transformations, stateful operations, windowing, processing based on event-time, etc. + +### Kafka Connect API + +You use it to build and run reusable data import/export connectors that consume or produce streams of events from and to external systems and applications so they can integrate with Kafka. diff --git a/guides/posts/api-best-practices/post.md b/guides/posts/api-best-practices/post.md new file mode 100644 index 00000000..a16e9196 --- /dev/null +++ b/guides/posts/api-best-practices/post.md @@ -0,0 +1,79 @@ +--- +title: Best Practices for Creating API Documentation +description: Documentation allows developers to connect with your API easily and ensures a good developer experience. Here are some best practices you can apply while documenting APIs. +publishedDate: 2021-12-22T15:57:17.709Z +lastModifiedDate: 2021-12-22T15:57:17.709Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - documentation + - best + - practices +coverImage: '' +draft: false +--- + + + +There are different ways to generate documentation for your API, but its purpose remains the same. Well constructed documentation ensures a good developer experience, which is critical for increasing the adoption of your API. + + + +## API Documentation + +API Documentation provides complete information needed to consume the API through descriptions, tutorials, examples, and code samples. It is the first thing a developer notices while deciding the API for their project. Proper documentation increases your API's adoption by making it easy to integrate and use. + +## Best Practices + +Here are some best practices you can apply while documenting APIs. + +### Know Your Audience + +Before you start documenting your API, take a step back and think about the target audience of your API. This will help you understand who you are writing the documentation for and decide on your documentation’s design, structure, and features. + +It is helpful to divide your audience based on their roles, such as developers and decision-makers. Then, try to answer the questions they might have with your documentation. For example: + +- Does this API solve my problem? (Decision Makers) + +- How can I call and integrate the API in an application? (Developers) + +### Organize Into Sections + +Another way to improve documentation is by dividing and organizing the documentation into sections. These sections will make the documentation more accessible, and your users can look up precisely what they want. + +Here are some essential sections you should include in the documentation. + +- **Overview:** A brief and straightforward explanation of the features your API offers. +- **Authentication:** Clearly show how to get access credentials or keys to access your API. +- **API Resources:** Information about endpoints, parameters, and other details. +- **Error messages:** Include the possible error messages users may encounter while using your API and what they mean. +- **Terms:** Cover the terms and conditions of use, as well as rate limits and usage constraints. + +### Getting Started Guides + +The first thing a developer looks for in your documentation is how to start working with the API. Including a guide to show users how to get started using the features of your API can increase its adoption. + +Getting Started/Quick Start Guides help streamline the onboarding process. They must be beginner-friendly and may include code samples or example responses to help the developers. + +### Avoid Jargon and Be Consistent + +Keep in mind that your API users may not have the same technical abilities, and some of them may be new to the API workflow. Users of different skill sets will read your documentation, so keep the unnecessary technical vocabulary to a minimum. If you have to use specific jargon, make sure to provide links to explain it further. + +Your documentation must be consistent with naming conventions and terminologies related to APIs. For example, there is no need to be too creative with HTTP verbs, status codes, etc. + +### Interactive Guides and Use Cases + +Today, many APIs include playgrounds and interactive components to enrich the otherwise dry documentation. + +Adding additional guides and use cases can also go a long way to improve your documentation. It can be great to include complete guides on integrating your API in an application to perform a use case. You can take inspiration from our [how-to guides](https://rapidapi.com/guides/categories/apps), in which we build applications using different APIs from [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +### Maintenance + +The maintenance of API documentation is critical, yet it is often ignored. It can be very frustrating for developers to deal with obsolete documentation. Therefore, update the documentation whenever you make changes to your API, explain new features, and remove mentions of deprecated features. Introduce a mechanism to get feedback from the users and incorporate it in your documentation as you go. + +## Conclusion + +Following some of these best practices force you to offer good quality documentation for your API. Now that you have learned some best practices, you can also check out this [guide](https://rapidapi.com/guides/api-documentation), which shows what an ideal API Documentation should include. diff --git a/guides/posts/api-caching-techniques/post.md b/guides/posts/api-caching-techniques/post.md new file mode 100644 index 00000000..181af0ec --- /dev/null +++ b/guides/posts/api-caching-techniques/post.md @@ -0,0 +1,56 @@ +--- +title: General Techniques of API Caching +description: APIs can cache their response, and this cache can be used to fetch the same response later. When implemented correctly, API caching offers a great level of efficiency. +publishedDate: 2022-01-19T18:41:43.732Z +lastModifiedDate: 2022-01-19T18:41:43.732Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - cache +coverImage: '' +--- + + + +If some recurring requests produce the same response, we can use a cached version of the response to avoid the excessive load. + + + +## API Caching + +Caching enables us to store copies of frequently accessed data in several places along the request-response path. Today, APIs use caching extensively, and it is also one of the architectural constraints of REST APIs. + +When a client requests some resources, the request first goes through a cache and then to the server. If the cache contains the updated data, the request uses that data to satisfy the user request. If it does not, the data comes from the server. + +There are two techniques of caching based on where you keep the cache. + +1. Client Caching +2. Server Caching + +### Client Caching + +If you take a good look at your API calls, you may notice several redundant requests that are called with every page load or when components are re-rendered. Besides slowing down your app, these redundant calls also put a load on the server. + +Therefore, caching API responses on the client level improves both client and server efficiency. Any routinely fetched request can be kept locally on the client-side, reducing the need for additional API calls. + +We can store client-side caches in Cache Storage, Local Storage, Session Storage, IndexedDB, or Cookies depending on the type of data. + +### Server Caching + +Server Caching reduces the load on the server by storing repeated calls in a cache. As a result, the server does not have to process these requests. + +Server Caching does not significantly affect the client-side because it still has to request and wait for the server's response. The client cache caches the response on the browser level. The server cache does the same thing but on the server. + +### Hybrid Approach + +We can adopt a hybrid technique by balancing client and server-side caching, but it has cost limitations. The client has limited local storage available for the cache, so we must decide on a balance during the hybrid approach of caching. + +### Security + +Care must be taken while caching APIs because not everything that can be cached should be cached. API keys, tokens, and other credentials can be a security hazard if cached improperly. These implementations may leave the credentials exposed, compromising the application's security. + +## Conclusion + +API caching offers many benefits to quality of service and performance. However, there are things you should consider to implement it properly. diff --git a/guides/posts/api-caching/post.md b/guides/posts/api-caching/post.md new file mode 100644 index 00000000..a0a429bd --- /dev/null +++ b/guides/posts/api-caching/post.md @@ -0,0 +1,51 @@ +--- +title: How does API caching work? +description: REST APIs cache its response. This cache can be used to fetch the same response later. Let's take a look at it. Let's take a look at some of the benefits of API caching and where it is used. +publishedDate: 2021-10-07T17:01:53.644Z +lastModifiedDate: 2021-10-07T17:01:53.644Z +authors: + - saad +categories: + - api +tags: + - cache +coverImage: '' +--- + + + A REST API works by sending a request to the server and getting a response + in return. Every time you request data, it uses the GET method to fetch that + information. Do you think that if you visit a different page of the same + website and then get back to the original page, another GET request will be + sent to the server to get the same data? The answer to it is no. Let’s take + a look at it. + + +## API Caching + +Caching is the ability to store copies of frequently accessed data in several places along the request-response path. The REST APIs are cacheable. It is one of its architectural constraints. + +When a client requests some resources, the request first goes through a cache and then to the server. If the cache contains the updated data, the request uses that data to satisfy the user request. If it does not, the data comes from the server. + +There are three types of caches: + +- Client Cache +- Server Cache +- Proxy Cache + +The client cache caches the response on the browser level. The server cache does the same thing but on the server. And proxy cache implements caching on the proxy server between the client and the server. + +## Cache Supported HTTP Methods + +Since REST API is cacheable, two methods support the caching: GET and POST. The GET request is cached by default. But the POST request, on the other hand, can be cached if required. You can set your POST request to cache by either providing it with an Expire or a Cache-Control header. + +The PUT and DELETE methods’ responses are not cacheable. + +## Benefits of API Caching + +There are several benefits of caching your API’s response. Here are some of them: + +- Your quality of service improves. +- The website consumes less bandwidth. +- The website latency decreases. +- Server load also decreases. diff --git a/guides/posts/api-call-typescript/images/snippet.png b/guides/posts/api-call-typescript/images/snippet.png new file mode 100644 index 00000000..62bf1de4 Binary files /dev/null and b/guides/posts/api-call-typescript/images/snippet.png differ diff --git a/guides/posts/api-call-typescript/post.md b/guides/posts/api-call-typescript/post.md new file mode 100644 index 00000000..fb139eb6 --- /dev/null +++ b/guides/posts/api-call-typescript/post.md @@ -0,0 +1,115 @@ +--- +title: How to call APIs using TypeScript? +description: 'TypeScript is the superset of JavaScript that offers type-checking to avoid issues related to types. This guide describes how to make type-safe calls to APIs using TypeScript.' +publishedDate: 2022-01-13T19:10:30.765Z +lastModifiedDate: 2022-01-13T19:10:30.765Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - typescript +coverImage: '' +--- + + + +TypeScript helps developers by offering static typing, which enforces type checks during development instead of during run time. Consequently, the code quality and readability are also improved. + + + +## API Calls + +The process of calling APIs in TypeScript differs from JavaScript. These are the additional tasks you need to do in TypeScript: + +- Assigning a type to the API call. +- Assigning a type to the API response. + +### API + +I will use the [Currency Conversion and Exchange Rates](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) as the API for this guide. Go ahead and subscribe to it. On the Endpoints page, select the **Convert** endpoint and click on the **Test Endpoint** button to get the response. + +Following is the response we receive from the API: + +```json +{ + "success": true, + "query": { + "from": "USD", + "to": "EUR", + "amount": 750 + }, + "info": { + "timestamp": 1642403043, + "rate": 0.876002 + }, + "date": "2022-01-17", + "result": 657.0015 +} +``` + +### Creating the Interface + +Next, we need to create an interface to describe the response properties. Later on, we will assign this interface as a type to the API call and response. + +We can create the interface by observing the JSON response above, and it will look like this. + +```js +interface ConversionData { + success: boolean + query: { + from: string + to: string + amount: number + } + info?: { + timestamp: string + rate: number + } + date: string + result: number +} +``` + +After `info`, the question mark means that the info object is optional. This is helpful for values that the API may not return. + +### API Call + +We will create a function `getConvertedData` that will house the code for fetching the API. Say we are using the Fetch API, which returns a Promise. This Promise will then resolve into an object of the type `ConversionData`. + +Let's assign the types to this function: + +```js +function getConvertedData(): Promise { + // API call will go here. +} +``` + +### API Response + +Now, we need to populate this function with code for fetching the API. [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) automatically generates snippets in multiple languages and options. Go back to the [Conversion API Page](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and select the (JavaScript) fetch code snippet: + +![JavaScript Fetch Snippet](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-call-typescript/images/snippet.png) + +If you copy this snippet and use it in the function, your TypeScript compiler will show an error. That is because your function expects a return value of type `ConversionData` while you have not specified any type currently. If no type is specified, TypeScript assumes the `any` type. We need to cast the response type from `any` to `ConversionData`. + +After making the required changes, our function will look like this: + +```js +function getConvertedData(): Promise { + return fetch('https://currency-conversion-and-exchange-rates.p.rapidapi.com/latest?from=USD&to=EUR%2CGBP', { + method: 'GET', + headers: { + 'x-rapidapi-host': 'currency-conversion-and-exchange-rates.p.rapidapi.com', + 'x-rapidapi-key': 'your_api_key', + }, + }) + .then((response) => response.json()) // Parse the response in JSON + .then((response) => { + return response as ConversionData; // Cast the response type to our interface + }); +} +``` + +That is pretty much it, and now we can successfully interact with the API in TypeScript. diff --git a/guides/posts/api-developer-experience/post.md b/guides/posts/api-developer-experience/post.md new file mode 100644 index 00000000..3accfc17 --- /dev/null +++ b/guides/posts/api-developer-experience/post.md @@ -0,0 +1,66 @@ +--- +title: How to Improve the Developer Experience of your API? +description: Learn why Developer Experience plays a significant role in API growth and what strategies you can employ to improve it. +publishedDate: 2021-12-22T15:57:17.709Z +lastModifiedDate: 2021-12-22T15:57:17.709Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - developer + - experience +coverImage: '' +draft: false +--- + + + +Developer Experience (DX) is equivalent to User Experience because developers are the end-users of your APIs. It is critical because the quality of the experience directly affects the adoption of your API. + + + +## Why is it critical? + +The API space is getting more competitive with time, and companies are looking for a way to stand out from the competition by providing a good developer experience. These days, the decision of adopting an API is mainly made by a developer as they are much more empowered in making business decisions. + +Today, a seamless developer experience is one of the best ways to stand out in the API market. It does not matter what an API does; developer experience is the deciding factor in its growth and adoption. + +Here are a few pointers that can improve your API's DX. + +## Time to First Call + +The journey of adoption, starting from discovering your API, comes down to the time it takes for a developer to get started with your API. When developers discover your API, their first step is to set up and call your API. This step is essentially the first interaction of the developer with your API, and it should be as smooth as possible. + +You can streamline this onboarding process using Quick Start Guides that provide code samples and steps to integrate the API. Every API has a different implementation of API Keys, so make it easy for developers to get the API key and communicate it clearly. You can also embed the key in code samples for an even better experience. + +## Stellar Documentation + +Documentation is the first view of your API. Developers need to understand what a product has to offer before adopting it. APIs can be confusing if they lack proper, explanatory documentation. Make sure the documentation propagates the USP of your API and the problem it solves. + +This is why popular APIs like Stripe, GitHub, etc., provide interactive and rich documentation. You can check out the API Documentation [must-haves](https://RapidAPI.com/guides/api-documentation) if you are interested. + +## Interactive Console + +While browsing your API, developers may want to know whether it fits their requirements or exactly what kind of data it returns. They will want to dive deeper by testing the API endpoints. If you make this process convenient, you can increase adoption. + +For example, take a look at [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). Using its interactive preview, developers can test the API endpoints directly from their browser and see what the responses look like. + +![Interactive Console of RapidAPI Hub](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/increase-api-adoption/images/endpoints.jpg) + +## Troubleshooting and Support + +Developers are bound to get errors with your API. You can improve their troubleshooting experience by providing helpful error messages. Moreover, maintain a medium for offering support and taking feedback from the developers. + +## Pricing and Limitations + +Communicate the usage quotas and rate limits clearly and avoid complicated pricing plans because they can deter developers. + +## Inspire Developers + +Finally, you can go a step further by making guides and tutorials about building real-world applications with your API. + +## Conclusion + +An API has good DX if it is easy to use and the barriers to entry are as low as possible. diff --git a/guides/posts/api-document-rapidapi-hub/images/add-endpoint.png b/guides/posts/api-document-rapidapi-hub/images/add-endpoint.png new file mode 100644 index 00000000..496690c6 Binary files /dev/null and b/guides/posts/api-document-rapidapi-hub/images/add-endpoint.png differ diff --git a/guides/posts/api-document-rapidapi-hub/images/docs.png b/guides/posts/api-document-rapidapi-hub/images/docs.png new file mode 100644 index 00000000..e3577786 Binary files /dev/null and b/guides/posts/api-document-rapidapi-hub/images/docs.png differ diff --git a/guides/posts/api-document-rapidapi-hub/images/endpoint-defs.png b/guides/posts/api-document-rapidapi-hub/images/endpoint-defs.png new file mode 100644 index 00000000..02102864 Binary files /dev/null and b/guides/posts/api-document-rapidapi-hub/images/endpoint-defs.png differ diff --git a/guides/posts/api-document-rapidapi-hub/images/key.png b/guides/posts/api-document-rapidapi-hub/images/key.png new file mode 100644 index 00000000..d024bdb7 Binary files /dev/null and b/guides/posts/api-document-rapidapi-hub/images/key.png differ diff --git a/guides/posts/api-document-rapidapi-hub/post.md b/guides/posts/api-document-rapidapi-hub/post.md new file mode 100644 index 00000000..b0af9358 --- /dev/null +++ b/guides/posts/api-document-rapidapi-hub/post.md @@ -0,0 +1,91 @@ +--- +title: How to Document your API using RapidAPI Hub? +description: Well constructed documentation ensures a good developer experience, which is critical for increasing the adoption of your API. RapidAPI Hub provides features that help you a lot during documentation. Read this guide to learn more about them. +publishedDate: 2021-12-23T15:57:17.709Z +lastModifiedDate: 2021-12-23T15:57:17.709Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - documentation + - rapidapi +coverImage: '' +draft: false +--- + + + +Documentation allows users to understand and connect with your API smoothly. Well constructed documentation ensures a good developer experience, which is critical for increasing the adoption of your API. + + + +Today, we will see how [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) helps in documenting your APIs. + + + Listing your API on RapidAPI Hub will put it in front of over 3 million + developers. Learn more about using RapidAPI Hub as an API provider. + + +Earlier, we discussed the [must-have elements of API Documentation](https://RapidAPI.com/guides/api-documentation); let’s demonstrate each of those documentation elements using RapidAPI Hub. + +## Authentication Information + +RapidAPI automatically gives your API both authentication and user management functionality. For developers consuming your API, this provides a seamless integration experience. + +RapidAPI authentication allows developers to access all their APIs with a single RapidAPI key. Moreover, they can also test your API from a browser, subscribe with a single click, and start using your API without the friction of signing up for yet another account and getting API credentials. + +Once the developers subscribe to your API, they can use the API key, which is clearly communicated in the parameters and the code snippets. + +![Authentication Information](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-document-rapidapi-hub/images/key.png) + +## Endpoint Definitions + +You can specify information, descriptions, and external documentation links for each API endpoint in your API Dashboard. + +![Adding Name and Description of Endpoint](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-document-rapidapi-hub/images/add-endpoint.png) + +So, you can easily show the following information about endpoints: + +- Request methods to call the endpoint, such as POST, GET, etc. +- Endpoint URL. +- Required and optional parameters for the endpoint. +- Data returned by the endpoint in response. +- A short non-technical description of what it does and how it relates to other endpoints. + +Here is how the developers will see your endpoint definitions. + +![Endpoint Definitions on RapidAPi Hub](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-document-rapidapi-hub/images/endpoint-defs.png) + +## Code Snippets + +RapidAPI automatically generates code snippets for your API in multiple languages and libraries. You don't have to worry about creating them, as RapidAPI Hub uses the endpoint settings and other details to formulate them. + +These code snippets embed the API key so that developers can start using your API quickly. This reduces the time to the first call, which is critical for good developer experience and API adoption. + +## Example Responses and Error Logs + +Sometimes, it is unclear what data we can get until we receive the API response. Even then, actual responses can be extensive, and it can be hard to decipher their structure. Good documentation includes example responses for each endpoint to show the users what to expect in return. + +In the endpoints section of your API Dashboard, you can specify example responses for any endpoint. Following is a good example of such a response: + +![Example Response](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-documentation/images/response.png) + +As you can see, you can set example responses for multiple status codes. You can also display your error messages using error status codes like 500 to improve the documentation further. + +## Detailed Docs + +You can use the Docs section in your API Dashboard to add detailed documentation, external links, guides, and other resources. + +![Adding Detailed Docs](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-document-rapidapi-hub/images/docs.png) + +The detailed docs will show up on your API’s page’s **About** section. This tab gives you a space for adding additional information such as Frequently Asked Questions without cluttering the documentation. + +## Pricing and Terms of Use + +You can specify pricing plans, limits, usage quotas, and terms of use for your API, which are neatly organized in a separate **Pricing** tab. diff --git a/guides/posts/api-documentation-tools/post.md b/guides/posts/api-documentation-tools/post.md new file mode 100644 index 00000000..43b7b83b --- /dev/null +++ b/guides/posts/api-documentation-tools/post.md @@ -0,0 +1,58 @@ +--- +title: Top 5 API Documentation Tools +description: Documentation allows users to understand and connect with your API smoothly, ensuring a good developer experience. Here are some tools that help developers create and maintain API documentation. +publishedDate: 2022-02-03T14:17:11.709Z +lastModifiedDate: 2022-02-03T14:17:11.709Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - documentation + - tools +coverImage: '' +draft: false +--- + + + +Documentation allows users to understand and connect with your API smoothly, ensuring a good developer experience. Here are some tools that help developers create and maintain API documentation. + + + +## API Documentation + +API Documentation provides complete information needed to consume the API through descriptions, tutorials, examples, and code samples. It is the first thing a developer notices while deciding the API for their project. Moreover, proper documentation increases your API's adoption by making it easy to integrate and use. + +## API Documentation Tools + +Writing documentation manually can be complicated if your team develops and maintains APIs. There are many API documentation tools available today that automate this process and help developers create compelling documentation. + +Let's discuss five of the best available tools. + +### Swagger + +[Swagger](https://swagger.io/) supports OpenAPI v2 and Open API v3. The tool can generate OpenAPI definitions automatically and allows users to maintain the API throughout its life cycle. It allows users to create and visualize API documentation as it develops. + +Swagger has an interactive documentation tool called Swagger UI. It allows developers to create OpenAPI Specification (OAS) in HTML, JavaScript, and CSS. Users can fully customize their documentation to suit their use. Additionally, you can use tweaks by other developers from their community. + +### ReDoc + +[ReDoc](https://redoc.ly/) also supports OpenAPI v2 and Open API v3. It is a powerful and flexible tool with an intuitive UI. ReDoc uses a three-panel design for writing documentation. The left panel provides a reference menu, the middle panel has the documentation for API endpoints, and the right panel has sample requests, responses, and codes. + +Other notable features of ReDoc include markdown support, easy integration, and a CLI to check your OpenAPI definitions. + +### DapperDox + +[DapperDox](http://dapperdox.io/) is an open-source tool that supports OpenAPI v2 and OpenAPI v3 specifications for generating documentation. The tool provides diagrams and guides to help developers create markdown-powered documentation. Moreover, you can document multiple APIs as a suite with appropriate cross-referencing using DapperDox. + +### Stoplight + +[Spotlight](https://stoplight.io/) supports OpenAPI specification and automatically generates documentation against it. It further improves the documentation process by providing features like markdown support, code samples in multiple languages, and a powerful search. + +Spotlight also helps you maintain the documentation with automatic updates, as the documentation is updated for any changes made to the API. + +### Slate + +[Slate](https://github.com/slatedocs/slate) uses markdown for writing documentation and stands out because of its minimal and intuitive design. It presents the complete documentation on a single page instead of multiple pages, albeit maintaining a responsive design. diff --git a/guides/posts/api-documentation/images/code-snippet.png b/guides/posts/api-documentation/images/code-snippet.png new file mode 100644 index 00000000..5b8d6ae7 Binary files /dev/null and b/guides/posts/api-documentation/images/code-snippet.png differ diff --git a/guides/posts/api-documentation/images/response.png b/guides/posts/api-documentation/images/response.png new file mode 100644 index 00000000..ca6794b4 Binary files /dev/null and b/guides/posts/api-documentation/images/response.png differ diff --git a/guides/posts/api-documentation/post.md b/guides/posts/api-documentation/post.md new file mode 100644 index 00000000..24c1f34c --- /dev/null +++ b/guides/posts/api-documentation/post.md @@ -0,0 +1,71 @@ +--- +title: API Documentation and its Must-Haves +description: Documentation allows users to understand and connect with your API smoothly, ensuring a good developer experience. Here are some elements that must be covered in an API's documentation. +publishedDate: 2021-12-14T15:57:17.709Z +lastModifiedDate: 2021-12-14T15:57:17.709Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - documentation +coverImage: '' +draft: false +--- + + + +Documentation allows users to understand and connect with your API smoothly. Well constructed documentation ensures a good developer experience, which is critical for increasing the adoption of your API. + + + +Let's learn more about the essential elements of API Documentation. + +## API Documentation + +API Documentation provides complete information needed to consume the API through descriptions, tutorials, examples, and code samples. It is the first thing a developer notices while deciding the API for their project. Proper documentation increases your API's adoption by making it easy to integrate and use. + +The documentation should be detailed but not complicated. It is crucial to make it simple, as any confusion may influence the developer to choose another API with better documentation. This is why popular APIs like Stripe, Twilio, GitHub, etc., use interactive and rich documentation. + +## Must-Haves + +There is no limit to what kind of content documentation can cover, but these are a few things that **must** be included in good documentation: + +### Quick Start Guides + +Quick Start Guides streamline the onboarding process. They must be beginner-friendly and may include code samples or example responses. + +### Authentication Information + +APIs can use different ways to authenticate their users. For example, an API key is generally assigned to the users, which they use to make API calls. Document this authentication process to ensure your users’ onboarding process goes smoothly. In some cases, quick start guides also cover the authentication information. + +### Endpoint Definitions + +At the end of the day, an API's purpose is to deliver information; and endpoints are the gateways for this information. A developer can not use your API if you do not explain the endpoints adequately. + +Endpoint definitions must cover the following points: + +- Request method to call the endpoint, such as POST, GET, etc. +- Endpoint URL. +- Required and optional parameters for the endpoint. +- Data returned by the endpoint in response. +- A short non-technical description of what it does and how it relates to other endpoints. + +### Code Snippets and Requests + +To further improve the onboarding process for your API, you can include code snippets in multiple languages. These code snippets show the details other documentation can not and allow users to get started quickly. + +[RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) which automatically generates code snippets for all APIs in multiple options. They look like this: + +![Code Snippets on RapidAPI Hub](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-documentation/images/code-snippet.png) + +In addition to code snippets, you can also include example request bodies. You can specify examples of what an effective request looks like for each endpoint. These examples can help the users debug their requests if they fail. + +### Example Responses + +While working with most APIs, particularly REST APIs, it is unclear what data we can get until we receive the API response. Even then, actual responses can be extensive, and it can be hard to decipher their structure. Good documentation can fix this confusion by adding example responses for each endpoint to show the users what to expect in return. + +[Recipe-Food-Nutrition API on RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) has a great illustration of an example response: + +![Example Response](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-documentation/images/response.png) diff --git a/guides/posts/api-first/post.md b/guides/posts/api-first/post.md new file mode 100644 index 00000000..da637c3f --- /dev/null +++ b/guides/posts/api-first/post.md @@ -0,0 +1,59 @@ +--- +title: Introduction to API-First Approach +description: In API-First approach, APIs become the core of a product. +publishedDate: 2021-12-03T15:57:17.709Z +lastModifiedDate: 2021-12-03T15:57:17.709Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - api-first +coverImage: '' +draft: false +--- + + + +APIs have become a critical part of any organization. Many organizations have adopted an API-First strategy, making APIs focal points for their product creation. + + + +## API-First + +Some companies use APIs to provide only some underlying features to their software. APIs take the driving seat in API-First; they become the foundation, and all implementations revolve around their consumption. This approach ensures that all the functionality of an application is accessed through APIs. This strategy ensures that APIs are designed/developed first, and platforms are shaped according to the API design. + +You need to build consistent and reusable APIs to implement the API-First strategy. A lot of thinking goes into designing these APIs. The reason is that after designing these APIs, the backend and frontend are coded according to the API design. + +In simple words, API is designed before writing code, and then code is curated according to the API design. + +## Benefits + +### Cross Platform Development + +One of the main reasons for the growing popularity of this approach is the number of ways to access an application such as mobile, web, connected devices, etc. Companies can quickly scale to different platforms without re-creating the solution because a single API handles all the functionality. All they need to do is integrate the API with their new platform. + +### Efficiency + +API-First approach dictates that APIs are designed beforehand, and development teams can access the design specification. These teams can work parallel by mocking the API since its design specification is available. The approach saves time because the API developers and other teams can work synchronously. On the other hand, in the Code-First approach, the dependent teams must wait until the API is developed and hosted on a server before starting their work. + +### Feedback Incorporation + +API is designed early in iterations which allows the developers to incorporate feedback. API-First allows pivoting and adapting to changes early on, which is much better than changing the whole application to incorporate feedback. + +### Scalability + +API-First organizations can quickly scale to other devices, platforms, and applications. + +### Good Developer Experience + +Developers consume the APIs. A good API design hides the internal complexity and improves the overall developer experience. + +### Reusability + +Let's say that your team built a web application. If you want to extend your application to Android and IOS platforms, you will have to code much of the implementation again. You can avoid all the costs and time spent rebuilding by developing a reusable API early. + +## Challenges + +Among many benefits of API-First, there are also some challenges to consider. The implementation depends significantly on the API design; hence a lousy design could turn these benefits into issues. Moreover, the API must be designed while keeping modifiability in mind to accommodate possible changes in the future and adapt to new requirements. diff --git a/guides/posts/api-gateway/post.md b/guides/posts/api-gateway/post.md new file mode 100644 index 00000000..e4bc3161 --- /dev/null +++ b/guides/posts/api-gateway/post.md @@ -0,0 +1,39 @@ +--- +title: Introduction to API Gateways +description: API Gateway sends the incoming API traffic to the API management system that handles various other functions. In this piece, we are going to briefly look at API Gateways and its benefits. +publishedDate: 2021-10-13T11:27:45.681Z +lastModifiedDate: 2021-10-13T11:27:45.681Z +authors: + - saad +categories: + - api +tags: + - api + - gateway +coverImage: '' +--- + + + When working with APIs, you will come across API Gateways sooner or later. + It sends the incoming API traffic to the API management system that handles + various other functions. Let’s take a look at it. + + +## What is an API Gateway? + +An API Gateway accepts API requests from a client, directs them to the appropriate services, and then combines the results into a synchronous experience. To put it simply, the API Gateway first takes all the requests from a client, understands these requests and determines which services are needed, and then combines them into a unified, seamless experience for the user. + +The API Gateway is an API management tool that sits between client and server. API Gateways performs various functions, including authentication, routing, rate limiting, billing, monitoring, analytics, policies, alerts, security, etc. + +## API Gateway Usage + +As briefly mentioned above, API Gateway has several usages. You can use it to implement authentication and rate-limiting to protect your APIs from overuse and abuse. This will act as a countermeasure in case there is a Denial of Service (DDoS) attack. It can also be used to add analytics and monitoring to understand how people are using your API. You can use it to connect to a billing system if you are monetizing your API. + +## Benefits of API Gateway + +There are several benefits of using API Gateways. Let’s take a look at some of them: + +- You can standardize and also centralize the delivery of services through APIs or microservices using API Gateway. +- It provides flexibility because they are highly configurable. The developers can write the internal structure of an application in multiple ways to invoke multiple backend services using the API Gateway. +- It allows enterprises that rely on legacy applications to work with those apps or extend their functionality. +- It contributes towards monitoring and observability. The API Gateway logs can pinpoint an issue during a monitoring failure. diff --git a/guides/posts/api-google-sheets/images/enable.png b/guides/posts/api-google-sheets/images/enable.png new file mode 100644 index 00000000..ca5a62a6 Binary files /dev/null and b/guides/posts/api-google-sheets/images/enable.png differ diff --git a/guides/posts/api-google-sheets/images/get.png b/guides/posts/api-google-sheets/images/get.png new file mode 100644 index 00000000..2ab71b6e Binary files /dev/null and b/guides/posts/api-google-sheets/images/get.png differ diff --git a/guides/posts/api-google-sheets/images/response.png b/guides/posts/api-google-sheets/images/response.png new file mode 100644 index 00000000..2a25be24 Binary files /dev/null and b/guides/posts/api-google-sheets/images/response.png differ diff --git a/guides/posts/api-google-sheets/images/results.png b/guides/posts/api-google-sheets/images/results.png new file mode 100644 index 00000000..c4257183 Binary files /dev/null and b/guides/posts/api-google-sheets/images/results.png differ diff --git a/guides/posts/api-google-sheets/images/sheet.png b/guides/posts/api-google-sheets/images/sheet.png new file mode 100644 index 00000000..6600eb21 Binary files /dev/null and b/guides/posts/api-google-sheets/images/sheet.png differ diff --git a/guides/posts/api-google-sheets/images/snippet.png b/guides/posts/api-google-sheets/images/snippet.png new file mode 100644 index 00000000..22fc9cd5 Binary files /dev/null and b/guides/posts/api-google-sheets/images/snippet.png differ diff --git a/guides/posts/api-google-sheets/images/subscribe.png b/guides/posts/api-google-sheets/images/subscribe.png new file mode 100644 index 00000000..8368657b Binary files /dev/null and b/guides/posts/api-google-sheets/images/subscribe.png differ diff --git a/guides/posts/api-google-sheets/post.md b/guides/posts/api-google-sheets/post.md new file mode 100644 index 00000000..66228d8d --- /dev/null +++ b/guides/posts/api-google-sheets/post.md @@ -0,0 +1,94 @@ +--- +title: How to use an API in Google Sheets? +description: 'Here is how you can supercharge your Google Sheets by calling APIs and embedding their responses within the sheets.' +publishedDate: 2022-01-12T19:10:30.765Z +lastModifiedDate: 2022-01-12T19:10:30.765Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - rapidapi + - sheets + - google +coverImage: '' +--- + + + +Google Sheets is a powerful tool for storing and managing different kinds of data. Many people use these sheets to keep their income, expenditures, targets, form responses, and more. + + + +## RapidAPI for Google Sheets + +The [RapidAPI add-on for Google Sheets](https://workspace.google.com/marketplace/app/rapidapi_for_google_sheets/873111215514) supercharges these sheets by allowing you to use any API from RapidAPI Hub. [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) lets you choose from thousands of APIs which over 3 million developers are using. + +Using the add-on, you can perform tasks like email validation, geo-location, currency exchange, data imports, and much more without leaving the sheet. Moreover, it provides a getter function that can be dragged down to as many cells as you want for dynamic data fetching. + +## Usage + +Let's go through a practical example to see how we can integrate APIs in Google Sheets. I will use an exchange rate API to convert the currencies of amounts present in a sheet. I have divided the process into four easy steps. + +### → STEP #1: Installation + +To install the plugin, head to [this link](https://workspace.google.com/marketplace/app/rapidapi_for_google_sheets/873111215514) and install the add-on. They will prompt you for required permissions as this add-on requests external APIs. +By default, the add-on will be disabled in your sheets. Before using it in a sheet, you must enable it for that sheet. To do so: + +1. Open the sheet in which you want to use the add-on. +2. Open the “Add-ons” menu at the top of the window. +3. Click “Manage Add-ons”. +4. Click on the three dots menu and select **Use in this document**. + +![Enabling the RapidAPI add-on](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-google-sheets/images/enable.png) + +### → STEP #2: Find the API + +Now, we will find an API that suits our use case. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already. Then, search for "Currency Exchange" in the search section. + +For this guide, I am going to use the [Currency Conversion and Exchange Rates](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). Go ahead and subscribe to the API. + +![Subscribe to the API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-google-sheets/images/subscribe.png) + +### → STEP #3: Formulate the Request + +The add-on offers two functions: + +1. `=GET(URL, selectPath, rapidApiKey, parameters)`: If the API returns a single object in the response. +2. `=GETARR(URL, arrPath, selectPath, rapidApiKey, parameters)`: If the API returns an array of objects in the response. + +We will use the GET function for this guide. First, focus on the code snippet of the API as it will help us formulate the GET function. + +![Code Snippet](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-google-sheets/images/snippet.png) + +Now, let's go over the parameters of the GET function. + +- **URL** - this is the URL of the endpoint you’re using. In our case, it’ll be: `https://currency-conversion-and-exchange-rates.p.rapidapi.com/convert`. + +- **SelectPath** - this will highlight what part of the response data you want to pull into the spreadsheet. You can see the response by testing the API endpoint. As you can see in the following image, we need the `result` field. + +![Testing the Endpoint](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-google-sheets/images/response.png) + +- **rapidApiKey** - this is your API key to use APIs through RapidAPI. You can find it in the `X-RapidAPI-Key` field. + +- **Parameters** - For each parameter (as seen in the code snippet screenshot), you should pass two arguments to the function - the parameterName and parameterValue. In our case, the parameters are "from", "to" and "amount". Note that the parameter value can also reference another cell to get the value dynamically. + +Our GET function will thus be: + +`=GET("https://currency-conversion-and-exchange-rates.p.rapidapi.com/convert", "result", "your-key-here", "from", "EUR", "to", "USD", "amount", B2)` + +### → FINAL STEP + +Head over to your Google Sheet now. I am using the following mock data: + +![Google Sheet](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-google-sheets/images/sheet.png) + +In the "Amount" cell C2, paste the GET function we formulated above. + +![Get Function](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-google-sheets/images/get.png) + +Once you enter, it will make the API call, and you will get the exchanged amount in USD. Notice how I am using the cell value B2 as the amount parameter? Now, you can just drag the cell down, and B3, B4 will replace B2, and so on for each cell. As you can see, all the amounts are exchanged and filled in their respective cells. + +![Results](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/api-google-sheets/images/results.png) + +That's all it takes to integrate any API from RapidAPI Hub into your Google Sheets. diff --git a/guides/posts/api-governance/post.md b/guides/posts/api-governance/post.md new file mode 100644 index 00000000..dd656de0 --- /dev/null +++ b/guides/posts/api-governance/post.md @@ -0,0 +1,73 @@ +--- +title: What is API Governance? +description: API governance refers to the best practices of creating and managing APIs in an organization. +publishedDate: 2021-11-22T15:57:17.709Z +lastModifiedDate: 2021-11-22T15:57:17.709Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - governance +coverImage: '' +draft: false +--- + + + +APIs have become a critical part of any organization. Many organizations have adopted an API-First strategy, making APIs focal points for their product creation. + + + +## Why is it needed? + +Many organizations use APIs as building blocks for their products. Moreover, with the rise of microservices and application interfaces, the number of APIs being used by an organization can grow exponentially. In many cases, organizations develop robust APIs that serve web applications, mobile applications, and developers in one way or the other. This implementation is often regarded as an API-First approach. + +Governance is concerned with the management and creation of APIs within a landscape such as an organization, especially those who use an API-First approach. + +## API-First + +Some companies use APIs to provide some underlying features to their software. However, in the API-First approach, APIs become the core or foundation. This approach ensures that all the functionality of an application is accessed through APIs. This means that APIs are built first, and then platforms are shaped according to the API design. + +One of the main reasons for the growing popularity of this approach is the increasing ways of accessing an application like through mobile, web, connected devices, etc. Without re-creating the solution, companies can scale to different platforms because a single API handles all the functionality. All they need to do is integrate the API with their new platform. + +## Best Practices + +API Governance allows organizations to carry out the API-First approach effectively. Here are some strategies and practices that can help: + +### Common API Specification + +Using a standard API Specification that is common across the whole organization can help reduce complexities. For example, using a defined [OpenAPI spec](https://rapidapi.com/guides/open-api-spec) version lets developers, QA (quality assurance testing), and other engineers start work on the API before a single line of code is written. + +### Standardizing Metadata + +Using standard metadata across all your APIs helps with logging (errors) and tracking analytics. + +### Access Controls + +All members of an organization should be divided into separate groups according to their permissions to access specific APIs. + +### Common Schema + +Another good practice is using a reasonably common schema across all your APIs. Doing so will make it convenient for developers to understand and manage API requests and responses. + +## Adopt a Versioning Scheme + +Consistent versioning allows broad communication of features and compatibility. Lack of clear versioning can create a mess. + +## Avoid one-off integrations + +One-off integrations and special cases create wasted time because people have to figure out the special use case every time a new change is made. + +## How RapidAPI can help? + +RapidAPI provides two excellent platforms covering all the features required for governing APIs, such as access control, API testing, integration, analytics, and many more. These include [Rapid API Teams](https://rapidapi.com/products/teams?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) for organizations and [RapidAPI Enterprise Hub](https://rapidapi.com/products/enterprise-hub/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) for enterprises. + + + Interact and learn more about RapidAPI Teams to get a better idea. + diff --git a/guides/posts/api-management-practices/post.md b/guides/posts/api-management-practices/post.md new file mode 100644 index 00000000..d8555347 --- /dev/null +++ b/guides/posts/api-management-practices/post.md @@ -0,0 +1,44 @@ +--- +title: What are best API Management practices? +description: Your company’s growth directly influences its tech infrastructure, and this, in turn, affects the size of your APIs. So let's take a look at some of the best API management practices. +publishedDate: 2021-10-26T10:25:53.100Z +lastModifiedDate: 2021-10-26T10:25:53.100Z +authors: + - saad +categories: + - bestPractices +tags: + - api + - management +coverImage: '' +--- + + + APIs have become crucial for business development stacks since they provide + a way to communicate between client and server or other applications. Your + company’s growth directly influences its tech infrastructure, and this, in + turn, affects the size of your APIs. So you must follow some best practices + for managing your APIs. + + +## What is API Management? + +API management is the practice of overseeing all aspects of the APIs that your enterprise uses. It includes but is not limited to providing different ways of building APIs, making them accessible for all users, monitoring and analyzing their usage, reporting performance metrics, and securing access so only authenticated users can use them. + +Let’s take a look at some of the API management practices that you should follow. + +### API Availability + +Your APIs are acting as messengers between your servers, and if they are down, your whole business can go down with it. So you need to ensure that your API is available at all times and see as little downtime as reasonably possible. + +### Provide API Support + +One of the essential API management practices is providing quality support for your APIs to developers. You should also provide as many options as possible so developers can fully utilize the power of your API. + +### Provide Reliability + +Your APIs must be reliable; otherwise, no one is going to use them. You can do this by ensuring you are pulling the data from reliable sources or providing an endpoint that does not crash as the traffic increases. + +### API Security + +If your APIs are not secure, no one is going to use them. You also need to ensure that your company’s internal APIs are secure; otherwise, your data will be vulnerable to outside threats. You can use different techniques like rate-limiting, authentication, input validation, and adding a fail-safe to add additional security layers within your API. diff --git a/guides/posts/api-mocking/post.md b/guides/posts/api-mocking/post.md new file mode 100644 index 00000000..d41ca91a --- /dev/null +++ b/guides/posts/api-mocking/post.md @@ -0,0 +1,59 @@ +--- +title: What is API Mocking? +description: API Mocking lets you imitate and test a real API by emulating its responses, response behaviors, and endpoints. +publishedDate: 2021-11-25T19:10:30.765Z +lastModifiedDate: 2021-11-25T19:10:30.765Z +authors: + - 'ahmad-bilal' +categories: + - rapidapi +tags: + - api + - mocking +coverImage: '' +--- + + + API Mocking lets you imitate and test a real API by emulating its responses, + response behaviors, and endpoints. + + +## Mock APIs + +What is the first thing you do when you start using an API? You test its endpoints by sending requests and observing their responses. Mock APIs serve the same purpose; they help you get an idea of the actual API in question by imitating it on a smaller scale. Hosted on a local or hosted server, they can serve dynamic or static responses, imitating the data the real API would return albeit following the same schema. + +## Why are Mock APIs used? + +Today, APIs are used extensively for providing functionalities to apps. It can take time to complete building the real API. Without a mock API, development may come to pause until the API is ready. + +API consumers (mostly frontend developers) need to know the responses from the backend in order to shape them for the frontend. Backend developers need to test, run and improve the API. + +Frontend developers can consume the mock API, which provides the same interface as the actual API. Mock APIs can also be beneficial for API testing and development. The backend team can work cooperatively with the frontend team to gather feedback. They can test if the requirements are being met and make changes to the backend if needed. + +Sometimes, apps use a third-party external API that has a fixed quota or premium plan. It can be expensive and time-consuming to call these APIs for testing them during integration. Instead, you can mock their responses and complete integration. + +## Types + +### Static vs Dynamic Responses + +To get static mock responses, you specify example responses for each endpoint and they are not affected by the input whatsoever. You can generate them yourself, or use tools that create dummy data. + +Dynamic mock responses can differ according to the input parameters of the API call. Generally, static responses are good enough for mocking APIs. + +### Internal vs External APIs + +Unlike External APIs, Internal ones can be subject to more changes as they are tested by mock APIs. Therefore when mocking internal APIs, there should be a system to pull these changes to keep the mock API updated. + +### Local vs Public Mock APIs + +Mock API servers can be implemented locally. Local mock servers are often part of the code repository. A few benefits of local mock APIs are flexibility, security, and availability. + +However, these local servers can be difficult to maintain. Public mock APIs are accessed over the network and are separate from the development or staging environment. These public mocks are popular because a team can automatically generate a mock API from an API design specification, and they do not have to manage the server. + +## Drawbacks + +Here are a few drawbacks that must be kept in mind while mocking APIs: + +- Mock APIs require maintenance. It may become obsolete if the old request and response data is not updated. + +- The effectiveness of the mock API depends on the accuracy of the example responses and server interactions. diff --git a/guides/posts/api-pagination/post.md b/guides/posts/api-pagination/post.md new file mode 100644 index 00000000..ef9ef8d4 --- /dev/null +++ b/guides/posts/api-pagination/post.md @@ -0,0 +1,59 @@ +--- +title: What is API Pagination? +description: Performance is the most critical factor of an API, and pagination is one way of optimizing it. Let's learn why. +publishedDate: 2021-10-01T17:10:30.765Z +lastModifiedDate: 2021-10-01T17:10:30.765Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - api + - pagination + - paging +coverImage: '' +--- + + + If you have ever navigated through multiple pages of Google Search results + or clicked the "load more posts" button on a blog, you have seen pagination. + API pagination works in a similar way. + + +## Why is API Pagination needed? + +Imagine if Google showed all the search results on a single page. What would be the effect? For starters, it will take ages to compile and fit so many results on a single page. Not to mention the immense load each request will put on the server. + +This is the same reason why we need pagination for APIs. The APIs tracking medium to large size databases can return millions of entities as results, if not more. Therefore, such APIs divide their responses and return them in "pages" to keep performance in check. + +## Basics of API Pagination + +Typically, all the endpoints of an API that return a list of entities must be paginated. Even if, at some point, the data is not large enough to require pagination, it may increase in the future. Modifying endpoints later can get complicated. Therefore, pagination must be kept in mind while designing an API. + +You can choose what endpoint needs to be paginated. Depending upon the data, you can define a "Size" parameter that dictates how many entities are returned per page. Another endpoint, typically named "Page"(as in the current page number), will work together with Size to handle pagination. Paging also assumes that the responses are in some sort of order. + +## Is API Pagination necessary? + +Do you always need pagination? It depends on the API in question. + +If the dataset it serves is small and well defined, the users can reduce the number of responses by being more specific in requests. In this scenario, you may not need to paginate your API. But still, it is considered a good practice to provide pagination through API calls. + +## Types of API Pagination + +Pagination can be implemented in different ways. Depending on the implementation, the types are as follows. + +### Offset Paging + +It is the most common and relatively simple type of pagination. It is implemented by two parameters, Limit (aka Size) and Offset (aka Page). It is frequently used for apps that are backed by a SQL Database. Because Limit and Offset keywords are already part of the SQL syntax, very little logic is required to implement Offset Paging. + +### Keyset Paging + +In this approach, a key or delimiter is selected by which data can be sorted. Then, they key is used as a reference to split data into pages. + +For example, if data is sorted by user ids, then the key will be `since_user_id`. If the limit is set to 10, then the user will have to specify `since_user_id=10` to get results from 10 to 20. + +### Cursor Paging + +In cursor paging, in addition to the page requested, the API also returns a cursor. This cursor basically points to the contents of the next page. Hence paging is tightly controlled by logic on the API's end. + +This guide was an introduction to API Pagination. In the next one, we dive deeper into its types to learn more about them. diff --git a/guides/posts/api-rate-limiting/post.md b/guides/posts/api-rate-limiting/post.md new file mode 100644 index 00000000..6f37a868 --- /dev/null +++ b/guides/posts/api-rate-limiting/post.md @@ -0,0 +1,50 @@ +--- +title: Introduction To API Rate Limiting +slug: api-rate-limiting +description: API Rate Limiting is the process through which you limit the amount of traffic coming to your API by a single IP address. Let's take a look at some of its types and methods. +publishedDate: 2021-11-19T18:41:43.732Z +lastModifiedDate: 2021-11-19T18:41:43.732Z +authors: + - saad +categories: + - api +tags: + - rate-limiting + - api +coverImage: '' +draft: false +--- + + + +When designing an API, you follow various best practices to ensure your API’s performance and success. Some of them include using the HTTP status codes, endpoint nesting, SSL certificate, using JSON for communication, etc. Another critical practice that plays a crucial role in your site’s uptime is rate-limiting. + + + +Let’s take a look at it. + +## What is API Rate Limiting? + +It is the process through which you limit the amount of traffic coming to your API by a single IP address. API rate limiting also protects your site from Distributed Denial of Service (DDoS) attacks. If the attacker tries to tank your server by launching a DDoS attack, the rate-limiting will stop addressing the API requests after reaching a certain threshold. + +The API Rate Limiting also helps to make your API scalable. If your API becomes popular out of the blue, there will be unexpected spikes of traffic that will cause lag. Thus, having rate-limiting will keep your API going for other developers. + +## Types of Rate Limiting + +There are two approaches to rate limiting. Let’s take a look at them. + +### Key-level Rate Limiting + +This rate-limiting level is more focused on controlling traffic from individual IP addresses to ensure that users do not go above their prescribed limit. + +### API-Level Rate Limiting + +This rate-limiting type deals with all the traffic coming to the API from all the users. It is to ensure that the overall API rate limit does not exceed. + +## Methods of API Rate Limiting + +Here are some of the methods you can use for API rate limiting. + +- **Hard Stop:** Your API consumers will get an error when they call the API if they are over the limit. +- **Soft Stop:** You can implement a small period where the API calls will continue to succeed after the limit has been reached. You can use this period to let your API consumer know that they may have to subscribe to a new package. +- **Throttled Stop:** Another thing you can implement is to slow down the response time once the user has reached the limit. diff --git a/guides/posts/api-request-schedule/post.md b/guides/posts/api-request-schedule/post.md new file mode 100644 index 00000000..e9d0eedf --- /dev/null +++ b/guides/posts/api-request-schedule/post.md @@ -0,0 +1,119 @@ +--- +title: How to Schedule API Calls using setTimeout()? +description: During web development, we often need to schedule API requests and send them after a specified period of time. This guide will describe how we schedule API calls using the JavaScript setTimeout() mehtod. +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - delay + - settimeout + - api + - calls +publishedDate: 2022-02-24T14:17:11.709Z +lastModifiedDate: 2022-02-24T14:17:11.709Z +coverImage: '' +draft: false +--- + + + +We often need to schedule API requests and send them after a specified delay. This guide will describe how we schedule API calls using the JavaScript setTimeout() method. + + + +During web development, we have two options that we can use for scheduling tasks, `setTimeout` and `setInterval`. + +## setTimeout vs setInterval + +Both are built-in global methods in the Document Object Model and are used to schedule tasks. Still, they function differently. `setInterval` executes a task continuously after intervals, while `setTimeout` invokes a function only once after a specified delay. We will discuss `setTimeout` in this guide, but if you are interested, you can read our guide on [scheduling API calls with setInterval](https://rapidapi.com/guides/api-requests-intervals). + +## Using setTimeout() + +`setTimeout()` is an asynchronous method, and it works by setting a timer according to the specified delay. When the timer expires, the given task is executed. It needs two parameters; the function to run and the delay for which the timer should wait specified in milliseconds. This code will trigger the `exampleFunction` after the delay of one second: + +```js +setTimeout(exampleFunction, 1000); +``` + +Note that `setTimeout` expects a reference to the function, so do not add `()` after the function, as you can see above.2 + +### API request + +`setTimeout()` is asynchronous; therefore, it will not pause the execution of other functions, which is evident from this example: + +```js +setTimeout(() => { + console.log('1st Call'); +}, 5000); + +setTimeout(() => { + console.log('2nd Call'); +}, 2000); + +// Output: +// 2nd Call +// 1st Call +``` + +We can pass an API call inside the `setTimeout()` to execute it after a certain delay. + +```js +setTimeout(() => { + const res = await fetch(`https://jsonplaceholder.typicode.com/posts`); +}, 2000); +``` + +Once this timer is created, it will send the API request after two seconds. However, we need to do a couple more things before using it. + +### Clearing the Timer + +We may need to check for some conditions and stop the repeating calls if the condition holds true. For example, you may want to add a button to cancel the timer. For this purpose, we can use the `clearTimeout()` function. It takes the timer ID as a parameter, which is returned by the `setTimeout()`. + +```js +let timerID = setTimeout(() => { + const res = await fetch(`https://jsonplaceholder.typicode.com/posts`); +}, 2000); + +if (condition) { + clearTimeout(timerID); // Stop the interval if the condition holds true +} +``` + +### useEffect + +When a `setTimeout()` is created, it stays in the memory until it is cleared. So, we need to clean the interval when the component is unmounted to ensure no memory leaks. Hence, it is a good practice to implement `setInterval` in a `useEffect` hook. + +To start using the `useEffect` hook, we need to import it: + +```js +import {useEffect} from 'react'; +``` + +Then, we can use the hook as follows: + +```js +useEffect(() => { + // this part is run when component is mounted + + return () => { + // (Optional) this part is run when component is unmounted + }; +}, []); // Dependency Array (Optional): Any variable/component specified in this array is monitored, and the useEffect is triggered whenever it changes +``` + +We want to create the timer when the component mounts and clear it when the component unmounts so that the hook will look like this: + +```js +useEffect(() => { + let timer = setTimeout(() => { + const res = await fetch(`https://jsonplaceholder.typicode.com/posts`); + }, 2000); + + return () => { + clearTimeout(interval); + }; +}, []); +``` + +This code will avoid memory leaks by cleaning up the interval whenever the component re-renders or unmounts. diff --git a/guides/posts/api-requests-intervals/post.md b/guides/posts/api-requests-intervals/post.md new file mode 100644 index 00000000..6600b527 --- /dev/null +++ b/guides/posts/api-requests-intervals/post.md @@ -0,0 +1,96 @@ +--- +title: How to send API requests with intervals using setInterval()? +description: During web development, we often need to send repeated API requests with intervals. It can be done to fetch updated data, show changes without having to reload, etc. This guide will describe how we can call APIs with intervals, +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - intervals + - api + - calls +publishedDate: 2022-02-18T14:17:11.709Z +lastModifiedDate: 2022-02-18T14:17:11.709Z +coverImage: '' +draft: false +--- + + + +We often need to send continuous API requests with intervals. It can be done to fetch updated data, show changes without having to reload, etc. Let's see how we can implement it in React. + + + +During web development, we may need to fetch data from an API every so often, and the way can do that is with the `setInterval()` function. + +## Using setInterval() + +`setInterval()` is a globally available JavaScript method that makes a function execute repeatedly after a certain time interval. It needs two parameters; the function to execute and the time interval in milli seconds. This code will send the API call after every second: + +```js +setInterval(exampleFunction, 1000); +``` + +### API request + +We can pass an API call inside the `setInterval()` to make it run repeatedly. + +```js +setInterval(() => { + const res = await fetch(`https://jsonplaceholder.typicode.com/posts`); +}, 2000); +``` + +Once this interval is created, it will send the API request after every two seconds. However, we need to do a couple more things before using it. + +### Stopping the Repeated Calls + +We may need to check for some condition and stop the repeating calls if the condition holds true. For example, we may want to send a total of 5 repeated requests only. For this purpose, we can use the `clearInterval()` function. It takes the interval ID as a parameter, which is returned by the `setInterval()`. + +```js +let intervalID = setInterval(() => { + const res = await fetch(`https://jsonplaceholder.typicode.com/posts`); +}, 2000); + +if (condition) { + clearInterval(intervalID); // Stop the interval if the condition holds true +} +``` + +### Clearing the Interval + +When a `setInterval()` is created, it stays in the memory until it is cleared. So, we need to clean the interval when the component is unmounted, to make sure that there are no memory leaks. Hence, it is a good idea to always implement `setInterval` in a `useEffect` hook. + +To start using the `useEffect` hook, we need to import it: + +```js +import {useEffect} from 'react'; +``` + +Then, we can use the hook as follows: + +```js +useEffect(() => { + // this part is run when component is mounted + + return () => { + // (Optional) this part is run when component is unmounted + }; +}, []); // Dependency Array (Optional): Any variable/component specified in this array is monitored, and the useEffect is triggered whenever it changes +``` + +We want to create the interval when the component mounts, and clear it when the component unmounts, so the hook will look like this: + +```js +useEffect(() => { + let interval = setInterval(() => { + const res = await fetch(`https://jsonplaceholder.typicode.com/posts`); + }, 2000); + + return () => { + clearInterval(interval); + }; +}, []); +``` + +This will avoid memory leaks by cleaning up the interval whenever the component re-renders or unmounts. diff --git a/guides/posts/api-schemas/post.md b/guides/posts/api-schemas/post.md new file mode 100644 index 00000000..7253784e --- /dev/null +++ b/guides/posts/api-schemas/post.md @@ -0,0 +1,204 @@ +--- +title: API Schemas and their Types +slug: api-schemas +description: An API Schema defines how the data is structured in the API implementation. This information is useful for the developers to interact with an API and its endpoints. +publishedDate: 2022-01-19T18:41:43.732Z +lastModifiedDate: 2022-01-19T18:41:43.732Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - schema + - api +coverImage: '' +draft: false +--- + + + +A schema is a metadata that shows how data is structured. Like database schemas, there are schemas for APIs that serve the same purpose. API Schema is a valuable API tool and must be picked accordingly. + + + +## Why are API Schemas Needed? + +API Schemas describe the offered resources, endpoints, supported operations, and representations of an API. So, developers can take advantage of these schemas to integrate and use APIs. + +Moreover, these schemas allow you to generate reference documentation dynamically, making your APIs more discoverable. Developers can use them to judge whether the API fits their needs or not. + +## Benefits + +Besides the use-cases we mentioned above, API Schemas also offer benefits in API maintenance. Keeping your documentation updated as you iterate on your API can be a challenging feat. Publishing a schema for your API is a neat way to keep the documentation updated and maintained. + +## Types of API schemas + +We can categorize API Schemas into types based on the API specification language used. These types include OpenAPI (Swagger), API Blueprint, and RAML. OpenAPI is the most common and widely used specification. Let's learn more about it. + +### OpenAPI + +OpenAPI is a specification format for generating API Schemas. It uses JSON or YAML to describe an API using the following pointers: + +- Basic information of the API, including title, description, and version. + +- Available endpoints of the API, such as `/posts`. + +- All the operations offered in an endpoint such as `GET /posts`, `POST /user`, etc. + +- Input and output parameters for each operation. + +Here is an example of the OpenAPI schema in JSON. + +```json +{ + "openapi": "3.0.0", + "info": { + "title": "Simple API overview", + "version": "2.0.0" + }, + "paths": { + "/": { + "get": { + "operationId": "listVersionsv2", + "summary": "List API versions", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + } + } + } + } + }, + "300": { + "description": "300 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": "{\n \"versions\": \"CURRENT\"" + } + } + } + } + } + } + } + }, + "/v2": { + "get": { + "operationId": "getVersionDetailsv2", + "summary": "Show API version details", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + } + } + } + } + } + } + }, + "203": { + "description": "203 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://23.253.228.211:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} +``` + +## Conclusion + +Publishing a schema for your API possesses many benefits and is a good practice to adopt for your APIs. diff --git a/guides/posts/api-spec/post.md b/guides/posts/api-spec/post.md new file mode 100644 index 00000000..cb6ab254 --- /dev/null +++ b/guides/posts/api-spec/post.md @@ -0,0 +1,50 @@ +--- +title: What is an API spec? +description: There are a lot of APIs out there, each with different specifications. The developers define these specifications when building an API. Let's take a look at four differnet types of API specs in this piece. +publishedDate: 2021-10-13T11:27:45.681Z +lastModifiedDate: 2021-10-13T11:27:45.681Z +authors: + - saad +categories: + - api +tags: + - api + - specs +coverImage: '' +--- + + + There are a lot of APIs out there, each with different specifications. The + developers define these specifications when building an API to set some + standards right from the start. Let’s take a look at some of these + specifications. + + +## API Specs + +It is used to standardize data exchange between web services. Standardize means the ability of diverse systems, written in different programming languages, to run on different operating systems, or use various technologies to communicate. + +The API specification provides a comprehensive understanding of how an API behaves and links with other APIs. It also explains how the API functions and the results to expect when using the API. + +There are four types of API specifications: + +- Representational State Transfer (REST) +- Simple Object Access Protocol (SOAP) +- GraphQL +- Remote Procedure Call (RPC) + +## REST + +REST API is one of the most common specifications of API. REST APIs allow you to perform CRUD (create, read, update, and delete) operations between a client and a server. It connects your backend with your frontend so they can communicate with each other. + +## SOAP + +SOAP API is another type of web service that allows communication between client and server. Any web service that complies with the SOAP web services specification is a SOAP web service. The W3C (World Wide Web Consortium) is behind these specifications. + +## GraphQL + +The GraphQL API is designed to provide you with the precise amount of data you request. With the REST API, you often encounter the problem of over-fetching and under-fetching, and GraphQL solves these problems. + +## RPC + +It is a simple interaction where a local client sends commands to a remote server. Both client and server use different call parameters, and these parameters are converted on both sides. These conversions happen through stubs that are dedicated pieces of code responsible for transforming and deconverting the call function parameters. diff --git a/guides/posts/api-testing/post.md b/guides/posts/api-testing/post.md new file mode 100644 index 00000000..99c6a2bf --- /dev/null +++ b/guides/posts/api-testing/post.md @@ -0,0 +1,48 @@ +--- +title: 'What is API Testing?' +description: API Testing helps your APIs to become more secure. Let's take a look at why you should test your APIs and some of its benefits. +publishedDate: 2021-10-05T15:41:15.688Z +lastModifiedDate: 2021-10-05T15:41:15.688Z +authors: + - saad +categories: + - api +tags: + - testing +coverImage: '' +--- + + + We are using APIs to build applications. An app is usually divided into + three layers: presentation, service, and data layer. The service layer or + the API acts as a bridge between the other two layers to communicate. It is + therefore imperative to test this layer to make sure everything is working + correctly. + + +## API Testing + +Just like you test your UI to make sure a button is working, you also test your APIs. This testing is done to ensure that each endpoint is working as it should. This not only helps with improving the performance of the API but also makes it more secure. + +There are a few ways to test an API. Here are some: + +- Using a GUI tool like [RapidAPI Client](https://RapidAPI.com/products/api-design/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) to test different endpoints. +- Using Curl for testing. +- Writing tests yourself. + +## Why You Should Test Your APIs + +Testing your APIs timely helps to ensure your app is up all the time. There are a few reasons that make this testing extremely important. + +You can detect a lot of security or performance issues. You can also check if the response data is structured correctly or not. API testing can also reveal unused flags, irregular errors, incorrect handling of argument values, etc. + +At this stage, you can also identify whether there is any difficulty in connecting with the API or getting a valid response through it. + +## Benefits of API Testing + +There are several benefits associated with API testing. Here is a list of some of them: + +- API testing is faster than UI testing since they involve running only commands. So this means you will find more bugs in less time. +- When API tests fail, you know precisely where the issue lies that crashed the system. +- API tests are language-independent since data is exchanged via XML or JSON. So you can write them in any of your preferred languages. +- API testing also helps you to release faster. diff --git a/guides/posts/api-vulnerabilities/post.md b/guides/posts/api-vulnerabilities/post.md new file mode 100644 index 00000000..bdced54b --- /dev/null +++ b/guides/posts/api-vulnerabilities/post.md @@ -0,0 +1,39 @@ +--- +title: Introduction To API Security Vulnerabilities +description: There are many different vulnerabilities that you need to take care of while developing an API. In this piece, let's take a look at some of them. +publishedDate: 2021-10-11T20:53:04.094Z +lastModifiedDate: 2021-10-11T20:53:04.094Z +authors: + - saad +categories: + - api +tags: + - api + - vulnerabilities +coverImage: '' +--- + + + Everyone is using APIs to build large-scale applications. APIs are made + scalable so they can grow as an application grows. You also need to ensure + that your APIs are secure; otherwise, anyone can unethically access its + data. + + +There are many different vulnerabilities that you need to take care of while developing an API. Let’s take a look at some of them. + +## Man-in-the-Middle + +It is a type of cyber attack where someone is intercepting the communication between two parties. It can be client and server communication or client to client communication using APIs. This can be a high-security vulnerability, especially if you are exchanging sensitive data over communication. + +To prevent this, you need to ensure that your communication is encrypted. You can achieve this by adding an SSL certificate to encrypt your API communication. + +## Committing API Key Publicly + +When building an application, you often use a platform where you put your code for collaboration. This can be [GitHub](https://github.com/), [GitLab](https://about.gitlab.com/), [BitBucket](https://bitbucket.org/product/), etc. If your application source code is public and you are using some API to fetch some resources, you need to make sure you do not commit your API key along with the source code. + +It would be best if you use environment variables for this. For this, create a `.env.local` file in the root of your project and put your API key there and then access the environment variable in your code to get the API key. + +## Distributed Denial of Services (DDoS) + +If your API does not have a rate-limiting feature implemented, then it is vulnerable to DDoS attacks. A DDoS attack is a malicious attempt to disrupt regular traffic of a target server, service, or network by overwhelming the target with a flood of internet traffic. The rate-limiting, if implemented, will stop serving the user data after a particular limit has been reached. diff --git a/guides/posts/api/post.md b/guides/posts/api/post.md new file mode 100644 index 00000000..de1b6719 --- /dev/null +++ b/guides/posts/api/post.md @@ -0,0 +1,49 @@ +--- +title: Introduction to APIs +description: APIs are used to communicate between two architectures in order to perform CRUD operations. Let's take a deeper look at it. In this piece, let's take a look at APIs and some of its types. +publishedDate: 2021-10-06T16:28:30.765Z +lastModifiedDate: 2021-10-06T16:28:30.765Z +authors: + - saad +categories: + - api +tags: + - api +coverImage: '' +--- + + + In a web application, the server and the client codebase are autonomous. But + the client needs to communicate with the server to work correctly. But how + does this communication work? It is done through APIs, and there are many + other instances where APIs come into action. + + +## What is an API? + +The Application Programming Interface (API) is like a middle man, connecting two sides; a waiter takes your order and brings you food. It is a channel that applications utilize to talk with each other. You put some information at one end, the API takes that information and gets back with a result. + +Many different types of APIs exist. You can use them to build web, desktop, mobile applications, CLI tools, extensions, and much more. + +Here are different types of APIs that are available to use: + +- REST API +- GraphQL API +- Web API +- Browser API + +## REST API + +This is the most common type of API, and many people often confuse the term API with the REST API. REST APIs allow you to perform CRUD (create, read, update, and delete) operations between a client and a server. It connects your backend with your frontend so they can communicate with each other. + +## GraphQL API + +With GraphQL, you get precisely the data you request. No more, no else. You have a single entry point, i.e., /graphql, that you use to get the data. This fixes the issues of under-fetching and over-fetching and thus consumes low bandwidth. + +## Web API + +When you are building a website, there are many Web APIs available that you can use. The fetch API allows you to get data from a server. The DOM API lets you manipulate the DOM elements. Both of these are web APIs. + +## Browser API + +This API exists to let you communicate with browsers. It is often used to build browser extensions. It provides different functions that you use to perform specific actions. For instance, if you are developing an extension that zooms into the page, you may use the `setZoom` function of the browser API to manipulate the zoom settings. diff --git a/guides/posts/application-programming-interface/post.md b/guides/posts/application-programming-interface/post.md new file mode 100644 index 00000000..2b88c289 --- /dev/null +++ b/guides/posts/application-programming-interface/post.md @@ -0,0 +1,47 @@ +--- +title: 'Application Programming Interface' +description: 'Let’s see what is an API and how APIs can make your life as a Developer easier.' +authors: + - pratham +categories: + - api +tags: + - api +publishedDate: 2021-10-13T08:00:00+08:00 +lastModifiedDate: 2021-10-13T08:00:00+08:00 +--- + + + API is the acronym for Application Programming Interface. API is a set of + definitions and protocols that allow technology products and services to + communicate with each other via the internet. APIs are how apps talk to each + other. + + +API is a set of definitions and protocols that allow technology products and services to communicate with each other via the internet. APIs are how apps talk to each other. + +Imagine you are building an app like Uber, and when a user signs up, you want to check if their email is valid. + +**How would you do that?** + +There's pretty complicated logic that goes into validating an email address: + +You'd check the format of string (does it have an @ sign?), you would ping the domain to make sure it runs an email server, and check a couple of blocklists to make sure it's not a delisted address. + +Do you think you have time to build and maintain an email validation service like that? Especially, when it’s just you or with a small team. Wouldn’t you rather spend time improving your business than spending time on trivial things like this? + +Instead, you could use an API - a 3rd party service that already implements the email validation logic, maintains it, and improves it as it’s their business to do so. You can rely on a 3rd party API to validate your users’ email IDs. + +Hence we can say that APIs help developers in 4 key ways: + +1. APIs increase the development speed + By leveraging APIs — developers spend less time implementing trivial features and get more time to focus on their essential business. Execution speed matters. + +2. APIs reduce the overall software cost + When you need to implement and maintain less code (relying on APIs), your development cost goes down. It’s a classic Build vs Buy argument. + +3. APIs can increase the quality of the software + Using a good API can make your software better. Each API component is developed by a business primarily focused on making it the best possible solution rather than one team that has to be good at many things. + +4. APIs yield new possibilities + With APIs, developers can now integrate with data sets and implement features like AI and Machine Learning that they wouldn't have been able to use before, creating new business opportunities. diff --git a/guides/posts/async-api/post.md b/guides/posts/async-api/post.md new file mode 100644 index 00000000..cac079d8 --- /dev/null +++ b/guides/posts/async-api/post.md @@ -0,0 +1,55 @@ +--- +title: Introduction to Async APIs +description: AsyncAPI is an open-source project aimed at improving the current state of EDA. Let's take a brief look at it in this piece. +publishedDate: 2021-11-11T15:59:08.034Z +lastModifiedDate: 2021-11-11T15:59:08.034Z +authors: + - saad +categories: + - api +tags: + - async-api +coverImage: '' +--- + + + +APIs let you perform complex business operations by working with both the client and the server. If a human conducts these operations, it will take a lot of time, and also, there will be a considerable margin for error. So you must design your APIs as efficiently as possible because your company’s success may depend on how effectively you have implemented the communication. + + + +There are two kinds of APIs: Synchronous and Asynchronous. Let’s take a look at the latter one. + +## AsyncAPI + +Before we talk about AsyncAPI, let’s briefly mention Event-Driven Architecture (EDA). The EDA is a software architecture paradigm involving production, detection, consumption, and reaction to events. + +AsyncAPI is an open-source project aimed at improving the current state of EDA. These APIs allow relatively time-consuming requests to be processed in the background while other requests are made. + +Like the OpenAPI specification, AsyncAPI also provides a specification that allows developers, architects, and product managers to define asynchronous API interfaces. The recently released AsyncAPI specification 2.1.0 laid the foundation for EDA's more significant and better tool ecosystem. + +## AsyncAPI Document + +Like OpenAPI, AsyncAPI also uses a document that contains standardized definitions of channels, subscribers, messages, and payloads. The document file is either a YAML or JSON file. + +The payload may include data types, minimum, maximum values, and regexp. + +## Benefits of Using AsyncAPI + +Let’s take a look at some of the advantages of using AsyncAPI over synchronous APIs. + +### Ready-to-use Tools + +AsyncAPI also provides ready-to-use tools to help with the practical implementation of the AsyncAPI standard. Code and documentation generation tools for the most popular platforms make it easier for developers to implement standards in their APIs. + +### Message Format + +Since there is a specification written for the AsyncAPI, there is also a well-defined structure for exchanged messages. The message format needs to be generic so all the participants involved in the communication can understand. AsyncAPI supports multiple schemas like JSON, etc. + +### Improved Quality of Service for API Consumers + +AsyncAPI can generate API documentation with the AsyncAPI document using YAML or JSON. It helps the API consumers to understand how to use your API. + +### Multiple Protocols + +There are different protocols for exchanging data between other APIs. For instance, there are WebSockets, [Kafka](https://rapidapi.com/guides/apache-kafka?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel), etc. But the AsyncAPI standard is expected to be applicable no matter the protocol. diff --git a/guides/posts/authenticate-authorize-graphql/post.md b/guides/posts/authenticate-authorize-graphql/post.md new file mode 100644 index 00000000..8b671298 --- /dev/null +++ b/guides/posts/authenticate-authorize-graphql/post.md @@ -0,0 +1,66 @@ +--- +title: How to authenticate and authorize with GraphQL? +description: You can use REST APIs, GraphQL API, and gRPC to communicate between client and server. These communications also involve user authentications and authorization. Let's take a look at GraphQL authentication and authorization in this piece. +publishedDate: 2021-10-21T16:18:42.178Z +lastModifiedDate: 2021-10-21T16:18:42.178Z +authors: + - saad +categories: + - api +tags: + - authenticate + - authorize + - graphql +coverImage: '' +--- + + + +There are different types of API architecture available. You can use REST APIs, [GraphQL API](https://graphql.org/), and [gRPC](https://grpc.io/) to communicate between client and server. These communications also involve user authentications and authorization. + + + +Let’s take a look at [GraphQL](https://graphql.org/) and how you can authenticate and authorize users using it. + +## What is GraphQL? + +It is a query language that allows you to read and mutate the data in APIs. With [GraphQL](https://graphql.org/), you can quickly solve the problems of under-fetching and over-fetching. You get precisely the data that you request. No more, no else. You have a single entry point, i.e., /graphql, that you use to get the data. + +## GraphQL Authentication + +There are different ways you can authenticate a user in GraphQL. You can use the HTTP header to pass the authentication credentials to the server or utilize JSON Web Token. + +You can use [ApolloServer](https://www.apollographql.com/) for setting up GraphQL. The code below extracts the user token from the Authorization header included in each operation request. The server then processes the token and retrieves the appropriate user object for that token. Finally, it adds this object to the `context` object that is passed to every executed resolver. + +Once everything is done, each resolver can use this object to determine what data the user can access and what the user can request. + +```js +const {ApolloServer} = require('apollo-server'); + +const server = new ApolloServer({ + typeDefs, + resolvers, + context: ({req}) => { + // Get the user token from the headers. + const token = req.headers.authorization || ''; + + // Try to retrieve a user with the token + const user = getUser(token); + + // Add the user to the context + return {user}; + } +}); + +server.listen().then(({url}) => { + console.log(`Server running at ${url}`); +}); +``` + +## Authorization + +There are different authorization methods that you can use with GraphQL. Here are some of them: + +- **In Resolvers:** The individual field resolvers in GraphQL servers check the user role and then make decisions if the user is authorized or not. +- **With Data Models:** You can use the data models to put the authorization logic in one place and then use it in different areas. +- **With Custom Directives:** You can use the GraphQL schema directive to implement authorization. diff --git a/guides/posts/authentication-authorization/post.md b/guides/posts/authentication-authorization/post.md new file mode 100644 index 00000000..5d83f44a --- /dev/null +++ b/guides/posts/authentication-authorization/post.md @@ -0,0 +1,37 @@ +--- +title: Introduction to Authentication and Authorization +description: Authentication and authorization are two different features that often play a crucial role in your application’s security, and you implement them using APIs. Let's take a look at how both are different from each other. +publishedDate: 2021-10-27T17:46:45.950Z +lastModifiedDate: 2021-10-27T17:46:45.950Z +authors: + - saad +categories: + - api +tags: + - authentication + - authorization +coverImage: '' +--- + + + There are different kinds of APIs that you can use for client-server + communication. There are REST APIs, GraphQL APIs, gRPC, SOAP APIs. Each of + these provides various options, and you can implement all kinds of features + for your app using them. + + +Authentication and authorization are two different features that often play a crucial role in your application’s security, and you implement them using APIs. Let’s take a look at them. + +## Authentication + +Validating the user to identify if they are who they claim to be is called authentication. There are different ways you can implement authentication in your applications. For instance, you can implement sign-up functionality for new users. If a user comes back to your application, they would have to sign in again using their email and password. + +You can also set a one-time password to authenticate a user for only a single session or transaction. Another way is using biometric authentication, where the user presents their fingerprint or retina scan to gain access to your application. + +For additional security, you can also add a two-factor authentication layer to your system where the user has to provide the code sent to their mobile or email after giving the username or password. + +## Authorization + +Authorization always comes after authentication. It is the process of permitting users to access different resources from the server, and it’s not visible and changeable by the user. Authorization works through settings that are implemented and maintained by the organization. + +An application may be designed for different kinds of users. For instance, an e-commerce website may have an admin dashboard for shopkeepers to add their products to the website. A customer looking at the website will not have access to this dashboard and have a separate dashboard entirely different from the shopkeeper’s one, and the shopkeeper will not have access to this dashboard. diff --git a/guides/posts/authentication-rest-api/post.md b/guides/posts/authentication-rest-api/post.md new file mode 100644 index 00000000..7e65e18b --- /dev/null +++ b/guides/posts/authentication-rest-api/post.md @@ -0,0 +1,53 @@ +--- +title: Different Authentication Methods in REST API +description: You often need to add a user authentication system as a feature in your app, and REST API also acts as a bridge for this. Let's take a look at different REST API authentication methods. +publishedDate: 2021-10-20T17:13:16.859Z +lastModifiedDate: 2021-10-20T17:13:16.859Z +authors: + - saad +categories: + - api +tags: + - authentication + - rest +coverImage: '' +--- + + + Your application’s client and server need to communicate with each other. + This communication highly relies on REST APIs. You often need to add a user + authentication system as a feature in your app, and REST API also acts as a + bridge for this. + + +## Authentication Methods + +There are many authentication methods that you can use with your REST APIs. Let’s discuss the three most common methods among the lot. + +### HTTP Authentication Schemes + +There are various HTTP security schemes that you can use with your REST APIs for authentication. For instance: + +- **Basic:** With this, the sender places the username and password in the request header. Both the username and password are encrypted with Base64. The server decrypts the data and sends back a response of whether the user is authenticated or not. +- **Bearer:** An HTTP authentication scheme where the server generates a token and provides it to the client. The client then has to send this token in the Authorization header when making requests to protected resources. +- **Digest:** This type of authentication does not need a password to be transmitted. The client takes the username and password and uses the MD5 hashing algorithm to create a hash that is then sent to the SQL server. +- **OAuth:** It is an authorization protocol that provides applications the ability to secure designated access. + +### API Keys + +Another authentication method widely used with REST APIs is API keys. It provides first-time users with a unique generated key. When the user tries to access the requested resources, they use their API key. The API key tells the server this is the same user as before. + + + API keys must not be sent to the server as query parameters. Instead, they + should be sent in the Authorization header using REST APIs. + + +### OAuth 2.0 + +OAuth 2.0 (Open Authorization) is a standard developed to allow a user access to resources from a third-party application. It is an authorization protocol designed only to grant access to resources, and it works by using access tokens. + +The access token is information that provides authorization to access resources on behalf of the user. Usually, the JSON Web Token (JWT) format is used for the access token. + + + They also may have an expiration date because of security reasons. + diff --git a/guides/posts/aysnc-vs-sync-apis/post.md b/guides/posts/aysnc-vs-sync-apis/post.md new file mode 100644 index 00000000..0999f8a3 --- /dev/null +++ b/guides/posts/aysnc-vs-sync-apis/post.md @@ -0,0 +1,59 @@ +--- +title: Asynchronous vs Synchronous APIs +description: Asynchronous APIs provide a new solution to data fetching which is different from traditional Synchronous APIs. +publishedDate: 2021-12-24T15:59:08.034Z +lastModifiedDate: 2021-12-24T15:59:08.034Z +authors: + - 'ahmad-bilal' +categories: + - api +tags: + - async-api + - sync-api +coverImage: '' +--- + + + +APIs let you perform complex business operations by working with the client and the server. +They help applications communicate with services on the backend servers. Different communication mechanisms are used for this purpose, broadly classified into asynchronous and synchronous. + + + +So, there are two kinds of APIs: Asynchronous and Synchronous. Let’s take a look at them. + +## Synchronous APIs + +They use traditional protocols such as REST, SOAP, etc. These APIs handle requests synchronously, and users have to wait for the response from the API before they can continue in the application. They can not process two requests at the same time. Therefore, they can bottleneck performance if a request takes too long. + +## Asynchronous APIs + +Asynchronous APIs can process multiple requests at the same time. Due to this mechanism, the APIs allow relatively time-consuming requests to be processed in the background while more minor requests are serviced right away. + +In JavaScript, if you add an `async` keyword to a script, JavaScript processes it in the background without stopping the execution of the following scripts. These APIs work in a similar fashion. + +These APIs are implemented using different protocols like WebHooks, Websockets, GraphQL Subscriptions, and Server-Sent Events. Like the OpenAPI specification, **AsyncAPI** provides a specification for Asynchronous APIs that allows developers, architects, and product managers to define asynchronous API interfaces. + +## Advantages of Asynchronous APIs + +Let’s look at some of the advantages of using Asynchronous APIs over Synchronous ones. + +### Multiple Responses + +Asynchronous APIs can send more than one response for a single request. This design enables them to provide a stream of events to the user end instead of sending data periodically. This is why they are also called event-driven APIs. + +### Performance at Scale + +These APIs ensure a smooth flow of requests by allowing multiple requests to process simultaneously. They can shift a resource-intensive request to a separate thread that is processed in the background and does not bottleneck other requests. + +### Efficiency + +Async APIs are more efficient in terms of bandwidth usage because they utilize remote back communication channels between client and server, avoiding additional requests. + +## Drawbacks of Asynchronous APIs + +Since the concept of Asynchronous APIs is inherently different from traditional alternatives like REST, the management and design of these APIs can be complex. They require other mechanisms to implement rate limiting, analytics, and throttling. Securing these APIs can also be a challenge because of their dedicated backchannel communication. + +## Conclusion + +Asynchronous APIs provide a reliable way of communication, particularly when complex computations, multiple processes, and scalable performance are required. diff --git a/guides/posts/background-fetch-api/post.md b/guides/posts/background-fetch-api/post.md new file mode 100644 index 00000000..61b95b9f --- /dev/null +++ b/guides/posts/background-fetch-api/post.md @@ -0,0 +1,58 @@ +--- +title: What is Background Fetch API? +description: The background fetch API lets you communicate with the browser to perform some fetches in the background even if the user closes the tab. In this piece, lets briefly look at it. +publishedDate: 2022-01-17T04:02:09.132Z +lastModifiedDate: 2022-01-17T04:02:09.132Z +authors: + - saad +categories: + - webApis + - api +tags: + - background-fetch-api + - background-fetch + - api +coverImage: '' +--- + + + +Fetching data from the internet via an API is simple. You need a REST endpoint, a web API like `fetch`, and that’s it. But sometimes, you need to fetch something in the background when the user is not on your website. This use case happens when the user downloads a large file from your website. It can be a movie, software, anything. + + + +A web API called background fetch API exists that takes care of it. Let’s take a look at it. + +## Background Fetch API + +The background fetch API lets you communicate with the browser to perform some fetches in the background even if the user closes the tab. The download will not fail if the user loses connectivity. Instead, the browser will pause it, and as soon as the user is live again, the download will resume. + +Sometimes the browser terminates tasks happening in the background to save battery. This results in the download becoming unsuccessful. The background fetch API handles this efficiently by ensuring the connection stays active until the download completes if there is a problem with the connection, the download pause. + +## Using The API + +The first thing you need to ensure is to check if the browser supports this API. You can do this using the following piece of code: + +```js +if ('BackgroundFetchManager' in self) { + // This browser supports Background Fetch API +} +``` + +This API relies on the service worker, so make sure you have registered one in your web application. Since it is fetching some resources, It needs to be asynchronous. + +```js +navigator.serviceWorker.ready.then(async (swReg) => { + const bgFetch = await swReg.backgroundFetch.fetch('fetch-this, ['/podcast.mp3', 'podcast-poster.jpg'], { + title: ‘What is DevRel and why it is awesome?.', + icons: [{ + sizes: '300x300', + src: '/podcast-icon.png', + type: 'image/png', + }], + downloadTotal: 40 * 1024 * 1024, + }); +}); +``` + +The `downloadTotal` is optional. Here you tell the total size of the response bodies after being un-gzipped. diff --git a/guides/posts/beacon-api/post.md b/guides/posts/beacon-api/post.md new file mode 100644 index 00000000..d391bd95 --- /dev/null +++ b/guides/posts/beacon-api/post.md @@ -0,0 +1,45 @@ +--- +title: What is Beacon API? +description: Beacon API does not expect a response from the server. It sends data to the server when the site is unloading from the browser. Let's take a deeper look into the Beacon API in this piece. +publishedDate: 2022-01-10T10:25:51.945Z +lastModifiedDate: 2022-01-10T10:25:51.945Z +authors: + - saad +categories: + - webApis + - api +tags: + - beacon-api + - api +coverImage: '' +--- + + + +An API performs all kinds of tasks, from fetching data from a server to giving you access to the browser functionalities. Often, most of our use cases can be quickly implemented quickly if there is an API available. + + + +Among all web APIs, one can be used to get analytics of your site from the user’s computer. Let’s take a look at it. + +## Beacon API + +This API does not expect a response from the server. It sends data to the server when the site is unloading from the browser. It is asynchronous and sends a non-blocking request to the server. The primary use case for this API is sending all the analytical data like how the site performed on the client’s computer, the session data, all the errors client faced, etc. + +Since it is requesting a server, it uses the POST HTTP method. The request is scheduled and guaranteed to be executed before the page unloads. + +Before Beacon API, this use case was implemented using the XMLHttpRequest, but it was not certain that a request would be made before the page unloads. + +## Use Beacon API + +Beacon API can be accessed via the `Navigator` JavaScript object as it provides you with a single method, i.e., `sendBeacon`. This method takes two arguments. The first one is the URL of the server, and the second is the analytic data you want to send. + +You can send any kind of data. It can be an object, [DOMString](https://developer.mozilla.org/en-US/docs/Web/API/DOMString), [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData), [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob), etc. + +```js +navigator.sendBeacon(`https://example.com/server`, {}); +``` + +The data argument is optional. If the browser has successfully queued the delivery request, the method will return true; otherwise, it will return false. + +Beacon API is supported across almost all major web browsers except Opera Mini. diff --git a/guides/posts/broadcast-channel-api/post.md b/guides/posts/broadcast-channel-api/post.md new file mode 100644 index 00000000..f5fa1f2a --- /dev/null +++ b/guides/posts/broadcast-channel-api/post.md @@ -0,0 +1,60 @@ +--- +title: What is Broadcast Channel API and why you should care about it? +description: You use this API when you need to communicate across tabs/windows of the same origin. Let's take a look at what it is, how you can use it and why you should care about it. +publishedDate: 2022-01-21T11:59:13.377Z +lastModifiedDate: 2022-01-21T11:59:13.377Z +authors: + - saad +categories: + - webApis + - api +tags: + - broadcast-channel-api + - broadcast-channel + - api +coverImage: '' +draft: false +--- + + + +The developers often need to consume different web APIs to integrate different functionalities in their applications. For instance, web storage API gives them access to the browser’s local storage; the fetch API can call REST APIs. Similarly, if your application needs to communicate across tabs of the same origin, you can use the Broadcast Channel API for it. + + + +## Broadcast Channel API + +I mentioned earlier that you could communicate using Broadcast Channel API between tabs, windows, and frames of the same origin. The same-origin means that the same website is opened across different tabs. In more technical terms, the site has the same schema, host, and port. + +To use this API, you create a [BroadcastChannel](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel) object, and then you post a message. The receiver will create another BroadcastChannel with the same name. This way, a connection between the sender and receiver will be established to communicate with the other. + +Let’s take a look a how you can create a broadcast channel. + +```js +// broadcast channel created +const channel = new BroadcastChannel('rapidapi_channel'); + +// message posted on the channel +channel.postMessage("RapidAPI Hub is world's largest API Hub"); + +/** + * + * + * @param {e} - braodcast channel event + */ +const handleMsg = e => { + console.log(e); +}; + +// receiving the posted message +channel.onmessage = handleMsg; + +// closing a channel +channel.close(); +``` + +## What does this API exist? + +There are multiple use cases for this API. One of the most common is authentication. Consider that you own a trading web platform and a user, let’s call him Jack, has opened multiple of its links in separate tabs after signing in. Now Jack needs to leave, and he logs out from your platform in one of the tabs. He then leaves his computer without locking it. + +If you have not implemented some communication between each tab of the same origin, anyone can use Jack’s computer and make a trade. This is a security vulnerability and can lead to severe consequences. And this is where the Broadcast Channel API comes to save the day. diff --git a/guides/posts/browser-api/post.md b/guides/posts/browser-api/post.md new file mode 100644 index 00000000..14df6ce8 --- /dev/null +++ b/guides/posts/browser-api/post.md @@ -0,0 +1,39 @@ +--- +title: Introduction to Browser API +description: Browser APIs are used to build browser extensions and other web applications that utilize the functionalities of a web browser. In this piece, you are going to have a brief introduction about browser API and some of its types. +publishedDate: 2021-11-03T16:27:05.876Z +lastModifiedDate: 2021-11-03T16:27:05.876Z +authors: + - saad +categories: + - webApis +tags: + - browser-api +coverImage: '' +--- + + + +APIs are used for communication between two separate entities. These entities can be a server, a browser, DOM, or anything that provides functionalities used by other applications. If you are developing a mobile application, you will have to use the Android API to use the mobile’s camera, microphone in your application. + + + +Let’s take a look at the Browser API and how you can use it. + +## What is the Browser API? + +Browser APIs or Web APIs are used to build browser extensions and other web applications that utilize the functionalities of a web browser. They are built right into your web browser to provide browser data and its surrounding environment to perform complex things with it. They allow developers to perform complex operations without dealing with sophisticated lower-level code. + +Let’s take a look at some of the most common Browser APIs. + +### Fetch API + +It is a Browser API that uses promises to make network requests over the HTTP/1.1 protocol. You can make both exact or cross-origin requests using the Fetch API. This API takes at least one argument, i.e., the path of the resource you are interested in fetching. When the response is received, it is converted to JSON. + +### Fullscreen API + +You can use the Fullscreen API to remove everything in your browser except the website body. You can also set a particular element to go fullscreen using the `requestFullscreen` method. There are multiple use cases associated with it. For instance, while shopping on an e-commerce website, you need to look at the product closely. If you are watching a video, you may want the rest of the browser to temporarily go out of sight to have a better viewing experience. + +## Clipboard API + +This API allows you to access the clipboard of your operating system right from your browser. This is relatively common since often web developers are building features that copy or paste content or some data to the user’s clipboard. diff --git a/guides/posts/build-anime-search-app/images/code-snippet.png b/guides/posts/build-anime-search-app/images/code-snippet.png new file mode 100644 index 00000000..a7ef13bc Binary files /dev/null and b/guides/posts/build-anime-search-app/images/code-snippet.png differ diff --git a/guides/posts/build-anime-search-app/images/cover.png b/guides/posts/build-anime-search-app/images/cover.png new file mode 100644 index 00000000..5615ae5e Binary files /dev/null and b/guides/posts/build-anime-search-app/images/cover.png differ diff --git a/guides/posts/build-anime-search-app/post.md b/guides/posts/build-anime-search-app/post.md new file mode 100644 index 00000000..68692c33 --- /dev/null +++ b/guides/posts/build-anime-search-app/post.md @@ -0,0 +1,376 @@ +--- +title: How to build an Anime Search Application using Jikan API? +description: Everyone these days loves animes and watches them a lot. If you are one of them, you would want to have a platform to search for them quickly. Let's take a look at how you can build such platform from scratch. +publishedDate: 2021-12-06T06:43:23.822Z +lastModifiedDate: 2021-12-06T06:43:23.822Z +authors: + - saad +categories: + - apps +tags: + - rapidapi + - anime-app +coverImage: '' +--- + + + +Everyone these days loves animes and watches them a lot. If you are one of them, you would want to have a platform to search for them quickly. For this, instead of looking for one, we can build our own. + + + +So today, I am developing an anime application where you will search for your favorite animes. So without any further ado, let’s jump in. + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the frontend and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to search for anime. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “anime” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to anime APIs. For this piece, I am using [Jikan API](https://RapidAPI.com/theapiguy/api/jikan1?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) by [API Guy](https://RapidAPI.com/user/theapiguy?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +It is a free API, so you do not need to subscribe to it. However, you will need your RapidAPI key. Go ahead and save the `x-rapidapi-key` so you can use it later. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss anime-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `anime-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/anime-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now create a file called `next.config.js` in the root directory and paste all the content from [here](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/anime-app/next.config.js) to this file. We are doing this because the API will provide us with the image URLs. We will use the Next.js Image component to render the image, and this component needs a domain property in the `next.config.js` file to render an image from a URL. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```js +export default function Home() { + return ( +
+

+ Anime App +

+

+ Search and look for your favorite anime +

+
+ ); +} +``` + +It will create two headings for you with the text “Anime App” and “Search and look for your favorite anime”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create an input field and a search button. The user will be able to type in the input field and use the search button to get the anime details. + +For this, copy the following code and paste it in `pages/index.js`: + +```js +export default function Home() { + return ( +
+

+ Anime App +

+

+ Search and look for your favorite anime +

+
+
+ + +
+
+
+ ); +} +``` + +This code is going to create an input field and button. I have also styled them a little bit using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Let’s create some states to store the user input and the anime information we will receive from the API. For this, copy-paste the following code in `pages/index.js`. + +```js +import {useState} from 'react'; + +export default function Home() { + const [anime, setAnime] = useState(''); + const [searchRes, setSearchRes] = useState(null); + + return ( +
+

+ Anime App +

+

+ Search and look for your favorite anime +

+
+
+ setAnime(e.target.value)} + /> + +
+
+
+ ); +} +``` + +You can see that I have added an `onChange` event handler to set the state value as soon as the user writes something in the input field. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [Jikan API](https://RapidAPI.com/theapiguy/api/jikan1?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +We are using the `Search` endpoint of the [Jikan API](https://RapidAPI.com/theapiguy/api/jikan1?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) to get all anime details. + +RapidAPI Hub provides you with code snippets in different languages for integrating the API. I am going to use the `(JavaScript) Axios` one. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/921e2aafdccb1fecf813bb7e92c5c2f2616c0b5f/guides/posts/build-anime-search-app/images/code-snippet.png) + +Now create a file with the name `anime.js` inside the `pages/api` directory. It is going to create a REST API endpoint for you. The endpoint point will look like this: + +```sh +http://localhost:3000/api/anime +``` + +Now copy the following code in this file: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://jikan1.p.rapidapi.com/search/anime', + params: {q: req.query.anime}, + headers: { + 'x-rapidapi-host': 'jikan1.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +This code makes an API call to the [Jikan API](https://RapidAPI.com/theapiguy/api/jikan1?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) on the server and returns the results to the user. It executes when the user makes an API call to the `anime` endpoint I mentioned above. + +Once you are done, copy the following code in the `pages/index.js` file: + +```js +import {useState} from 'react'; +import Image from 'next/image'; +import Link from 'next/link'; +import axios from 'axios'; + +export default function Home() { + const [anime, setAnime] = useState(''); + const [searchRes, setSearchRes] = useState(null); + + /** + * + * + * Fetch anime details + */ + const fetchAnimeDetails = async e => { + e.preventDefault(); + try { + const res = await axios.get(`/api/anime`, { + params: {anime} + }); + const {data} = res; + const {results} = data; + + results = results.slice(0, 10); + setSearchRes(results); + } catch (err) { + console.log(err); + } + }; + + return ( +
+

+ Anime App +

+

+ Search and look for your favorite anime +

+
+
+ setAnime(e.target.value)} + /> + +
+ {searchRes && + searchRes.map(animeDetail => ( +
+
+ + + {animeDetail.title} + + +
+
+
+

+ Title +

+

+ {animeDetail.title}{' '} +

+
+
+

+ Popularity +

+

+ {animeDetail.score}{' '} +

+
+
+

+ Rated +

+

+ {animeDetail.rated} +

+
+
+

+ Synopsis +

+

+ {animeDetail.synopsis} +

+
+
+
+ ))} +
+
+

+ Made by RapidAPI DevRel Team -{' '} + + See more examples like this + +

+
+
+ ); +} +``` + +You can see that I have created a function, `fetchAnimeDetails`, to request the API. I have also created a piece of UI that is conditionally rendering on the screen based on the `searchRes` state variable’ value. + +## Wrap Up + +That’s it. We have successfully built an [Anime App](https://rapidapi-example-anime-app.vercel.app/) using [Jikan API](https://RapidAPI.com/theapiguy/api/jikan1?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the source code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/anime-app). + +In the end, it will look something like this: + +![Anime Search Application built with Next.js and Jikan API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/921e2aafdccb1fecf813bb7e92c5c2f2616c0b5f/guides/posts/build-anime-search-app/images/cover.png) diff --git a/guides/posts/build-car-data-app/images/code-snippet.png b/guides/posts/build-car-data-app/images/code-snippet.png new file mode 100644 index 00000000..a6832810 Binary files /dev/null and b/guides/posts/build-car-data-app/images/code-snippet.png differ diff --git a/guides/posts/build-car-data-app/images/cover.png b/guides/posts/build-car-data-app/images/cover.png new file mode 100644 index 00000000..d7f4eeb2 Binary files /dev/null and b/guides/posts/build-car-data-app/images/cover.png differ diff --git a/guides/posts/build-car-data-app/images/subscribe.png b/guides/posts/build-car-data-app/images/subscribe.png new file mode 100644 index 00000000..79562d6e Binary files /dev/null and b/guides/posts/build-car-data-app/images/subscribe.png differ diff --git a/guides/posts/build-car-data-app/post.md b/guides/posts/build-car-data-app/post.md new file mode 100644 index 00000000..01343fac --- /dev/null +++ b/guides/posts/build-car-data-app/post.md @@ -0,0 +1,414 @@ +--- +title: How to build a Car Data app using Car Data API? +description: If you were a car enthusiast like me, you would have often found yourself searching for different cars, their make, model, etc. Instead of searching for a particular car, we can build an application to see all the car details. Let's do just this in this piece. +authors: + - saad +categories: + - apps +tags: + - car-data-app + - app +publishedDate: 2022-01-03T09:34:31.065Z +lastModifiedDate: 2022-01-03T09:34:31.065Z +coverImage: '' +--- + + + +If you were a car enthusiast like me, you would have often found yourself searching for different cars, their make, model, etc. Instead of searching for a particular car, we can build an application to see all the car details. + + + +So today, I am building a car data pp that will provide you with different car details depending on their make and model. So without any further ado, let’s jump in! + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the frontend and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to find the data of cars. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “car data apis” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to car data APIs. For this piece, I am using [Car Data API](https://rapidapi.com/principalapis/api/car-data?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on **Subscribe to Test** button. + +![Subscribe to Car Data App](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/6a0d3c1e542809cfb1aee26671f8d9b6c8fe9cac/guides/posts/build-car-data-app/images/subscribe.png) + +Once you click the button, you will be redirected to another page where different available subscription packages will be shown. Let’s go with the free one for now. + +After all this, you will be redirected back to the original page. Here you will have a key `x-rapidapi-key`. Save it. It will be used later in the application. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss car-data-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `car-data-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called - `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/car-data-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```jsx +export default function Home() { + return ( +
+

+ Car Data App +

+

+ Get Different Car Information +

+
+ ); +} +``` + +It will create two headings for you with the text Car Data App” and “Get Different Car Information”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create input fields and a search button. The user will be able to provide the make and model of a car using the input fields and the search button can get them the details. + +For this, copy the following code and paste it in `pages/index.js`: + +```jsx +export default function Home() { + return ( +
+

+ Car Data App +

+

+ Get Different Car Information +

+
+
+ + + +
+
+
+ ); +} +``` + +This code is going to create two input fields and a button. I have also styled them a little bit using [TailwindCSS](https://tailwindcss.com/). + +### → STEP #3 + +Let’s create some states to store the provided data and the car details we will receive from the API. For this, copy-paste the following code in `pages/index.js`. + +```jsx +import {useState} from 'react'; + +export default function Home() { + const [make, setMake] = useState(''); + const [model, setModel] = useState(''); + const [res, setRes] = useState(); + + return ( +
+

+ Car Data App +

+

+ Get Different Car Information +

+
+
+ setMake(e.target.value)} + /> + setModel(e.target.value)} + /> + +
+
+
+ ); +} +``` + +You can see that I have added an `onChange` event handler to set the state value as soon as the user types in the input fields. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [Car Data API](https://rapidapi.com/principalapis/api/car-data?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` in your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +RapidAPI Hub provides you with code snippets in different languages for integrating the API. I am going to use the `(JavaScript) Axios` one. + +![API Endpoints and (JavaScript) Axios Snippet](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/5e204c20a282c42de8cc6939ee7aa62e24049955/guides/posts/build-car-data-app/images/code-snippet.png) + +Now create a file with the name `info.js` inside the `pages/api` directory. It is going to create a REST API endpoint for you. The endpoint point will look like this: + +```sh +http://localhost:3000/api/info +``` + +Now copy the following code in this file: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + const make = req.query.make || ''; + const model = req.query.model || ''; + + const options = { + method: 'GET', + url: 'https://car-data.p.rapidapi.com/cars', + params: { + limit: '50', + page: '0', + make: make, + model: model + }, + headers: { + 'x-rapidapi-host': 'car-data.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +This code makes an API call to the [Car Data API](https://rapidapi.com/principalapis/api/car-data?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) on the server and returns the results to the user. It executes when the user makes an API call to the `info` endpoint I mentioned above. + +Once you are done, copy the following code in the `pages/index.js` file: + +```jsx +import {useState} from 'react'; +import axios from 'axios'; + +export default function Home({data}) { + const [make, setMake] = useState(''); + const [model, setModel] = useState(''); + const [res, setRes] = useState(data); + + /** + * + * + * Fetch car details + */ + const fetchCarDetails = async e => { + e.preventDefault(); + try { + const res = await axios.get(`/api/info`, { + params: { + make, + model + } + }); + setRes(res.data); + } catch (err) { + console.log(err); + } + }; + + return ( +
+

+ Car Data App +

+

+ Get Different Car Information +

+
+
+ setMake(e.target.value)} + /> + setModel(e.target.value)} + /> + +
+ +
+ + + + + + + + + + + {res.map(info => ( + + + + + + + ))} + +
+ Year + + Type + + Make + + Model +
+ + {info.year} + + + + {info.type} + + + + {info.make} + + + + {info.model} + +
+
+
+
+

+ Made by RapidAPI DevRel Team -{' '} + + See more examples like this + +

+
+
+ ); +} + +export async function getServerSideProps() { + const res = await axios.get('http://localhost:3000/api/info'); + const {data} = res; + + if (!data) { + return { + notFound: true + }; + } + + return { + props: { + data + } + }; +} +``` + +I am using the Next.js `getServerSideProps` function to fetch the data from the server. It will make my application server-side, and the user will never see a loading state. You can also use `getStaticProps` instead of `getServerSideProps`, and the application will then fetch the data at build time. + +I have created a `fetchCarDetails` function that makes an API call when the user clicks on the `search` button. + +## Wrap Up + +That’s it. We have successfully built a [Car Data App](https://rapidapi-example-car-data-app.vercel.app/) using [Car Data API](https://rapidapi.com/principalapis/api/car-data?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the source code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/car-data-app). + +In the end, it will look something like this: + +![Car Data App built with Next.js using Car Data API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/5e204c20a282c42de8cc6939ee7aa62e24049955/guides/posts/build-car-data-app/images/cover.png) diff --git a/guides/posts/build-carbon-footprint-app/images/code-snippet.png b/guides/posts/build-carbon-footprint-app/images/code-snippet.png new file mode 100644 index 00000000..18848c44 Binary files /dev/null and b/guides/posts/build-carbon-footprint-app/images/code-snippet.png differ diff --git a/guides/posts/build-carbon-footprint-app/images/final.png b/guides/posts/build-carbon-footprint-app/images/final.png new file mode 100644 index 00000000..e9d92a61 Binary files /dev/null and b/guides/posts/build-carbon-footprint-app/images/final.png differ diff --git a/guides/posts/build-carbon-footprint-app/images/preview.png b/guides/posts/build-carbon-footprint-app/images/preview.png new file mode 100644 index 00000000..18c79a1d Binary files /dev/null and b/guides/posts/build-carbon-footprint-app/images/preview.png differ diff --git a/guides/posts/build-carbon-footprint-app/images/subscribe.png b/guides/posts/build-carbon-footprint-app/images/subscribe.png new file mode 100644 index 00000000..4465b2ee Binary files /dev/null and b/guides/posts/build-carbon-footprint-app/images/subscribe.png differ diff --git a/guides/posts/build-carbon-footprint-app/post.md b/guides/posts/build-carbon-footprint-app/post.md new file mode 100644 index 00000000..e7266fa1 --- /dev/null +++ b/guides/posts/build-carbon-footprint-app/post.md @@ -0,0 +1,582 @@ +--- +title: How to build a Carbon Footprint App using Next.js and the CarbonFootprint API? +description: In this guide, we will build a Carbon Footprint App that will use an API from RapidAPI Hub to calculate the carbon footprint of travel. +publishedDate: 2022-01-12T19:10:30.765Z +lastModifiedDate: 2022-01-12T19:10:30.765Z +authors: + - 'ahmad-bilal' +categories: + - apps +tags: + - rapidapi + - carbon + - footprint + - app +coverImage: '' +--- + + + +Today, public APIs provide a fast and convenient way to develop an application. Whether you're building a small tool-based application or a big eCommerce portal, these APIs can be very serviceable. + + + +[RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) lets you choose from thousands of these public APIs which over 3 million developers are using. You can explore thousands of them on RapidAPI Hub and select the best one for your next project. + +In this guide, we will be building a web application that will allow users to get the Carbon Footprint of their travel. We will use an API to get the Footprint values of user's input. + +## Stack + +The stack for our app is going to be as follows. I am going to use [Next.js](https://nextjs.org/) for the client-side of our app and [TailwindCSS](https://tailwindcss.com/) for styling it. + +Even if you don’t know about Next.js, being familiar with React will be enough for this guide. Tailwind is a CSS framework that provides utility classes to use directly in the markup, saving time during the development process. + +## Choosing The API + +Let’s find the API first. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already. Then, search for "Carbon Footprint" in the search section. + + + Learn more about how to use RapidAPI Hub as a developer. + + +For our app, I will use the [CarbonFootprint API](https://rapidapi.com/carbonandmore-carbonandmore-default/api/carbonfootprint1/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel), which is the most popular one. + +To use this API, you need to subscribe to it first. You can do this by clicking on the **Subscribe to Test** button. + +![Subscribe to CarbonFootprint API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-carbon-footprint-app/images/subscribe.png) + +Once you click the button, you will be redirected to the pricing page, which will show the subscription packages for the API. We are going to subscribe to the free plan for this guide. + +Once subscribed, you will be back on the **Endpoints** page. In the central section, you should see a field named `x-rapidapi-key`. Save its value. We will need it later to call the API. + +## Building The UI + +We can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. + +```sh +npx create-next-app -e with-tailwindcss carbon-footprint-app +``` + +It will take some time to install the packages. After generating the boilerplate, you will see a folder with the name `carbon-footprint-app` has been created. Open this folder in your preferred code editor. + +### Project Files + +In our project folder, we will have the following folders and files. I will briefly break them down for you: + +- `pages` directory: It has the `index.js` file, which is the entry point of our app, basically the home page. It also has`_app.js` and another directory named `api`, where we will store the requests to our API. +- `public` directory: It holds assets. You can place your static files here to load later in the application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +I will be using a particular set of colors for this app. You can use colors of your preference, but if you are interested in mine, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/carbon-footprint-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are Tailwind configurations for the colors and fonts I will be using. + +Our UI should look like this. + +![Initial UI of our App](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-carbon-footprint-app/images/preview.png) + +With all that set, it's time to code the app. Let's jump right into it. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. Let's add the layout. + +```jsx +export default function Home() { + return ( +
+

+ Carbon Footprint +

+

+ Calculate the Carbon Footprint of your travel. +

+
+ ); +} +``` + +I added the following to `pages/_app.js`. + +```jsx +import Head from 'next/head'; +import 'tailwindcss/tailwind.css'; + +function MyApp({Component, pageProps}) { + return ( + <> + + Codestin Search App + + + + + + ); +} + +export default MyApp; +``` + +### → STEP #2 + +As you can see in the UI preview, we require a form that should have a select field for the type of vehicle and an input field for the distance. A search button will follow the form. Let's add all these. + +```jsx +export default function Home() { + + return ( +
+

Carbon Footprint

+

+ Calculate the Carbon Footprint of your travel. +

+
{ + // Press Enter key to submit + e.preventDefault(); + e.stopPropagation(); + }} + > +
+
+ + +
+
+ + +
+
+ +
+
+ + ); +} +``` + +This code will create the input fields, and the submit button. The Select method is pre-filled with possible vehicle types as specified on the [API Endpoint page](https://rapidapi.com/carbonandmore-carbonandmore-default/api/carbonfootprint1/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +I have also styled and made them responsive using [TailwindCSS](<(https://tailwindcss.com/)>). Now, we need to store the user input in the input fields. We can do it using React `useState` hook. We will use three states for our app: + +1. `vehicle` for storing the vehicle type, with `SmallPetrolCar` as the default value. +2. `distance` for storing the distance in km. +3. `response` for storing the API response. + +```jsx +import { useState } from "react"; + +export default function Home() { + const [vehicle, setVehicle] = useState("SmallPetrolCar"); + const [distance, setDistance] = useState(null); + const [response, setResponse] = useState(null); + + return ( +
+

Carbon Footprint

+

+ Calculate the Carbon Footprint of your travel. +

+
{ + e.preventDefault(); + e.stopPropagation(); + }} + > +
+
+ + +
+
+ + setDistance(e.target.value)} + /> +
+
+ +
+
+ + ); +} +``` + +We use the `onChange` handlers on the input fields to store their values(`e.target.value`) in our states. + +### → STEP #3 + +Let’s integrate the API now. For this, first, create a `.env.local` file in the root directory of your project and paste the following into it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +Remember the `x-rapidapi-key` I asked you to save earlier? You need to replace `YOUR-RAPIDAPI-KEY` with its value. You get the key after subscribing to the [CarbonFootprint API](https://rapidapi.com/carbonandmore-carbonandmore-default/api/carbonfootprint1/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +And import `axios` in `pages/index.js`. + +```jsx +import axios from ‘axios’; +``` + +The API provides several usable endpoints which you can use in your app. You can see these endpoints on the left pane in the image below. We will use the `CarbonFootprintFromCarTravel` endpoint, which returns the Carbon Footprint for car travel. + +![API Endpoints and (JavaScript) Axios Snippet](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-carbon-footprint-app/images/code-snippet.png) + +For easy integration, [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) automatically generates snippets in multiple languages and options. We are going to copy the `(JavaScript) Axios` ones, as you can see above. + +Let's set up the API call now. In the `pages/api` directory, create a file named `calculate.js` and use the code snippet as follows: + +```jsx +// In pages/api/calculate.js: +import axios from 'axios'; + +export default function handler(req, res) { + const options = { + method: 'GET', + url: 'https://carbonfootprint1.p.rapidapi.com/CarbonFootprintFromCarTravel', + params: {distance: req.query.distance, vehicle: req.query.vehicle}, + headers: { + 'x-rapidapi-host': 'carbonfootprint1.p.rapidapi.com', + 'x-rapidapi-key': NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); +} +``` + +We have specified the parameters `req.query.distance` and `req.query.vehicle`. `req.query` is an object in Next.js that holds the input parameters coming from our client-side. + +### → STEP #4 + +Now we need to create a function `calculateFootprint` in the `pages/index.js` file to send a request to our API at `http://localhost:3000/api/calculate`. + +The search button will trigger this function, which will make a GET request to our API. Let's make these changes to the index file. + +```jsx +import { useState } from "react"; +import axios from 'axios'; + +export default function Home() { + const [vehicle, setVehicle] = useState("SmallPetrolCar"); + const [distance, setDistance] = useState(null); + const [response, setResponse] = useState(null); + + // Sends the API request te get the footprint. + const calculateFootprint = async () => { + try { + const res = await axios.get("api/calculate/", { + params: { vehicle, distance }, + }); + const { data } = res; + setResponse(data); // Storing response in the response state + } catch (error) { + console.error(error); + } + }; + + return ( +
+

Carbon Footprint

+

+ Calculate the Carbon Footprint of your travel. +

+
{ + calculateFootprint(); // Trigger API call on submit + e.preventDefault(); + e.stopPropagation(); + }} + > +
+
+ + +
+
+ + setDistance(e.target.value)} + /> +
+
+ +
+
+ + ); +} +``` + +We use the `onSubmit` handler of the form to trigger the `calculateFootprint` function on submitting the form through the enter key or submit button. + +### → FINAL STEP + +Finally, it is time to display the response returned by the API. We will show a div if our `response state` is not null. Here is the final code of our app: + +```jsx +import { useState } from "react"; +import axios from 'axios'; + +export default function Home() { + const [vehicle, setVehicle] = useState("SmallPetrolCar"); + const [distance, setDistance] = useState(null); + const [response, setResponse] = useState(null); + + // Sends the API request te get the footprint. + const calculateFootprint = async () => { + try { + const res = await axios.get("api/calculate/", { + params: { vehicle, distance }, + }); + const { data } = res; + setResponse(data); // Storing response in the response state + } catch (error) { + console.error(error); + } + }; + + return ( +
+

Carbon Footprint

+

+ Calculate the Carbon Footprint of your travel. +

+
{ + calculateFootprint(); // Trigger API call on submit + e.preventDefault(); + e.stopPropagation(); + }} + > +
+
+ + +
+
+ + setDistance(e.target.value)} + /> +
+
+ +
+ {response && ( +
+ + The carbon footprint is{" "} + {response.carbonEquivalent} KGs + +
+ )} +
+ + ); +} +``` + +As you can see, our app is working as intended: + +![Next.JS App built using CarbonFootprint API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-carbon-footprint-app/images/final.png) + +## Wrap Up + +All done. You can also check the deployed [Carbon Footprint App](https://rapidapi-example-carbon-footprint-app.vercel.app/) and find its code in the [RapidAPI Examples Repository](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/carbon-footprint-app) on GitHub. diff --git a/guides/posts/build-coordinate-distance-calculator-app/images/code-snippet.png b/guides/posts/build-coordinate-distance-calculator-app/images/code-snippet.png new file mode 100644 index 00000000..c3ac2835 Binary files /dev/null and b/guides/posts/build-coordinate-distance-calculator-app/images/code-snippet.png differ diff --git a/guides/posts/build-coordinate-distance-calculator-app/images/cover.png b/guides/posts/build-coordinate-distance-calculator-app/images/cover.png new file mode 100644 index 00000000..3711af62 Binary files /dev/null and b/guides/posts/build-coordinate-distance-calculator-app/images/cover.png differ diff --git a/guides/posts/build-coordinate-distance-calculator-app/images/subscribe.png b/guides/posts/build-coordinate-distance-calculator-app/images/subscribe.png new file mode 100644 index 00000000..1c065389 Binary files /dev/null and b/guides/posts/build-coordinate-distance-calculator-app/images/subscribe.png differ diff --git a/guides/posts/build-coordinate-distance-calculator-app/post.md b/guides/posts/build-coordinate-distance-calculator-app/post.md new file mode 100644 index 00000000..cfbb2037 --- /dev/null +++ b/guides/posts/build-coordinate-distance-calculator-app/post.md @@ -0,0 +1,353 @@ +--- +title: How to build a Coordinate Distance Calculator App using Distance Calculator API? +description: "In this piece, let's build an app together that will show us the distance between two geographical coordinatesz." +publishedDate: 2022-01-31T07:18:41.708Z +lastModifiedDate: 2022-01-31T07:18:41.708Z +authors: + - saad +categories: + - apps +tags: + - rapidapi + - coordiante-distance-calculate-app +coverImage: '' +--- + + + +There are thousands of APIs available on [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) that you can use to build different applications. Today, I will use one of these APIs to develop a coordinate distance calculator web app. So without any further ado, let’s jump in! + + + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the frontend and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to find the distance between coordinates. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “coordinates distance” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to coordinates distance API. For this piece, I am using [Distance Calculator API](https://RapidAPI.com/ApiOcean/api/distance-calculator?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on **Subscribe to Test** button. + +![Subscribe to Distance Calculator API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/7ef1b6ce2ca6e5796e89b6d18167f8b8ebb70e7e/guides/posts/build-coordinate-distance-calculator-app/images/subscribe.png) + +Once you click the button, you will be redirected to another page where different available subscription packages will be shown. Let’s go with the free one for now. + +After all this, you will be redirected back to the original page. Here you will have a key `x-rapidapi-key`. Save it. It will be used later in the application. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss coordinate-distance-calculator-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `coordinate-distance-calculator-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called - `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/coordinate-distance-calculator-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along: + +```jsx +export default function Home() { + return ( +
+

+ Coordinate Distance{' '} + Calculator App +

+

+ Calculate the distance between two coordinates +

+
+ ); +} +``` + +It will create two headings for you with the text “Coordinate Distance Calculator App” and “Calculate the distance between two coordinates”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create two input fields and a calculate button. The user will be able to type the two coordinate sets in the input boxes and use the calculate button to get the distance between the coordinates. + +For this, copy the following code and paste it in `pages/index.js`: + +```jsx +export default function Home() { + return ( +
+

+ Coordinate Distance{' '} + Calculator App +

+

+ Calculate the distance between two coordinates +

+
+
+ + + +
+
+
+ ); +} +``` + +This code is going to create two input fields and a button. I have also styled them a little bit using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Let’s create some states to store the coordinate sets and the distance between coordinates that we will receive from the API. For this, copy-paste the following code in `pages/index.js`: + +```jsx +import {useState} from 'react'; + +export default function Home() { + const [firstCoordinateSet, setFirstCoordinateSet] = useState(''); + const [secondCoordinateSet, setSecondCoordinateSet] = useState(''); + const [res, setRes] = useState(''); + + return ( +
+

+ Coordinate Distance{' '} + Calculator App +

+

+ Calculate the distance between two coordinates +

+
+
+ setFirstCoordinateSet(e.target.value)} + /> + setSecondCoordinateSet(e.target.value)} + /> + +
+
+
+ ); +} +``` + +You can see that I have added an `onChange` event handler to set the state value as soon as the user types something in the input box. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [Distance Calculator API](https://RapidAPI.com/ApiOcean/api/distance-calculator?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` in your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +RapidAPI Hub provides you with code snippets in different languages for integrating the API. I am going to use the `(JavaScript) Axios` one. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/7ef1b6ce2ca6e5796e89b6d18167f8b8ebb70e7e/guides/posts/build-coordinate-distance-calculator-app/images/code-snippet.png) + +Now create a file with the name `calculate.js` inside the `pages/api` directory. It is going to create a REST API endpoint for you. The endpoint point will look like this: + +```sh +http://localhost:3000/api/calculate +``` + +Now copy the following code in this file: + +```js +import axios from 'axios'; + +export default function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://distance-calculator.p.rapidapi.com/v1/one_to_one', + params: { + start_point: req.query.firstCoordinateSet, + end_point: req.query.secondCoordinateSet, + unit: 'miles', + decimal_places: '2' + }, + headers: { + 'content-type': 'application/json', + 'x-rapidapi-host': 'distance-calculator.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +This code makes an API call to the [Distance Calculator API](https://RapidAPI.com/ApiOcean/api/distance-calculator?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) on the server and returns the results to the user. It executes when the user makes an API call to the `calculate` endpoint I mentioned above. + +Once you are done, copy the following code in the `pages/index.js` file: + +```jsx +import {useState} from 'react'; +import axios from 'axios'; + +export default function Home() { + const [firstCoordinateSet, setFirstCoordinateSet] = useState(''); + const [secondCoordinateSet, setSecondCoordinateSet] = useState(''); + const [res, setRes] = useState(''); + const [btnText, setBtnText] = useState('Calculate'); + + /** + * + * + * + */ + const fetchCoordinatesDistance = async e => { + e.preventDefault(); + + try { + setBtnText('Calculating...'); + const res = await axios.get(`/api/calculator`, { + params: { + firstCoordinateSet, + secondCoordinateSet + } + }); + setRes(res.data); + } catch (err) { + console.log(err); + } + setBtnText('Calculate'); + }; + + return ( +
+

+ Coordinate Distance{' '} + Calculator App +

+

+ Calculate the distance between two coordinates +

+
+
+ setFirstCoordinateSet(e.target.value)} + /> + setSecondCoordinateSet(e.target.value)} + /> + +
+ {res && ( +
+

+ The total distance between these two coordinates is{' '} + {res.distance} Miles +

+
+ )} +
+
+

+ Made by RapidAPI DevRel Team -{' '} + + See more examples like this + +

+
+
+ ); +} +``` + +You can see that I have created a function, `fetchCoordinatesDistance`, to request the API. I have also created a UI that is conditionally rendering on the screen based on the `res` state variable value. + +## Wrap Up + +That’s it. We have successfully built a [Coordinate Distance Calculator App](https://rapidapi-example-coordinate-distance-calculator.vercel.app/) using [Distance Calculator API](https://RapidAPI.com/ApiOcean/api/distance-calculator?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the source code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/coordinate-distance-calculator-app). + +In the end, it will look something like this: + +![Coordinate Distance Calculator built with Next.js and Distance Calculator API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/7ef1b6ce2ca6e5796e89b6d18167f8b8ebb70e7e/guides/posts/build-coordinate-distance-calculator-app/images/cover.png) diff --git a/guides/posts/build-covid-app/images/code-snippet.jpg b/guides/posts/build-covid-app/images/code-snippet.jpg new file mode 100644 index 00000000..70f65acf Binary files /dev/null and b/guides/posts/build-covid-app/images/code-snippet.jpg differ diff --git a/guides/posts/build-covid-app/images/covid-stats-app.png b/guides/posts/build-covid-app/images/covid-stats-app.png new file mode 100644 index 00000000..6ba21a5d Binary files /dev/null and b/guides/posts/build-covid-app/images/covid-stats-app.png differ diff --git a/guides/posts/build-covid-app/images/subscribe.jpg b/guides/posts/build-covid-app/images/subscribe.jpg new file mode 100644 index 00000000..b3503a78 Binary files /dev/null and b/guides/posts/build-covid-app/images/subscribe.jpg differ diff --git a/guides/posts/build-covid-app/post.md b/guides/posts/build-covid-app/post.md new file mode 100644 index 00000000..3b9c0827 --- /dev/null +++ b/guides/posts/build-covid-app/post.md @@ -0,0 +1,336 @@ +--- +title: How to build a COVID-19 Stats app using Next.js and COVID-19 API? +description: In this piece, I am going to show you how you can build an application that will show the user coronavirus stats of any country they enter. +publishedDate: 2021-10-28T15:57:17.709Z +lastModifiedDate: 2021-10-28T15:57:17.709Z +authors: + - saad +categories: + - apps +tags: + - rapidapi + - covid-stats-app +coverImage: '' +--- + + + +There are several public APIs out there that you can use to develop small to large-scale applications. You do not have to create a new feature from scratch, and you can just find an API of it and use it to implement the feature. + + + +[RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides you with thousands of these public APIs that you can use in your apps. Many APIs on [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) have free versions available, but you can also buy a premium version if the free version does not satisfy your need. + +Today, I am building an application that will show the user coronavirus stats of any country they enter. So without any further ado, let’s jump in. + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the client-side and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to fetch the COVID-19 stats. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for "covid-19" in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to COVID-19 APIs. For this piece, I am using [COVID-19 data API](https://rapidapi.com/Gramzivi/api/covid-19-data/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on **Subscribe to Test** button. + +![Subscribe to COVID-19 data API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-covid-app/images/subscribe.jpg) + +Once you click the button, you will be redirected to another page where different available subscription packages will be shown. Let’s go with the free one for now. + +After all this, you will be redirected back to the original page. Here you will have a key `x-rapidapi-key`. Save it. It will be used later in the application. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss covid-stats-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `covid-stats-app` has been created. Open this folder in your preferred code editor. I am going to use [VSCode](https://code.visualstudio.com/) for the project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called - - `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/covid-stats-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```js +export default function Home() { + return ( +
+

+ COVID-19 Stats App +

+

+ Track COVID-19 Spread Across the World +

+
+ ); +} +``` + +It will create two headings for you with the text "COVID-19 Stats App" and "Track COVID-19 Spread Across the World". You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create an input field and search button. For this, copy the following code and paste it in `pages/index.js`: + +```js +export default function Home() { + return ( +
+

+ COVID-19 Stats App +

+

+ Track COVID-19 Spread Across the World +

+
+
+ + +
+
+
+ ); +} +``` + +This code is going to create an input field and button. I have also styled them a little bit using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Let’s create some states to store the user input and the stats we will receive from the API. For this, copy-paste the following code in `pages/index.js`. + +```js +import {useState} from 'react'; + +export default function Home() { + const [country, setCountry] = useState(null); + const [stats, setStats] = useState(null); + + return ( +
+

+ COVID-19 Stats App +

+

+ Track COVID-19 Spread Across the World +

+
+
+ setCountry(e.target.value)} + /> + +
+
+
+ ); +} +``` + +You can see that I have added an `onChange` event handler to set the state value as soon as the user writes something in the input field. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [COVID-19 data API](https://rapidapi.com/Gramzivi/api/covid-19-data/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +We are going to use the `getLatestCountryDataByName` endpoint of the [COVID-19 data API](https://rapidapi.com/Gramzivi/api/covid-19-data/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) to get the country-specific COVID-19 stats. I am also going to use the code snippet of `(JavaScript) Axios` that [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides us. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-covid-app/images/code-snippet.jpg) + +Create a file called `stats` in the `pages/api` directory and copy-paste the following code there: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://covid-19-data.p.rapidapi.com/country', + params: {name: req.query.country}, + headers: { + 'x-rapidapi-host': 'covid-19-data.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + res.status(response.status); + }); + } else { + res.status(400); + } +} +``` + +Now let’s create a function in the `pages/index.js` file to request the `http://localhost:3000/api/stats` for the COVID-19 statistics. You can just copy and replace the following code in `pages/index.js` file: + +```js +import axios from 'axios'; +import {useState} from 'react'; + +export default function Home() { + const [country, setCountry] = useState(null); + const [stats, setStats] = useState(null); + + /** + * + * + * Fetches COVID-19 Stats of a country + */ + const fetchStats = async () => { + try { + const res = await axios.get(`http://localhost:3000/api/stats`, { + params: {country} + }); + const {data} = res; + setStats(data[0]); + } catch (err) { + console.log(err); + } + }; + + return ( +
+

+ COVID-19 Stats App +

+

+ Track COVID-19 Spread Across the World +

+
+
+ setCountry(e.target.value)} + /> + +
+ {stats && ( +
+ + + + + + + + + + + + + + + + + +
+ Country + + Confirmed + + Recovered + + Deaths +
+ {stats.country} + + {stats.confirmed} + + {stats.recovered} + + {stats.deaths} +
+
+ )} +
+
+ ); +} +``` + +You can see that I have created a function, `fetchStats`, for getting the statistics. I am also creating a table to display and conditionally rendering it on the screen to display the statistics as soon as the user receives them. + +## Wrap Up + +This is it. We have successfully built a [COVID Stats App](https://rapidapi-example-covid-stats.vercel.app/) using the [COVID-19 data API](https://RapidAPI.com/Gramzivi/api/covid-19-data/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/covid-stats-app?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It will look something like this: + +![COVID Stats Application built with Next.js and COVID-19 data API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-covid-app/images/covid-stats-app.png) diff --git a/guides/posts/build-covid-vaccine-stats-app/images/code-snippet.png b/guides/posts/build-covid-vaccine-stats-app/images/code-snippet.png new file mode 100644 index 00000000..414acb86 Binary files /dev/null and b/guides/posts/build-covid-vaccine-stats-app/images/code-snippet.png differ diff --git a/guides/posts/build-covid-vaccine-stats-app/images/cover.png b/guides/posts/build-covid-vaccine-stats-app/images/cover.png new file mode 100644 index 00000000..df390788 Binary files /dev/null and b/guides/posts/build-covid-vaccine-stats-app/images/cover.png differ diff --git a/guides/posts/build-covid-vaccine-stats-app/images/subscribe.png b/guides/posts/build-covid-vaccine-stats-app/images/subscribe.png new file mode 100644 index 00000000..2fef59c6 Binary files /dev/null and b/guides/posts/build-covid-vaccine-stats-app/images/subscribe.png differ diff --git a/guides/posts/build-covid-vaccine-stats-app/post.md b/guides/posts/build-covid-vaccine-stats-app/post.md new file mode 100644 index 00000000..428dc71f --- /dev/null +++ b/guides/posts/build-covid-vaccine-stats-app/post.md @@ -0,0 +1,448 @@ +--- +title: How to build a COVID-19 Vaccine Stats App using Covid 19 World Vaccination Data API? +description: In this piece, I am going to show you how you can build an application that will provide the COVID-19 vaccine statistics across different countries. +publishedDate: 2021-12-06T06:43:23.822Z +lastModifiedDate: 2021-12-06T06:43:23.822Z +authors: + - saad +categories: + - apps +tags: + - rapidapi + - covid-vaccine-stats-app +coverImage: '' +--- + + + +The world has been fighting against COVID-19 since the start of 2020. At that time, there were no vaccines, but fortunately, several companies have developed them. And because of the availability, everyone should get vaccinated as soon as possible. + + + +Today, I am building an application that will provide the COVID-19 vaccine statistics across different countries. So without any further, let’s jump in! + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the client-side and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to fetch the vaccine details. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?tm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “covid vaccine” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to all the available APIs that provide this service. For this piece, I am using [Covid 19 World Vaccination Data](https://rapidapi.com/jamesrabels@gmail.com/api/covid-19-world-vaccination-data/?utm_source=RapidAPI.com%2Fguides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on **Subscribe to Test** button. + +![Subscribe to Covid 19 World Vaccination Data API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/921e2aafdccb1fecf813bb7e92c5c2f2616c0b5f/guides/posts/build-covid-vaccine-stats-app/images/subscribe.png) + +Once you click the button, you will be redirected to another page where different available subscription packages will be shown. Let’s go with the free one for now. + +After all this, you will be redirected back to the original page. Here you will have a key `x-rapidapi-key`. Save it. It will be used later in the application. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss covid-vaccine-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `covid-vaccine-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/covid-vaccine-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```js +export default function Home() { + return ( +
+

+ COVID-19 Vaccine Stats App +

+

+ Look up COVID-19 Vaccination Stats Across Different Countries +

+
+ ); +} +``` + +It will create two headings for you with the text “Time App” and “Get Time-related information according to an area”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create a dropdown list and a search button. The user will be able to select the country of their choice from the list and use the search button to get the vaccination details of that country. + +For this, create a new folder called `components`. Inside this folder, create a file called `Dropdown.js`. Copy and paste what you will find in [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/covid-vaccine-app/components/Dropdown.js) file in your `Dropdown.js`. + +Now copy the following code and paste it in `pages/index.js`: + +```js +import Dropdown from '../components/Dropdown'; + +export default function Home() { + return ( +
+

+ COVID-19 Vaccine Stats App +

+

+ Look up COVID-19 Vaccination Stats Across Different Countries +

+
+ + +
+
+ ); +} +``` + +This code is going to create an input field and button. I have also styled them a little bit using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Let’s create some states to store the country code the user will select and save the response that we will receive from the API. For this, copy-paste the following code in `pages/index.js`. + +```js +import {useState} from 'react'; +import Dropdown from '../components/Dropdown'; + +export default function Home() { + const [countryCode, setCountryCode] = useState('ABW'); + const [res, setRes] = useState(null); + + return ( +
+

+ COVID-19 Vaccine Stats App +

+

+ Look up COVID-19 Vaccination Stats Across Different Countries +

+
+ + +
+
+ ); +} +``` + +You can see that I am sending the `setCountryCode` function to the Dropdown component as a prop. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR_RAPID_API_KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key that I told you to save earlier. + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +We are using the `home` endpoint of the [Covid 19 World Vaccination Data](https://rapidapi.com/jamesrabels@gmail.com/api/covid-19-world-vaccination-data/?utm_source=RapidAPI.com%2Fguides&utm_medium=DevRel&utm_campaign=DevRel) to get the vaccination details. + +RapidAPI Hub provides you with code snippets in different languages for integrating the API. I am going to use the `(JavaScript) Axios` one. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/921e2aafdccb1fecf813bb7e92c5c2f2616c0b5f/guides/posts/build-covid-vaccine-stats-app/images/code-snippet.png) + +Now create a file with the name `vaccine.js` inside the `pages/api` directory. It is going to create a REST API endpoint for you. The endpoint point will look like this: + +```sh +http://localhost:3000/api/vaccine +``` + +Now copy the following code in this file: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + if (!req.query.countryCode) { + const options = { + method: 'GET', + url: 'https://covid-19-world-vaccination-data.p.rapidapi.com/', + params: {iso: 'ABW'}, + headers: { + 'x-rapidapi-host': + 'covid-19-world-vaccination-data.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + const options = { + method: 'GET', + url: 'https://covid-19-world-vaccination-data.p.rapidapi.com/', + params: {iso: req.query.countryCode}, + headers: { + 'x-rapidapi-host': + 'covid-19-world-vaccination-data.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } + } else { + res.status(400); + } +} +``` + +This code makes an API call to the [Covid 19 World Vaccination Data](https://rapidapi.com/jamesrabels@gmail.com/api/covid-19-world-vaccination-data/?utm_source=RapidAPI.com%2Fguides&utm_medium=DevRel&utm_campaign=DevRel) on the server and returns the results to the user. It executes when the user makes an API call to the `vaccine` endpoint I have mentioned above. + +I have added a condition in the code to differentiate whether the API call is made before the website is loaded. + +Once you are done, copy the following code in the `pages/index.js` file: + +```js +import {useState} from 'react'; +import axios from 'axios'; +import Dropdown from '../components/Dropdown'; + +export default function Home({data}) { + const [countryCode, setCountryCode] = useState('ABW'); + const [res, setRes] = useState(data[data.length - 1]); + + /** + * + * + * Fetch vaccine information of a country + */ + const fetchInfo = async () => { + try { + const res = await axios.get(`/api/vaccine`, { + params: {countryCode} + }); + + const {data} = res; + setRes(data[data.length - 1]); + } catch (err) { + console.log(err); + } + }; + + return ( +
+

+ COVID-19 Vaccine Stats App +

+

+ Look up COVID-19 Vaccination Stats Across Different Countries +

+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Information + + Value +
+ Country + + {res.country} +
+ Vaccines + + {res.vaccines} +
+ Daily Vaccination Per Million + + {res.daily_vaccinations_per_million} +
+ People Fully Vaccinated + + {res.people_fully_vaccinated} +
+ People Fully Vaccinated Per Hundred + + {res.people_fully_vaccinated} +
+ People Vaccinated + + {res.people_vaccinated} +
+ People Vaccinated Per Hundred + + {res.people_vaccinated_per_hundred} +
+ Total Vaccination + + {res.total_vaccinations} +
+ Total Vaccination Per Hundred + + {res.total_vaccinations_per_hundred} +
+ Source + + + {res.source_name} + +
+
+

+ Made by RapidAPI DevRel Team -{' '} + + See more examples like this + +

+
+
+
+ ); +} + +export async function getServerSideProps() { + const res = await axios.get('http://localhost:3000/api/vaccine'); + const {data} = res; + + if (!data) { + return { + notFound: true + }; + } + + return { + props: { + data + } + }; +} +``` + +I am using the Next.js `getServerSideProps` function to fetch the data from the server. It will make my application server-side, and the user will never see a loading state. You can also use `getStaticProps` instead of `getServerSideProps`, and the application will then fetch the data at build time. + +I have also created a table to display the values that our application will receive from the API. + +## Wrap Up + +This is it. We have successfully built a [COVID-19 Vaccine Stats App](https://rapidapi-covid-vaccine-stats-app.vercel.app/) using the [Covid 19 World Vaccination Data](https://RapidAPI.com/jamesrabels@gmail.com/api/covid-19-world-vaccination-data/?utm_source=RapidAPI.com%2Fguides&utm_medium=DevRel&utm_campaign=DevRel). You can find the code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/covid-vaccine-app). It will look something like this: + +![COVID Vaccine Stats Application built with Next.js and Covid 19 World Vaccination Data API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/921e2aafdccb1fecf813bb7e92c5c2f2616c0b5f/guides/posts/build-covid-vaccine-stats-app/images/cover.png) diff --git a/guides/posts/build-crypto-news-app/images/code-snippet.png b/guides/posts/build-crypto-news-app/images/code-snippet.png new file mode 100644 index 00000000..e132a9b2 Binary files /dev/null and b/guides/posts/build-crypto-news-app/images/code-snippet.png differ diff --git a/guides/posts/build-crypto-news-app/images/crypto-news-1.png b/guides/posts/build-crypto-news-app/images/crypto-news-1.png new file mode 100644 index 00000000..b6f228b1 Binary files /dev/null and b/guides/posts/build-crypto-news-app/images/crypto-news-1.png differ diff --git a/guides/posts/build-crypto-news-app/images/crypto-news-2.png b/guides/posts/build-crypto-news-app/images/crypto-news-2.png new file mode 100644 index 00000000..3e103f23 Binary files /dev/null and b/guides/posts/build-crypto-news-app/images/crypto-news-2.png differ diff --git a/guides/posts/build-crypto-news-app/images/initial.png b/guides/posts/build-crypto-news-app/images/initial.png new file mode 100644 index 00000000..ea08a714 Binary files /dev/null and b/guides/posts/build-crypto-news-app/images/initial.png differ diff --git a/guides/posts/build-crypto-news-app/images/subscribe.png b/guides/posts/build-crypto-news-app/images/subscribe.png new file mode 100644 index 00000000..26bb460c Binary files /dev/null and b/guides/posts/build-crypto-news-app/images/subscribe.png differ diff --git a/guides/posts/build-crypto-news-app/post.md b/guides/posts/build-crypto-news-app/post.md new file mode 100644 index 00000000..d3fe65ac --- /dev/null +++ b/guides/posts/build-crypto-news-app/post.md @@ -0,0 +1,395 @@ +--- +title: How to build a Crypto News Next.js app using a Cryptocurrency API from RapidAPI Hub? +description: Today, APIs exist that provide all kinds of Cryptocurrency data. We will use one of these APIs in this guide to build a web app that shows the latest Cryptocurrency news. +publishedDate: 2021-11-18T15:57:17.709Z +lastModifiedDate: 2021-11-18T15:57:17.709Z +authors: + - "ahmad-bilal" +categories: + - apps +tags: + - rapidapi + - cryptocurrency + - news + - app +coverImage: '' +draft: false +--- + + + +Today, public APIs provide a fast and convenient way to develop an application. Whether a small tool-based application or a big eCommerce portal, these APIs can be very serviceable. + + + +[RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) lets you choose from thousands of these public APIs for use in your projects. You can explore thousands of these on RapidAPI Hub and select one for your next project. + +Today, we will be building a web application that will display the latest news related to Cryptocurrency. It will be a single point of access to news from various sources. Let's build it. + +## Stack + +The stack for our app is going to be as follows. I am going to use [Next.js](https://nextjs.org/) for the client-side of our app and [TailwindCSS](https://tailwindcss.com/) for styling it. + +Even if you don’t know about Next.js, being familiar with React will be enough for this guide. Tailwind is a CSS framework that provides utility classes to use directly in the markup, saving time during the development process. + +## Choosing The API + +We need an API that will serve us Cryptocurrency related news from multiple sources. Let’s find an API that meets our requirements. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already. Then, search for "Cryptocurrency" in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see that we have a bunch of options for Cryptocurrency APIs. For our app, I will use [Investing - Cryptocurrency Markets API](https://rapidapi.com/apidojo/api/investing-cryptocurrency-markets/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on the **Subscribe to Test** button. + +![Subscribe to the API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-crypto-news-app/images/subscribe.png) + +Once you click the button, you will be redirected to the pricing page, which will show the subscription packages for the API. The free plan allows up to 500 requests per month. We are going to subscribe to the free plan for this guide. + +Once subscribed, you will be back on the **Endpoints** page. In the central section, you should see a field named `x-rapidapi-key`. Save its value. We will need it later to call the API. + +## Building The UI + +We can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. + +```sh +npx create-next-app -e with-tailwindcss crypto-news-app +``` + +It will take some time to install the packages. After generating the boilerplate, you will see a folder with the name `crypto-news-app` has been created. Open this folder in your preferred code editor. + +### Project Files + +In our project folder, we will have the following folders and files. I will briefly break them down for you: + +- `pages` directory: It has the `index.js` file, which is the entry point of our app, basically the home page. It also has`_app.js` and another directory named `api` where we will store the requests to our API. +- `public` directory: It holds assets. You can place your static files here to load later in the application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +I will be using a particular set of colors for this app. You can use colors of your preference, but if you are interested in mine, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/crypto-news-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are Tailwind configurations for the colors I will be using. + +With all that set, it's time to code the app. Let's jump right into it. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. Let's add the layout. + +```js +export default function Home() { + return ( +
+

+ Crypto News App +

+

+ Next.js app which provides information latest news about Crypto + using Cryptocurrency API. +

+
+ ); +} +``` + +### → STEP #2 + +We need a button that will trigger the API call and fetch the latest news from the API. On a side note, if you want to render the news whenever the page is loaded, you can use the `useRef` React hook. But since we are using the free plan, we will go for the button. Let's code it. + +```js +export default function Home() { + return ( +
+

+ Crypto News App +

+

+ Next.js app which provides information latest news about Crypto using + Cryptocurrency API +

+ +
+
+ +
+
+ ); +} +``` + +This code is going to create the button. I have also styled and made them responsive using [TailwindCSS](<(https://tailwindcss.com/)>). At this point, this is what our app looks like: + +![Inital design of the app](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-crypto-news-app/images/initial.png) + +### → STEP #3 + +Let’s create two states, `response` to hold the response from the API, and `page` to implement pagination in our news app. + +```js +import { useState } from "react"; + +export default function Home() { + const [page, setPage] = useState(1); + const [response, setResponse] = useState(null); + + return ( +
+

+ Crypto News App +

+

+ Next.js app which provides information latest news about Crypto using Cryptocurrency API +

+
+
+ +
+
+ ); +} +``` + +We want the page state to be `1` when initialized. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file in the root directory of your project and paste the following into it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +Remember the `x-rapidapi-key` I asked you to save earlier? You need to replace `YOUR-RAPIDAPI-KEY` with its value. You get the key after subscribing to the [Cryptocurrency API](https://rapidapi.com/apidojo/api/investing-cryptocurrency-markets/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +And import `axios` in `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +The [Cryptocurrency API](https://rapidapi.com/apidojo/api/investing-cryptocurrency-markets/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides a bunch of very useful endpoints like markets, overviews, conversions, etc. You can see these endpoints on the left pane. For our news app, we are going to use the `get-news` endpoint. + +![API Endpoints and (JavaScript) Axios Snippet](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-crypto-news-app/images/code-snippet.png) + +We will send a GET request to get the latest news related to Cryptocurrency. The optional parameter `page` will help us implement pagination in our app. For easy integration, [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) automatically generates snippets in multiple languages and options. We will copy the `(JavaScript) Axios` one, as you can see above. + +Next, I am going to create a file named `news.js` in the `pages/api` directory and use the code snippet as follows: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + const options = { + method: 'GET', + url: 'https://investing-cryptocurrency-markets.p.rapidapi.com/coins/get-news', + params: { + pair_ID: '1057391', // Setting Bitcoin as the general focus of the news. + page: req.query.page, // Query parameter sent from the client side. + time_utc_offset: '28800', + lang_ID: '1' + }, + headers: { + 'x-rapidapi-host': + 'investing-cryptocurrency-markets.p.rapidapi.com', + 'x-rapidapi-key': NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); +} +``` + +We have specified the parameters. Our API call is ready. Now we need to create a function in the `pages/index.js` file to send the request from the client-side to our API at `http://localhost:3000/api/news`. You can just copy and replace the following code in `pages/index.js` file: + +```js +import axios from 'axios'; +import {useState} from 'react'; + +export default function Home() { + const [page, setPage] = useState(1); + const [response, setResponse] = useState(null); + + // Getter function for getting news from the API. + const getNews = async () => { + try { + const res = await axios.get('api/news/', { + params: {page} + }); + const {data} = res; + setResponse(data.data[0].screen_data.news); + } catch (error) { + console.error(error); + } + }; + + return ( +
+

+ Crypto News App +

+

+ Next.js app which provides information latest news about Crypto + using Cryptocurrency API +

+ +
+
+ +
+
+
+ ); +} +``` + +See the `getNews` function I have created to get the response from the API. We are binding this function to the button we created, using the `onClick` event handler. It sends the `page` state holding our page number as the parameter. Once the response is received, it is destructured. `data.data[0].screen_data.news` representing the news array, is stored in the `response` state. + +### → FINAL STEP + +In the final step, we will display the results and implement pagination. We have the news array in response `state`, which holds all the information we need, such as title, source, related image, and URL. We are going to do the following things: + +1. Use a map function to iterate through response, which holds an array of objects. I will be rendering the headline, provider name, related image, and URL for each news article. For their design, I used a grid. + +2. Hide the **Get latest news** button once we have the response. + +3. Show a **Load next page** button once we have the response. When clicked, it will increment the page state and make the API Call for that page. + +Our final code looks like this: + +```js +import axios from 'axios'; +import {useState} from 'react'; + +export default function Home() { + const [page, setPage] = useState(1); + const [response, setResponse] = useState(null); + + const getNews = async () => { + try { + const res = await axios.get('api/news/', { + params: {page} + }); + const {data} = res; + setResponse(data.data[0].screen_data.news); + } catch (error) { + console.error(error); + } + }; + + return ( +
+

+ Crypto News App +

+

+ Next.js app which provides information latest news about Crypto + using Cryptocurrency API +

+ +
+
+ {!response && ( + + )} +
+
+
+ {response && + response.map(news => { + return ( + + ); + })} +
+ + {response && ( +
+ +
+ )} +
+ ); +} +``` + +This is what our app looks like: + +![Crypto News App built with Next.js and Cryptocurrency API from RapidAPI Hub](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-crypto-news-app/images/crypto-news-1.png) + +![Crypto News App built with Next.js and Cryptocurrency API from RapidAPI Hub](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-crypto-news-app/images/crypto-news-2.png) + +## Wrap Up + +All done. Our [crypto news app](https://rapidapi-example-crypto-news-app.vercel.app/) is ready. Like this, you can utilize the remaining endpoints to create a full-fledged Cryptocurrency focused application. Find the code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/crypto-news-app). diff --git a/guides/posts/build-currency-conversion-app/images/convert-endpoint.jpg b/guides/posts/build-currency-conversion-app/images/convert-endpoint.jpg new file mode 100644 index 00000000..c739adcb Binary files /dev/null and b/guides/posts/build-currency-conversion-app/images/convert-endpoint.jpg differ diff --git a/guides/posts/build-currency-conversion-app/images/currency-conversion-app.png b/guides/posts/build-currency-conversion-app/images/currency-conversion-app.png new file mode 100644 index 00000000..e7967401 Binary files /dev/null and b/guides/posts/build-currency-conversion-app/images/currency-conversion-app.png differ diff --git a/guides/posts/build-currency-conversion-app/images/subscribe.jpg b/guides/posts/build-currency-conversion-app/images/subscribe.jpg new file mode 100644 index 00000000..c4e77a49 Binary files /dev/null and b/guides/posts/build-currency-conversion-app/images/subscribe.jpg differ diff --git a/guides/posts/build-currency-conversion-app/images/symbols-endpoint.jpg b/guides/posts/build-currency-conversion-app/images/symbols-endpoint.jpg new file mode 100644 index 00000000..834e3694 Binary files /dev/null and b/guides/posts/build-currency-conversion-app/images/symbols-endpoint.jpg differ diff --git a/guides/posts/build-currency-conversion-app/post.md b/guides/posts/build-currency-conversion-app/post.md new file mode 100644 index 00000000..1f160e92 --- /dev/null +++ b/guides/posts/build-currency-conversion-app/post.md @@ -0,0 +1,438 @@ +--- +title: How to build a Currency Conversion App using Next.js and Currency Conversion API? +description: In this piece, I am going to show you how you can build a Currency Conversion app using Currency Conversion API from RapidAPI Hub and Next.js. +publishedDate: 2021-10-25T16:19:49.280Z +lastModifiedDate: 2021-10-25T16:19:49.280Z +authors: + - saad +categories: + - apps +tags: + - rapidapi + - currency-conversion-app +coverImage: '' +--- + + + +There are thousands of APIs available on [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) that you can use to build different products. [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides you with a broad category of APIs ranging from Finance to Payments. Today, I have decided to use a [Currency Conversion API](https://RapidAPI.com/principalapis/api/currency-conversion-and-exchange-rates/) from [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) to build a small application that will convert one concurrency to another. So without any further ado, let’s jump in. + + + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/) since we will make a couple of API calls without having a proper backend. + +I am going to use [Next.js](https://nextjs.org/) for the client-side and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s decide which API we are going to use. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for "currency conversion" in the search section. + + + Learn more about how to use RapidAPI Hub. + + +I am using [Currency Conversion and Exchange Rates API](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) by [Principal APIs](https://rapidapi.com/user/principalapis/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on **Subscribe to Test** button. + +![Subscribe to Currency Conversion and Exchange Rates API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-currency-conversion-app/images/subscribe.jpg) + +Once you click the button, you will be redirected to another page where different available subscription packages will be shown. Let’s go with the free one for now. + +After all this, you will be redirected back to the original page. Here you will have a key `x-rapidapi-key`. Save it. It will be used later in the application. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss currency-converter-app +``` + +This command is going to take a minute to set everything up. After it is finished generating the boilerplate, you will see a folder with the name `currency-converter-app` has been created. Open this folder in your preferred code editor. I am going to use [VSCode](https://code.visualstudio.com/) for the project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called `api`. You only need to know about the - - `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/currency-converter-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and also have set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the`pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```js +export default function Home() { + return ( +
+

+ Currency Conversion App +

+

+ Convert Different Concurrencies Quickly +

+
+ ); +} +``` + +It is going to create two headings for you with the text "Currency Conversion App" and "Convert Different Concurrencies Quickly". You can change it to anything you prefer. + +### → STEP #2 + +Now create a new folder called `components` in the root directory. Inside it, create a new file called `Input.js`. Now copy-paste the following code inside this file: + +```js +const Input = ({dropdown, onChange, label, symbols}) => { + const arrOfSymbols = Object.keys(symbols); + + return ( +
+ + {(dropdown && ( + + )) || ( + onChange(e.target.value)} + /> + )} +
+ ); +}; + +export default Input; +``` + +It is a separate component that I have created for adding input fields in my application. If the dropdown value is set to `true`, the `Input` component will render a dropdown list. The list is going to show the user different currency options. + +This component is receiving `symbols` object as a prop. The `symbols` object contains different currency exchange options. I have created a separate array for the keys of the `symbol` object. Later, I am mapping this array to generate the dropdown list. + +If the dropdown value is set to `false`, the Input component will render a text field that will only accept numbers. + +The component is also receiving `onChange` function, which I have set to both the dropdown and input text field’s `onChange` event. Now, if the value of input fields changes, the `onChange` function will trigger. + +### → STEP #3 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [Currency Conversion and Exchange Rates API](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` in your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #4 + +There are more than 190+ countries in the world. Since almost everyone has a different currency, it was challenging to write down their three code currency symbols. + +The [Currency Conversion and Exchange Rates API](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides an endpoint that can get you all these symbols as a response. I am going to this endpoint along with the code snippet [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides us. + +![Symbols endpoint of Currency Conversion and Exchange Rates API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-currency-conversion-app/images/symbols-endpoint.jpg) + +For this, create a `symbol.js` file in `pages/api` directory, and paste the following code in it: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://currency-conversion-and-exchange-rates.p.rapidapi.com/symbols', + headers: { + 'x-rapidapi-host': + 'currency-conversion-and-exchange-rates.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +Now copy-paste the following code, and put it inside the `pages/index.js` file: + +```js +import {useState} from 'react'; +import axios from 'axios'; +import Input from '../components/Input'; + +export default function Home({symbols}) { + const [convertFrom, setConvertFrom] = useState('ANG'); + const [convertTo, setConvertTo] = useState('ANG'); + const [amount, setAmount] = useState(null); + + return ( +
+

+ Currency Conversion App +

+

+ Convert Different Concurrencies Quickly +

+
+ + + + +
+
+ ); +} + +export async function getServerSideProps() { + const res = await axios.get('http://localhost:3000/api/symbol'); + const {data} = res; + const {symbols} = data; + + if (!symbols) { + return { + notFound: true + }; + } + + return { + props: { + symbols + } + }; +} +``` + +I am using server-side rendering so that all the currency symbols fetches before the application loads. I have also created different states to store the data. + +I have used the `Input` component that we created earlier to render different fields on the viewport. I am sending the `onChange` prop in the `Input` component that will get triggered when the value of the input field changes. + +### → STEP #5 + +Now let’s convert the currency. For this, we are going to use a different endpoint of our API. + +![Covert endpoint of Currency Conversion and Exchange Rates API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-currency-conversion-app/images/convert-endpoint.jpg) + +For this, create a `convert.js` file in the `pages/api` directory and paste the following code there: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + console.log(req.query.convertFrom); + const options = { + method: 'GET', + url: 'https://currency-conversion-and-exchange-rates.p.rapidapi.com/convert', + params: { + from: `${req.query.convertFrom}`, + to: `${req.query.convertTo}`, + amount: `${req.query.amount}` + }, + headers: { + 'x-rapidapi-host': + 'currency-conversion-and-exchange-rates.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +Now open the `pages/index.js` file and copy-paste the following code there: + +```js +import {useState} from 'react'; +import axios from 'axios'; +import Input from '../components/Input'; + +export default function Home({symbols}) { + const [convertFrom, setConvertFrom] = useState('ANG'); + const [convertTo, setConvertTo] = useState('ANG'); + const [amount, setAmount] = useState(null); + const [convertedAmount, setConvertedAmount] = useState(null); + + /** + * + * + * Fetch the converted amount + */ + const convertCurrency = () => { + const options = { + method: 'GET', + url: 'http://localhost:3000/api/convert', + params: {convertFrom, convertTo, amount} + }; + + axios + .request(options) + .then(function (response) { + const {data} = response; + setConvertedAmount(Math.floor(data.result)); + }) + .catch(function (error) { + console.error(error); + }); + }; + + return ( +
+

+ Currency Conversion App +

+

+ Convert Different Concurrencies Quickly +

+
+ + + + + {convertedAmount && ( +
+

+ Converted Amount: {`${convertedAmount} ${convertTo}`} +

+
+ )} +
+
+ ); +} + +export async function getServerSideProps() { + const res = await axios.get('http://localhost:3000/api/symbol'); + const {data} = res; + const {symbols} = data; + + if (!symbols) { + return { + notFound: true + }; + } + + return { + props: { + symbols + } + }; +} +``` + +You can see that I have added another function called `convertCurrency` that will trigger when the user clicks on the `Convert` button. Inside the function, I am making an API call to my Next.js API `convert` route. This API route will request the [Currency Conversion and Exchange Rates API](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and then send the response it receives to the client. + +I have created another state variable to store the converted amount. When the request is successful at client-side, the converted amount is stored to the `convertedAmount` state variable. + +When the `convertedAmount` changes from null to some other value, it will trigger a UI piece that will show the converted amount. + +## Wrap Up + +This is it. We have successfully built a [Currency Converter application](https://rapidapi-example-currency-conversion.vercel.app/) using the [Currency Conversion and Exchange Rates API](https://rapidapi.com/principalapis/api/currency-conversion-and-exchange-rates/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/currency-converter-app?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It will look something like this: + +![Currency Conversion application built using Next.js and Currency Conversion and Exchange Rates API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-currency-conversion-app/images/currency-conversion-app.png) diff --git a/guides/posts/build-dictionary-app/images/code-snippet.png b/guides/posts/build-dictionary-app/images/code-snippet.png new file mode 100644 index 00000000..cce14a7d Binary files /dev/null and b/guides/posts/build-dictionary-app/images/code-snippet.png differ diff --git a/guides/posts/build-dictionary-app/images/cover.png b/guides/posts/build-dictionary-app/images/cover.png new file mode 100644 index 00000000..6865bdd8 Binary files /dev/null and b/guides/posts/build-dictionary-app/images/cover.png differ diff --git a/guides/posts/build-dictionary-app/post.md b/guides/posts/build-dictionary-app/post.md new file mode 100644 index 00000000..1599a57e --- /dev/null +++ b/guides/posts/build-dictionary-app/post.md @@ -0,0 +1,359 @@ +--- +title: How to build a Dictionary app using Next.js and dictionary API? +description: In this piece, I am going to show you how you can build a dictionary app using an API from RapidAPI Hub and Next.js. +publishedDate: 2021-11-12T20:22:52.607Z +lastModifiedDate: 2021-11-12T20:22:52.607Z +authors: + - saad +categories: + - apps +tags: + - build-dictionary-app +coverImage: '' +--- + + + +[RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides you with thousands of these public APIs that you can use in your apps. Many APIs on [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) have free versions available, but you can also buy a premium version if the free version does not satisfy your need. + + + +Today, I am building a dictionary application that will take a word from the user and bring back its meaning using an API. So without any further ado, let’s jump in. + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the client-side and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to fetch the meaning of a word. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “dictionary apis” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to all the available spell check APIs. For this piece, I am using [Dictionary by API-Ninjas](https://rapidapi.com/apininjas/api/dictionary-by-api-ninjas/?utm_source=RapidAPI.com%2Fguides&utm_medium=DevRel&utm_campaign=DevRel). + +It is a free API, so you do not need to subscribe to it. Although, you will need your RapidAPI key. Go ahead and save the `x-rapidapi-key` so you can use it later. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss dictionary-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `dictionary-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/dictionary-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```js +export default function Home() { + return ( +
+

+ Dictionary App +

+

+ Check Meaning of any word +

+
+ ); +} +``` + +It will create two headings for you with the text “Dictionary App” and “Check Meaning of any word”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create an input field and a search button. The user will be able to type in the input field and use the search button to get the word’s meaning. + +For this, copy the following code and paste it in `pages/index.js`: + +```js +export default function Home() { + return ( +
+

+ Dictionary App +

+

+ Check Meaning of any word +

+
+
+ + +
+
+
+ ); +} +``` + +This code is going to create an input field and button. I have also styled them a little bit using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Let’s create some states to store the user input and the meaning we will receive from the API. For this, copy-paste the following code in `pages/index.js`. + +```js +import {useState} from 'react'; + +export default function Home() { + const [word, setWord] = useState(''); + const [wordInfo, setWordInfo] = useState(null); + + return ( +
+

+ Dictionary App +

+

+ Check Meaning of any word +

+
+
fetchInfo(e)} + className="flex w-full justify-center md:flex-col md:w-5/6 " + > + setWord(e.target.value)} + /> + +
+
+
+ ); +} +``` + +You can see that I have added an `onChange` event handler to set the state value as soon as the user writes something in the input field. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` with the API key I told you to save earlier in the article. + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +We are using the `/v1/dictionary` endpoint of the [Dictionary by API-Ninjas](https://rapidapi.com/apininjas/api/dictionary-by-api-ninjas/?utm_source=RapidAPI.com%2Fguides&utm_medium=DevRel&utm_campaign=DevRel) to get the meaning of the word. + +I am also going to use the code snippet of `(JavaScript) Axios` that [RapidAPI Hub](https://rapidapi.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides us. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/5a1b6f8094c17bf4c799171dc1147f73f5652b4c/guides/posts/build-dictionary-app/images/code-snippet.png) + +Create a file called `info.js` in the `pages/api` directory and copy-paste the following code there: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://dictionary-by-api-ninjas.p.rapidapi.com/v1/dictionary', + params: {word: req.query.word}, + headers: { + 'x-rapidapi-host': 'dictionary-by-api-ninjas.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +Now let’s create a function in the `pages/index.js` file to request the `/api/info` for the word meaning. You can just copy and replace the following code in `pages/index.js` file: + +```js +import {useState} from 'react'; +import axios from 'axios'; + +export default function Home() { + const [word, setWord] = useState(''); + const [wordInfo, setWordInfo] = useState(null); + + /** + * + * + * Fetch word information + */ + const fetchInfo = async e => { + e.preventDefault(); + try { + const res = await axios.get(`/api/info`, { + params: {word} + }); + const {data} = res; + const {definition} = data; + + // split the response string into an array using regex + const newDefinition = definition.split(/1. |2. | 3. /); + setWordInfo(newDefinition); + } catch (err) { + console.log(err); + } + }; + + return ( +
+

+ Dictionary App +

+

+ Check Meaning of any word +

+
+
fetchInfo(e)} + className="flex w-full justify-center md:flex-col md:w-5/6 " + > + setWord(e.target.value)} + /> + +
+ {wordInfo && ( +
+ + + + + + + + + + + + + + + + + +
+ + {word} + + + + Definition + +
1. + {wordInfo[1]} +
2. + {wordInfo[2]} +
+
+ )} +
+
+

+ Made by RapidAPI DevRel Team –{' '} + + + See Examples Like this + + +

+
+
+ ); +} +``` + +You can see that I have created a function, `fetchInfo`, to get the meaning of the word. I have also used a little bit of regex to split the long string we receive as a response from the API into smaller strings. + +I have also created a piece of UI that is conditionally rendering on the screen. + +## Wrap Up + +That’s it. We have successfully built a [Dictionary App](https://rapidapi-example-dictionary-app.vercel.app/) using [Dictionary by API-Ninjas](https://rapidapi.com/apininjas/api/dictionary-by-api-ninjas/?utm_source=RapidAPI.com%2Fguides&utm_medium=DevRel&utm_campaign=DevRel). You can find the source code [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/dictionary-app) of this web app. + +In the end, it will look something like this: + +![Dictionary app built with Next.js and Dictionary API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/5a1b6f8094c17bf4c799171dc1147f73f5652b4c/guides/posts/build-dictionary-app/images/cover.png) diff --git a/guides/posts/build-domain-app/images/code-snippet.png b/guides/posts/build-domain-app/images/code-snippet.png new file mode 100644 index 00000000..ee249253 Binary files /dev/null and b/guides/posts/build-domain-app/images/code-snippet.png differ diff --git a/guides/posts/build-domain-app/images/domain-app.png b/guides/posts/build-domain-app/images/domain-app.png new file mode 100644 index 00000000..6ed722ea Binary files /dev/null and b/guides/posts/build-domain-app/images/domain-app.png differ diff --git a/guides/posts/build-domain-app/images/example.png b/guides/posts/build-domain-app/images/example.png new file mode 100644 index 00000000..9577ed1e Binary files /dev/null and b/guides/posts/build-domain-app/images/example.png differ diff --git a/guides/posts/build-domain-app/images/preview.png b/guides/posts/build-domain-app/images/preview.png new file mode 100644 index 00000000..dea97f5d Binary files /dev/null and b/guides/posts/build-domain-app/images/preview.png differ diff --git a/guides/posts/build-domain-app/images/subscribe.png b/guides/posts/build-domain-app/images/subscribe.png new file mode 100644 index 00000000..514b0862 Binary files /dev/null and b/guides/posts/build-domain-app/images/subscribe.png differ diff --git a/guides/posts/build-domain-app/post.md b/guides/posts/build-domain-app/post.md new file mode 100644 index 00000000..b723f754 --- /dev/null +++ b/guides/posts/build-domain-app/post.md @@ -0,0 +1,506 @@ +--- +title: How to build a Domain App using a WHOIS API and Next.js? +description: In this guide, we will be building a web application that will allow users to look up web domains and check their availability using an API from RapidAPI Hub. +publishedDate: 2021-12-17T15:57:17.709Z +lastModifiedDate: 2021-17-09T15:57:17.709Z +authors: + - 'ahmad-bilal' +categories: + - apps +tags: + - rapidapi + - domain + - app +coverImage: '' +--- + + + +Today, public APIs provide a fast and convenient way to develop an application. Whether a small tool-based application or a big eCommerce portal, these APIs can be very serviceable. + + + +[RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) lets you choose from thousands of these public APIs for use in your projects. You can explore thousands of these on [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and select one for your next project. + +Today, we will be building a web application that will allow users to look up web domains and check their availability. We have APIs that provide information about all the domains on the internet. Let's build the app using one of these APIs. + +## Stack + +The stack for our app is going to be as follows. I am going to use [Next.js](https://nextjs.org/) for the client-side of our app and [TailwindCSS](https://tailwindcss.com/) for styling it. + +Even if you don’t know about Next.js, being familiar with React will be enough for this guide. Tailwind is a CSS framework that provides utility classes to use directly in the markup, saving time during the development process. + +## Choosing The API + +Let’s find the API first. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already. Then, search for "Domains" in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see that we have a lot of options for Domain-related APIs. For our app, I am going to use the [NameAuditor WHOIS API](https://rapidapi.com/nameauditor/api/nameauditor-whois-check/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on the **Subscribe to Test** button. + +![Subscribe to NameAuditor WHOIS API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-domain-app/images/subscribe.png) + +Once you click the button, you will be redirected to the pricing page, which will show the subscription packages for the API. The free plan allows up to 500 requests per month. We are going to subscribe to the free plan for this guide. + +Once subscribed, you will be back on the **Endpoints** page. In the central section, you should see a field named `x-rapidapi-key`. Save its value. We will need it later to call the API. + +## Building The UI + +We can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. + +```sh +npx create-next-app -e with-tailwindcss domain-app +``` + +It will take some time to install the packages. After generating the boilerplate, you will see a folder with the name `domain-app` has been created. Open this folder in your preferred code editor. + +### Project Files + +In our project folder, we will have the following folders and files. I will briefly break them down for you: + +- `pages` directory: It has the `index.js` file, which is the entry point of our app, basically the home page. It also has`_app.js` and another directory named `api`, where we will store the requests to our API. +- `public` directory: It holds assets. You can place your static files here to load later in the application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +I will be using a particular set of colors for this app. You can use colors of your preference, but if you are interested in mine, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/domain-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are Tailwind configurations for the colors I will be using. + +Our initial UI should look like this. + +![Preview of Our App](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-domain-app/images/preview.png) + +With all that set, it's time to code the app. Let's jump right into it. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. Let's add the layout. + +```jsx +export default function Home() { + return ( +
+

+ Domain Search +

+

+ Check availability and information of any domain. +

+
+ ); +} +``` + +I added the following to `pages/_app.js`. + +```jsx +import Head from 'next/head'; +import 'tailwindcss/tailwind.css'; + +function MyApp({Component, pageProps}) { + return ( + <> + + Codestin Search App + + + + + + ); +} + +export default MyApp; +``` + +### → STEP #2 + +As you can see in the UI preview, we require a form to submit the domain keyword. The form will have an input field where the query keyword will go, followed by a submit button. Let's add these. + +```jsx +export default function Home() { + return ( +
+

+ Domain Search +

+

+ Check availability and information of any domain. +

+
+ +
+ +
+
+
+ ); +} +``` + +This code will create the input field and submit button. I have also styled and made them responsive using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Now, we need to store the user input in the input field. We can do it using React `useState` hook. We will use two states; `keyword` for storing the input domain keyword and `response` to keep the API Response. + +```jsx +import {useState} from 'react'; + +export default function Home() { + const [keyword, setKeyword] = useState(null); + const [response, setResponse] = useState(null); + + return ( +
+

+ Domain Search +

+

+ Check availability and information of any domain. +

+
+ { + setKeyword(e.target.value); // Store input in the keyword state + setResponse(null); // Set the previous response(if any) to null + }} + /> +
+ +
+
+
+ ); +} +``` + +The `onChange` handler on the input field will store the user input in our `keyword` state. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file in the root directory of your project and paste the following into it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +Remember the `x-rapidapi-key` I asked you to save earlier? You need to replace `YOUR-RAPIDAPI-KEY` with its value. You get the key after subscribing to the [NameAuditor WHOIS API](https://rapidapi.com/nameauditor/api/nameauditor-whois-check/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +And import `axios` in `pages/index.js`. + +```jsx +import axios from ‘axios’; +``` + +### → STEP #5 + +The NameAuditor WHOIS API provides two endpoints. We need the `whois` endpoint to get domain-related information. You can see these endpoints on the left pane. + +![API Endpoints and (JavaScript) Axios Snippet](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-domain-app/images/code-snippet.png) + +For easy integration, [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) automatically generates snippets in multiple languages and options. We are going to copy the `(JavaScript) Axios` ones, as you can see above. + +Let's set up the API call now. In the `pages/api` directory, create a file `search.js` and use the code snippet as follows: + +```jsx +import axios from 'axios'; + +export default async function handler(req, res) { + const options = { + method: 'GET', + url: `https://nameauditor-whois-check.p.rapidapi.com/whois/${req.query.keyword}`, + headers: { + 'x-rapidapi-host': 'nameauditor-whois-check.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + res.status(500).json(error.response.data.payload); + }); +} +``` + +We have specified the parameter `req.query.keyword`. `req.query` is an object that holds the input parameters coming from our client-side. Our API call is ready. + +Now we need to create a function, say `getDomainInfo` in the `pages/index.js` file to send a request to our API `http://localhost:3000/api/search`. We want this function to be triggered using the search button or enter key. Let's make these changes to the index file. + +```jsx +import axios from 'axios'; +import {useState} from 'react'; + +export default function Home() { + const [keyword, setKeyword] = useState(null); + const [response, setResponse] = useState(null); + /** + * Fetches domain information for an input keyword + */ + const getDomainInfo = async () => { + try { + const res = await axios.get('api/search/', { + params: {keyword} + }); + const {data} = res; + setResponse(data); // Store the response + } catch (error) { + console.log(error); + } + }; + + return ( +
+

+ Domain Search +

+

+ Check availability and information of any domain. +

+
{ + getDomainInfo(); + e.preventDefault(); // Prevent reloading on submit + e.stopPropagation(); + }} + > + { + setKeyword(e.target.value); + setResponse(null); + }} + /> +
+ +
+
+
+ ); +} +``` + +We are storing the API Response in the `response` state. + +### → FINAL STEP + +In the final step, we will display the results. You can use the **Test Endpoint** button on the [RapidAPI Hub page](https://rapidapi.com/nameauditor/api/nameauditor-whois-check/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) of the API to see the shape of the response. In our case, an example response looks like this: + +![Example Response](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-domain-app/images/example.png) + +We are going to traverse the `payload` object in the response, and show the details in a table. Finally, I also implemented loading and error states. Here is the final code of our app: + +```jsx +import axios from 'axios'; +import {useState} from 'react'; + +export default function Home() { + const [keyword, setKeyword] = useState(null); + const [response, setResponse] = useState(null); + const [errorInfo, setErrorInfo] = useState(false); + const [loading, setLoading] = useState(false); + + const getDomainInfo = async () => { + try { + setLoading(true); + const res = await axios.get('api/search/', { + params: {keyword} + }); + const {data} = res; + setLoading(false); + setResponse(data); + } catch (error) { + setLoading(false); + setErrorInfo(error.response.data); + } + }; + + return ( +
+

+ Domain Search +

+

+ Check availability and information of any domain. +

+ +
{ + getDomainInfo(); + e.preventDefault(); + e.stopPropagation(); + }} + > + { + setKeyword(e.target.value); + setResponse(null); + setErrorInfo(null); + }} + /> +
+ +
+
+ {errorInfo && ( +
+

+ Error: {errorInfo} +

+
+ )} + {response && ( +
+

+ The domain {keyword} is{' '} + {response.payload.availability === 'available' ? ( + available + ) : ( + not available + )} +

+ { + // If domain is already registered, show its details + response.payload.availability !== 'available' && ( +
+

+ Details: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Domain + + {response.payload.full} +
+ Status + + {response.payload.availability} +
+ Registrant + + { + response.payload + .registrar_name + } +
+ Created On + + {new Date( + response.payload.creation_date // Converting to dd/mm/yyyy format + ).toLocaleDateString()} +
+ Expires After + + { + response.payload + .time_to_expire + } +
+ Updated + + { + response.payload + .time_since_last_update + }{' '} + ago +
+
+ ) + } +
+ )} +
+ ); +} +``` + +This is what our app looks like in its final form: + +![Domain App built using NameAuditor WHOIS API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/production/guides/posts/build-domain-app/images/domain-app.png) + +## Wrap Up + +All done. Our [Domain Search App](https://rapidapi-example-domain-app.vercel.app/) is ready. Find the code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/domain-app). diff --git a/guides/posts/build-email-validator-app/images/code-snippet.png b/guides/posts/build-email-validator-app/images/code-snippet.png new file mode 100644 index 00000000..16bcc19f Binary files /dev/null and b/guides/posts/build-email-validator-app/images/code-snippet.png differ diff --git a/guides/posts/build-email-validator-app/images/cover.png b/guides/posts/build-email-validator-app/images/cover.png new file mode 100644 index 00000000..607366f6 Binary files /dev/null and b/guides/posts/build-email-validator-app/images/cover.png differ diff --git a/guides/posts/build-email-validator-app/images/subscribe.png b/guides/posts/build-email-validator-app/images/subscribe.png new file mode 100644 index 00000000..7fb0a958 Binary files /dev/null and b/guides/posts/build-email-validator-app/images/subscribe.png differ diff --git a/guides/posts/build-email-validator-app/post.md b/guides/posts/build-email-validator-app/post.md new file mode 100644 index 00000000..221a8870 --- /dev/null +++ b/guides/posts/build-email-validator-app/post.md @@ -0,0 +1,372 @@ +--- +title: How to build an Email Validator App Using Next.js and Email Validator API? +description: In this piece, I am going to show you how you can build an email validator app using an API from RapidAPI Hub and Next.js. +publishedDate: 2021-11-12T20:22:52.607Z +lastModifiedDate: 2021-11-12T20:22:52.607Z +authors: + - saad +categories: + - apps +tags: + - email-validator-app +coverImage: '' +--- + +You often receive spam emails that sometimes contain harmful content or links. We usually ignore these kinds of emails, but it can also happen that a few critical emails may end up in spam. And having these emails in spam makes us doubt their validity. You can build an application around this use case using an API from [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +[RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides you with thousands of these public APIs that you can use in your apps. Many APIs on [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) have free versions available, but you can also buy a premium version if the free version does not satisfy your need. + +Today, I am building an email validator application that will take an email and provide us with different information about its validity. So without any further ado, let’s jump in. + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the client-side and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to fetch the email validity information. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?tm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “email validity” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to all the available APIs that provide this service. For this piece, I am using [E-mail Check Invalid or Disposable Domain API](https://rapidapi.com/Top-Rated/api/e-mail-check-invalid-or-disposable-domain?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on **Subscribe to Test** button. + +![Subscribe to IMDb API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/0f687aead197486a85c58dbdbc66ce0c3e0ee2ca/guides/posts/build-email-validator-app/images/subscribe.png) + +Once you click the button, you will be redirected to another page where different available subscription packages will be shown. Let’s go with the free one for now. + +After all this, you will be redirected back to the original page. Here you will have a key `x-rapidapi-key`. Save it. It will be used later in the application. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss email-validator-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `email-validator-app` has been created. Open this folder in your preferred code editor. I am going to use [VSCode](https://code.visualstudio.com/) for the project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](​​https://github.com/RapidAPI/DevRel-Examples-External/blob/main/email-validator-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```js +export default function Home() { + return ( +
+

+ Email Validator App +

+

+ Check if an email address exists or not +

+
+ ); +} +``` + +It will create two headings for you with the text “Email Validator App” and “Check if an email address exists or not”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create an input field and a validate button. The user will be able to type in the input field and use the validate button to check the email validity. + +For this, copy the following code and paste it in `pages/index.js`: + +```js +export default function Home() { + return ( +
+

+ Email Validator App +

+

+ Check if an email address exists or not +

+
+
checkValidity(e)} + > + setEmail(e.target.value)} + /> + +
+
+
+ ); +} +``` + +This code is going to create an input field and button. I have also styled them a little bit using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Let’s create some states to store the user input and the response we will receive from the API. For this, copy-paste the following code in `pages/index.js`. + +```js +import {useState} from 'react'; + +export default function Home() { + const [email, setEmail] = useState(''); + const [res, setRes] = useState(false); + + return ( +
+

+ Email Validator App +

+

+ Check if an email address exists or not +

+
+
checkValidity(e)} + > + setEmail(e.target.value)} + /> + +
+
+
+ ); +} +``` + +You can see that I have added an `onChange` event handler to set the state value as soon as the user writes something in the input field. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [E-mail Check Invalid or Disposable Domain API](https:/RapidAPI.com/Top-Rated/api/e-mail-check-invalid-or-disposable-domain?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` to your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +We will use the `mailcheck` endpoint of the [E-mail Check Invalid or Disposable Domain API](https://RapidAPI.com/Top-Rated/api/e-mail-check-invalid-or-disposable-domain?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) to get the API response. + +I am also going to use the code snippet of `(JavaScript) Axios` that [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) provides us. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/0f687aead197486a85c58dbdbc66ce0c3e0ee2ca/guides/posts/build-email-validator-app/images/code-snippet.png) + +Create a file called `validate` in the `pages/api` directory and copy-paste the following code there: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://mailcheck.p.rapidapi.com/', + params: {domain: req.query.email}, + headers: { + 'x-rapidapi-host': 'mailcheck.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +Now let’s create a function in the `pages/index.js` file to request the `/api/validate` for the email validity information. You can just copy and replace the following code in `pages/index.js` file: + +```js +import {useState} from 'react'; +import axios from 'axios'; + +export default function Home() { + const [email, setEmail] = useState(''); + const [res, setRes] = useState(false); + + /** + * + * + * Checks validity of en email + */ + const checkValidity = async e => { + e.preventDefault(); + try { + const res = await axios.get(`/api/validate`, { + params: {email} + }); + const {data} = res; + setRes(data); + } catch (err) { + console.log(err); + } + }; + + return ( +
+

+ Email Validator App +

+

+ Check if an email address exists or not +

+
+
checkValidity(e)} + > + setEmail(e.target.value)} + /> + +
+ {res && ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Information + + + + Result + +
Valid + {res.valid.toString()} +
+ Disposable + + {res.disposable.toString()} +
Domain + {res.domain} +
Text + {res.text} +
Reason + {res.reason} +
+
+ )} +
+
+ ); +} +``` + +You can see that I have created a function, `checkValidity`, to get the API response. I have also created a table that is conditionally rendered on the screen based on the API results. + +## Wrap Up + +That’s it. We have successfully built a [Email Validator App](https://rapidapi-example-email-validator-app.vercel.app/) using [E-mail Check Invalid or Disposable Domain API](https://RapidAPIcom/Top-Rated/api/e-mail-check-invalid-or-disposable-domain?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the source code [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/email-validator-app) of this web app. + +In the end, it will look something like this: + +![Email Validator App built with Next.js and E-mail Check Invalid or Disposable Domain API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/0f687aead197486a85c58dbdbc66ce0c3e0ee2ca/guides/posts/build-email-validator-app/images/cover.png) diff --git a/guides/posts/build-food-nutrient-app/images/code-snippet.png b/guides/posts/build-food-nutrient-app/images/code-snippet.png new file mode 100644 index 00000000..a726c01e Binary files /dev/null and b/guides/posts/build-food-nutrient-app/images/code-snippet.png differ diff --git a/guides/posts/build-food-nutrient-app/images/cover.png b/guides/posts/build-food-nutrient-app/images/cover.png new file mode 100644 index 00000000..254bb0f0 Binary files /dev/null and b/guides/posts/build-food-nutrient-app/images/cover.png differ diff --git a/guides/posts/build-food-nutrient-app/post.md b/guides/posts/build-food-nutrient-app/post.md new file mode 100644 index 00000000..ac61897a --- /dev/null +++ b/guides/posts/build-food-nutrient-app/post.md @@ -0,0 +1,421 @@ +--- +title: How to build a Food Nutrient App using Calorie Ninja API? +description: You often need to find out what kind of nutrients a particular food contains. In this piece, we are building a small web app just for this using an API from RapidAPI Hub. +publishedDate: 2022-01-17T04:02:09.132Z +lastModifiedDate: 2022-01-17T04:02:09.132Z +authors: + - saad +categories: + - apps +tags: + - rapidapi + - nutrient-app + - food-nutrient +coverImage: '' +--- + + + +You often need to find out what kind of nutrients a particular food contains. There any many calculators available on the internet. But you can build your own using an API from [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + + + +Today, I am building a food nutrient app that will show the user quantity of different nutrients present in a food. So without any further ado, let’s jump in! + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the frontend and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to search for food nutrients. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “food nutrients” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to food APIs. For this piece, I am using [CalorieNinja API](https://rapidapi.com/calorieninjas/api/calorieninjas?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +It is a free API, so you do not need to subscribe to it. However, you will need your RapidAPI key. Go ahead and save the `x-rapidapi-key` so you can use it later. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss food-nutrient-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `food-nutrient-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called - `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/food-nutrient-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```jsx +export default function Home() { + return ( +
+

+ Food Nutrient App +

+

+ Shows Different Nutrient Quantity in A Food +

+
+ ); +} +``` + +It will create two headings for you with the text “Food Nutrient App” and “Shows Different Nutrient Quantity in A Food”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create an input field and a search button. The user will be able to type the food name in the input box and use the search button to get the nutrient details. + +For this, copy the following code and paste it in `pages/index.js`: + +```jsx +export default function Home() { + return ( +
+

+ Food Nutrient App +

+

+ Shows Different Nutrient Quantity in A Food +

+
+
+ + +
+
+
+ ); +} +``` + +This code is going to create an input field and button. I have also styled them a little bit using [TailwindCSS](<(https://tailwindcss.com/)>). + +### → STEP #3 + +Let’s create some states to store the food name and the nutrient details that we will receive from the API. For this, copy-paste the following code in `pages/index.js`. + +```jsx +import {useState} from 'react'; + +export default function Home() { + return ( +
+

+ Food Nutrient App +

+

+ Shows Different Nutrient Quantity in A Food +

+
+
+ setName(e.target.value)} + /> + +
+
+
+ ); +} +``` + +You can see that I have added an `onChange` event handler to set the state value as soon as the user types something in the input box. + +### → STEP #4 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [CalorieNinja API](https://rapidapi.com/calorieninjas/api/calorieninjas?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` in your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #5 + +RapidAPI Hub provides you with code snippets in different languages for integrating the API. I am going to use the `(JavaScript) Axios` one. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/543850dc152729797a102841c58e4bce9278f26c/guides/posts/build-food-nutrient-app/images/code-snippet.png) + +Now create a file with the name `nutrient.js` inside the `pages/api` directory. It is going to create a REST API endpoint for you. The endpoint point will look like this: + +```sh +http://localhost:3000/api/nutrient +``` + +Now copy the following code in this file: + +```js +import axios from 'axios'; + +export default function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://calorieninjas.p.rapidapi.com/v1/nutrition', + params: {query: req.query.name}, + headers: { + 'x-rapidapi-host': 'calorieninjas.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +This code makes an API call to the [CalorieNinja API](https://rapidapi.com/calorieninjas/api/calorieninjas?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) on the server and returns the results to the user. It executes when the user makes an API call to the `nutrient` endpoint I mentioned above. + +Once you are done, copy the following code in the `pages/index.js` file: + +```jsx +import {useState} from 'react'; +import axios from 'axios'; + +export default function Home() { + const [name, setName] = useState(''); + const [res, setRes] = useState(null); + + /** + * + * + * Fetch nutrient information of a given food + */ + const fetchNutrients = async e => { + e.preventDefault(); + try { + const res = await axios.get(`/api/nutrient`, { + params: { + name + } + }); + setRes(res.data.items[0]); + } catch (err) { + console.log(err); + } + }; + + return ( +
+

+ Food Nutrient App +

+

+ Shows Different Nutrient Quantity in A Food +

+
+
+ setName(e.target.value)} + /> + +
+ {res && ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Nutrient + + Quantity +
+ Calories + + {res.calories} +
+ Carbohydrates + + {res.carbohydrates_total_g} g +
+ Cholesterol + + {res.cholesterol_mg} mg +
+ Fat Saturated + + {res.fat_saturated_g} g +
+ Total Fat + + {res.fat_total_g} g +
+ Fiber + + {res.fiber_g} g +
+ Potassium + + {res.potassium_mg} mg +
+ Protein + + {res.protein_g} g +
+ Serving Size + + {res.serving_size_g} g +
+ Sodium + + {res.sodium_mg} mg +
+ Sugar + + {res.sugar_g} g +
+
+ )} +
+
+

+ Made by RapidAPI DevRel Team -{' '} + + See more examples like this + +

+
+
+ ); +} +``` + +You can see that I have created a function, `​​fetchNutrients`, to request the API. I have also created a piece of UI that is conditionally rendering on the screen based on the `res` state variable’ value. + +## Wrap Up + +That’s it. We have successfully built an [Food Nutrient App](https://rapidapi-example-food-nutrient-app.vercel.app/) using [CalorieNinjas API](https://RapidAPI.com/calorieninjas/api/calorieninjas?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the source code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/food-nutrient-app). + +In the end, it will look something like this: + +![Food Nutrient App built with Next.js and CalorieNinjas API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/543850dc152729797a102841c58e4bce9278f26c/guides/posts/build-food-nutrient-app/images/cover.png) diff --git a/guides/posts/build-game-news-app/images/code-snippet.png b/guides/posts/build-game-news-app/images/code-snippet.png new file mode 100644 index 00000000..861ec93f Binary files /dev/null and b/guides/posts/build-game-news-app/images/code-snippet.png differ diff --git a/guides/posts/build-game-news-app/images/cover.png b/guides/posts/build-game-news-app/images/cover.png new file mode 100644 index 00000000..31ebdbfa Binary files /dev/null and b/guides/posts/build-game-news-app/images/cover.png differ diff --git a/guides/posts/build-game-news-app/post.md b/guides/posts/build-game-news-app/post.md new file mode 100644 index 00000000..244bda05 --- /dev/null +++ b/guides/posts/build-game-news-app/post.md @@ -0,0 +1,237 @@ +--- +title: How to build a Game News App using Gaming News API? +description: In this piece, I am going to teach you how to build a small application that will display only game related news to the user. +authors: + - saad +categories: + - apps +tags: + - game-news-app + - app +publishedDate: 2022-01-10T10:25:51.945Z +lastModifiedDate: 2022-01-10T10:25:51.945Z +coverImage: '' +--- + + + +If you are a gamer like me then you would want to stay up-to-date with all the things happening in the game market. We can build a small application to gather all the news at one place. + + + +Today, I am building a game news application where all the news related to the gaming industry will be displayed. So without any further ado, let’s jump in! + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the frontend and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to search for games news. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “game news” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to validation APIs. For this piece, I am using [Gaming-News API](https://RapidAPI.com/alexaustin9816@gmail.com/api/gaming-news/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +It is a free API, so you do not need to subscribe to it. However, you will need your RapidAPI key. Go ahead and save the `x-rapidapi-key` so you can use it later. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss game-news-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `game-news-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called - `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/game-news-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along. + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```jsx +export default function Home() { + return ( +
+

+ Game News App +

+

+ Take a look at what is happening in the game world +

+
+ ); +} +``` + +It will create two headings for you with the text “Game News App” and “Take a look at what is happening in the game world”. You can change it to anything you prefer. + +### → STEP #2 + +Let’s integrate the API now. For this, first, create a `.env.local` file and paste the following in it: + +```sh +NEXT_PUBLIC_RAPIDAPI_KEY=YOUR-RAPIDAPI-KEY +``` + +You need to replace `YOUR-RAPIDAPI-KEY` here with the API key you got when you subscribed to the [Gaming-News API](https://RapidAPI.com/alexaustin9816@gmail.com/api/gaming-news/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). It is the value of `x-rapidapi-key` that you saved earlier. + +Now download and add `axios` in your project. For this, run the following command in the terminal: + +```sh +npm install axios +``` + +Now import `axios` at the top of the `pages/index.js`. + +```js +import axios from ‘axios’; +``` + +### → STEP #3 + +RapidAPI Hub provides you with code snippets in different languages for integrating the API. I am going to use the `(JavaScript) Axios` one. + +![Fetching data using (JavaScript) Axios](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/9a5df4ccbcbedabedd630cb84c1e7b9a91b9e213/guides/posts/build-game-news-app/images/code-snippet.png) + +Now create a file with `news.js` inside the `pages/api` directory. It is going to create a REST API endpoint for you. The endpoint point will look like this: + +```sh +http://localhost:3000/api/news +``` + +Now copy the following code in this file: + +```js +import axios from 'axios'; + +export default async function handler(req, res) { + if (req.method === 'GET') { + const options = { + method: 'GET', + url: 'https://gaming-news.p.rapidapi.com/news', + headers: { + 'x-rapidapi-host': 'gaming-news.p.rapidapi.com', + 'x-rapidapi-key': process.env.NEXT_PUBLIC_RAPIDAPI_KEY + } + }; + + axios + .request(options) + .then(function (response) { + res.status(200).json(response.data); + }) + .catch(function (error) { + console.error(error); + }); + } else { + res.status(400); + } +} +``` + +This code makes an API call to the [Gaming-News API](https://RapidAPI.com/alexaustin9816@gmail.com/api/gaming-news/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) on the server and returns the results to the user. It executes when the user makes an API call to the `news` endpoint I mentioned above. + +Once you are done, copy the following code in the `pages/index.js` file: + +```jsx +import axios from 'axios'; +import Link from 'next/link'; + +export default function Home({value}) { + return ( +
+

+ Game News App +

+

+ Take a look at what is happening in the game world +

+ {value.map(news => { + return ( + + ); + })} +
+

+ Made by RapidAPI DevRel Team -{' '} + + See more examples like this + +

+
+
+ ); +} + +export async function getServerSideProps() { + const res = await axios.get('http://localhost:3000/api/news'); + const {data: value} = res; + + if (!value) { + return { + notFound: true + }; + } + + return { + props: { + value + } + }; +} +``` + +I am using the Next.js `getServerSideProps` function to fetch the data from the server. It will make my application server-side, and the user will never see a loading state. You can also use getStaticProps instead of getServerSideProps, and the application will then fetch the data at build time. + +Afterward, I am mapping the news I am getting from the `getServerSideProps` on the screen. + +## Wrap Up + +That’s it. We have successfully built a [Game News App](https://rapidapi-example-game-news-app.vercel.app/) using [Gaming-News API](https://RapidAPI.com/alexaustin9816@gmail.com/api/gaming-news/?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). You can find the source code of this web app [here](https://github.com/RapidAPI/DevRel-Examples-External/tree/main/game-news-app). + +In the end, it will look something like this: + +![Game News App built with Next.js and Game News API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/9a5df4ccbcbedabedd630cb84c1e7b9a91b9e213/guides/posts/build-game-news-app/images/cover.png) diff --git a/guides/posts/build-grammar-checker-app/images/code-snippet.png b/guides/posts/build-grammar-checker-app/images/code-snippet.png new file mode 100644 index 00000000..987893d0 Binary files /dev/null and b/guides/posts/build-grammar-checker-app/images/code-snippet.png differ diff --git a/guides/posts/build-grammar-checker-app/images/cover.png b/guides/posts/build-grammar-checker-app/images/cover.png new file mode 100644 index 00000000..cc03308e Binary files /dev/null and b/guides/posts/build-grammar-checker-app/images/cover.png differ diff --git a/guides/posts/build-grammar-checker-app/images/subscribe.png b/guides/posts/build-grammar-checker-app/images/subscribe.png new file mode 100644 index 00000000..8e3ba3ec Binary files /dev/null and b/guides/posts/build-grammar-checker-app/images/subscribe.png differ diff --git a/guides/posts/build-grammar-checker-app/post.md b/guides/posts/build-grammar-checker-app/post.md new file mode 100644 index 00000000..dd4f7598 --- /dev/null +++ b/guides/posts/build-grammar-checker-app/post.md @@ -0,0 +1,347 @@ +--- +title: How to build a Grammar Check App using GrammarBot API? +description: 'You often have to write essays, articles, reports. Whether you are a student or a professional, it is a good idea to check your pieces via some application. So today, we will build a grammar checker app that will check our content for grammar errors.' +authors: + - saad +categories: + - apps +tags: + - grammar-checker-app + - rapidapi + - app +publishedDate: 2022-02-07T08:22:37.323Z +lastModifiedDate: 2022-02-07T08:22:37.323Z +coverImage: '' +--- + + + +You often have to write essays, articles, reports. Whether you are a student or a professional, it is a good idea to check your pieces via some application to ensure there is no grammatical error. We can build a small application for this using an API from [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + + + +So in this piece, I am building a grammar checker app that will show us different grammar errors. So without any further ado, let’s jump in! + +## Stack + +We need to choose a stack first to build this application. I have decided to go with the [Jamstack](https://jamstack.org/). + +I am going to use [Next.js](https://nextjs.org/) for the frontend and [TailwindCSS](https://tailwindcss.com/) for the styling. + +If you don’t know about Next.js, it is a JavaScript framework built on top of React and provides features like server-side rendering, static site generation, etc. Tailwind is a CSS framework that provides utility classes to speed up the development process. + +## Choosing The API + +Let’s find an API that we can use to check the grammar. Go to [RapidAPI Hub](https://RapidAPI.com/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) and [create an account](https://RapidAPI.com/auth/sign-up?referral=/hub?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel) if you haven’t already and then search for “grammar api” in the search section. + + + Learn more about how to use RapidAPI Hub. + + +You will see different search results related to grammar APIs. For this piece, I am using [GrammarBot API](https://RapidAPI.com/grammarbot/api/grammarbot?utm_source=RapidAPI.com/guides&utm_medium=DevRel&utm_campaign=DevRel). + +To use this API, you need to subscribe to it first. You can do this by clicking on **Subscribe to Test** button. + +![Subscribe to GrammarBot API](https://raw.githubusercontent.com/RapidAPI/DevRel-Stack-Data/9194737c75ae7ee099d20ee7c37ebaec87970f86/guides/posts/build-grammar-checker-app/images/subscribe.png) + +Once you click the button, you will be redirected to another page where different available subscription packages will be shown. Let’s go with the free one for now. + +After all this, you will be redirected back to the original page. Here you will have a key `x-rapidapi-key`. Save it. It will be used later in the application. + +## Building The UI + +You can create a Next.js boilerplate with TailwindCSS integrated by running the following command in your terminal. So let’s do that. + +```sh +npx create-next-app -e with-tailwindcss grammar-checker-app +``` + +This command is going to take a minute to set everything up. After generating the boilerplate, you will see a folder with the name `grammar-checker-app` has been created. Open this folder in your preferred code editor. I will use [VSCode](https://code.visualstudio.com/) for this project. + +### Project Files + +When you open the project in your code editor, you will see the following directories and files in the root directory: + +- `pages` directory: Inside it, you will have files `index.js`, `_app.js`, and another directory called `api`. You only need to know about the `index.js` file that is the main entry point in your project. +- `public` directory: This directory contains icons. You place your static files here to load later in the application. +- `node_modules`: It’s another directory that contains all the node modules you are using in your application. +- `package.json`: This file contains the metadata of your project. +- `package-lock.json`: This file is responsible for tracking the exact version of every installed package. +- `postcss.config.js`: This file contains [PostCSS](https://github.com/postcss/postcss) configurations. +- `tailwind.config.js`: It contains [TailwindCSS](https://tailwindcss.com/) configurations. +- `readme.md`: It’s a markdown file for documentation. + +Before we move on to writing the code, open [this](https://github.com/RapidAPI/DevRel-Examples-External/blob/main/grammar-checker-app/tailwind.config.js) file, and copy all of its content, then paste it inside the `tailwind.config.js` file in your project. These are some TailwindCSS configurations I have done specifically for this project. I have added some colors that you do not have by default with TailwindCSS and set some screen sizes. + +Now let’s start writing the code. I am going to do it in steps so you can follow along: + +### → STEP #1 + +Open the `pages/index.js` file and remove all the existing code. After this, copy-paste the following code there: + +```jsx +export default function Home() { + return ( +
+

+ Grammar Checker App +

+

+ Check to see if what you have written is Grammarly correct +

+
+ ); +} +``` + +It will create two headings for you with the text “Grammar Checker App” and “Check to see if what you have written is Grammarly correct”. You can change it to anything you prefer. + +### → STEP #2 + +Now let’s create two text areas, one for user content and the other to show the grammar mistakes, and a check button. For this, copy the following code and paste it in `pages/index.js`: + +```jsx +export default function Home() { + return ( +
+

+ Grammar Checker App +

+

+ Check to see if what you have written is Grammarly correct +

+
+