Felix Kling

Felix Kling

1661305923

How to Create a Serverless API with Next.js, Vercel and Prisma

BUILD AND SELL an API with Next.js, Vercel, Prisma and RapidAPI. Learn how to create a Serverless API with Next.js, Vercel and Prisma. Register this API in RapidAPI so that you can charge for access to your API.

Timestamps

00:00 - Intro
00:15 - What We’ll Build
00:55 - Sponsor Shoutout (RapidAPI)
01:05 - Resources
01:50 - Database Setup in PlanetScale
02:30 - Create a New Next.js Project with TypeScript
03:45 - Setup Prisma with Next.js
05:00 - Configuring Prisma with PlanetScale
06:20 - Database Schema
07:00 - Seed the Database
10:30 - Scaffolding API Next.js Endpoints
11:47 - Testing API Endpoints with the RapidAPI Client VS COde Extension
12:52 - Prisma Client Setup
14:16 - Integrating Prisma Client in Next.js API Endpoint
15:15 - Add Query Parameters and Validation to API Endpoint
18:28 - Adding Config Parameters to Prisma Query
20:25 - Dynamic API Route in Next.js
23:49 - Deploy to Vercel
23:50 - Create New Github Repository
24:44 - Deploy and Host in Vercel
25:53 - Multiple Builds in Vercel
29:10 - Publishing API to RapidAPI
30:22 - Define Endpoints in RapidAPI
32:05 - Monetizing Your API in RapidAPI
34:20 - Wrap Up

RapidAPI Studio - https://rapidapi.com/studio

Rapid API Client VS Code Extension - https://marketplace.visualstudio.com/items?itemName=RapidAPI.vscode-rapidapi-client 

Resources
Github Repository - https://github.com/jamesqquick/nextjs-throne-of-glass-api 

#serverless #api #nextjs #vercel #prisma #rapidapi

How to Create a Serverless API with Next.js, Vercel and Prisma
Mireille  Von

Mireille Von

1638489600

What Is Rapid API and How to Use It

This video covers what is Rapid API and how you can leverage it to consume APIs from this marketplace
#api #rapidapi 

What Is Rapid API and How to Use It
Sasha  Hall

Sasha Hall

1635213600

Build A Full Working API In Django and Publicizing IT On RapidAPI

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.

⭐️ Course Contents ⭐️
⌨️ (0:00:00) Intro     
⌨️ (0:01:02) Build An API In Django
⌨️ (0:22:59) Deploy A Django API To Heroku
⌨️ (0:39:37) Putting Our API On RapidAPI Hub

#django  #rapidapi  #heroku 

 Build A Full Working API In Django and Publicizing IT On RapidAPI

RapidAPI Testing Tool - What Is It and How Does It Work?

In this video, we’ll create some API tests and integrate it with Github actions using the new Rapid API Testing Tool.

🔗Video Resources:
Rapid API Testing - https://rapidapi.com/products/api-testing/
API Testing Site - https://gorest.co.in/
GitHub Repository - https://github.com/automationbro/rapid-api-test

0:00 - Rapid API Introduction
1:03 - Rapid API Testing Tool Introduction
1:40 - Create API Test for the GET method
6:15 - Create API Test for the POST method
12:30 - Group test steps in folders
13:10 - Pass variable to another test step
16:45 - Create an environment variable
18:50 - Add Schedule
19:49 - Integrate tests with Github actions
22:28 - Review

Thanks for watching :)

Automation Bro

#rapidapi #testing #automation

RapidAPI Testing Tool - What Is It and How Does It Work?
Meghal Raval

Meghal Raval

1621998275

How To Manage Multiple APIs with RapidAPI (2021)

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.

Code Repo: https://github.com/codeSTACKr/RapidAPI_Demo

⏱️ Timestamps ⏱️

  • 00:00 - Intro
  • 01:00 - RapidAPI Marketplace
  • 02:29 - Project Setup (Vite.js)
  • 03:58 - index.html
  • 04:30 - main.js setup
  • 06:18 - Geo Location API
  • 08:01 - Open Weather API
  • 11:33 - Chuck Norris API
  • 13:11 - Breaking News API

#rapidapi #api #tailwind #vite #tailwindcss

How To Manage Multiple APIs with RapidAPI (2021)
Automation Bro

Automation Bro

1604841285

RapidAPI Testing Tool – What is it & How does it work?

The RapidAPI team recently came out with its new RapidAPI testing tool. In this post, we’ll take a look at some of the key features of this tool and walk through how it works.

What is RapidAPI?

RapidAPI is a large API marketplace with over 20 thousand APIs. So if you are looking to integrate a particular type of API with your application, such as a weather API, SMS API, or an email service API, you’ll most likely find them here.

Rapid API will create one single API key for you which you can use for all the APIs that you are subscribed to. Additionally, you can also monitor the performance of all the APIs you are subscribed to in one single place.

Not only can you consume APIs here, but you can also publish them. This means if you or your company have built an API, you can publish it here for others to use through a free or paid subscription.

What is the RapidAPI Testing tool?

It is a cloud-based API testing tool that allows you to create comprehensive API tests that can validate REST, SOAP, and GraphQL APIs. The tool comes with some great features such as:

  • Create functional API tests really quickly using an interactive UI, without having to write a single line of code.
  • A centralized location to monitor all the APIs tests and the ability to run them in multiple geographical areas.
  • Support for integrating with the CI/CD pipeline through dedicated webhooks.

The best part is that they provide a free version that gives you up to 100k API calls per month. They also provide multiple paid plan options to choose from.

Now, let’s take a look at how we can create and run API tests in the RapidAPI testing tool.

Creating API Tests

To create a test, you pick your HTTP method, provide the URL, and in the variable field, you add in the variable name that will store the API response.

get

From there, you can add another step to store your assertion and use the variable name to read the response (in this case, I am verifying 200 status code) –

run

Running API Tests

To run the test, you can hit the Save and Run button which will trigger your test run and generate a report for you –
results

This was a quick introduction to how the RapidAPI testing tool works. In the video below, I cover many other features and topics such as – creating random data, adding environment variables, running tests in GitHub, etc.

Overall, this tool has some great capabilities that can help you get your API tests set up in a quick and easy way. I would recommend trying this tool out on your own for your API tests. Tell me what you think about this tool in the comments below.


Check out this video to learn more about how the tool works and how to integrate it with GitHub actions –


To learn more about API testing and API Test Automation, check out my tutorial series below –

JavaScript API Test Automation Tutorial Series

Subscribe to my YouTube channel
Support my work – https://www.buymeacoffee.com/automationbro
Follow @automationbro on Twitter

#rapidapi #testing #api #automation

RapidAPI Testing Tool – What is it & How does it work?
Nico Jonsson

Nico Jonsson

1599528421

How to Create a Recipe App with Angular, Firebase and RapidAPI

Today, I will share my journey of building and hosting a Recipe app using Angular, Firebase (for hosting the angular app), and a public API called  Recipe-Food-Nutrition by  spoonacular hosted at  RapidAPI.

As we are not going to discuss on how to set up an Angular application with material library and firebase, I would assume that you have good knowledge.

What are we about to learn?

  1. Setting up RapidAPI account
  2. Using RapidAPI to build a recipe search app in angular

1. Setting up RapidAPI account

Setting up  rapidapi account is pretty straight forward and it involves no fee. I would recommend joining using google account and once you are logged in search for food and you should see  Recipe-Food-Nutrition API. Currently, this API is popular so it should be your first result

Image for post

RapidAPI recipe-food-nutrition API search

#angular-animations #firebase #angular #material-design #rapidapi

How to Create a Recipe App with Angular, Firebase and RapidAPI

How I created a recipe app using Angular, Firebase and RapidAPI

Today, I will share my journey of building and hosting a Recipe app using Angular, Firebase (for hosting the angular app), and a public API called Recipe-Food-Nutrition by spoonacular hosted at RapidAPI.

As we are not going to discuss on how to set up an Angular application with material library and firebase, I would assume that you have good knowledge. Otherwise, I would recommend you to refer to my article.

How to setup Angular, Material & Firebase

A journey of thousand miles must begin with a single step - Lao Tzu

medium.com

What are we about to learn?

  1. Setting up RapidAPI account
  2. Using RapidAPI to build a recipe search app in angular

1. Setting up RapidAPI account

Setting up rapidapi account is pretty straight forward and it involves no fee. I would recommend joining using google account and once you are logged in search for food and you should see Recipe-Food-Nutrition API. Currently, this API is popular so it should be your first result

Image for post

RapidAPI recipe-food-nutrition API search

Once you click on the API, it will take you to API details and endpoints screen as below.

Image for post

Rapid API Recipe-Food-Nutrition API home screen

We have to subscribe before we can test any endpoint. So go ahead and hit subscribe to test.

Image for post

Recipe-Food-Nutrition API pricing page — Highlighting basic plan

Select a basic plan which will allow us to make 50 large and 500 tiny requests per day.

At this stage, you have noticed this API has a lot of endpoints but we are going to use “Autocomplete recipe search” and “Get recipe information”.

Image for post

#angular-animations #firebase #angular #material-design #rapidapi

How I created a recipe app using Angular, Firebase and RapidAPI
Autumn  Blick

Autumn Blick

1599353979

Develop and sell a Python API — from start to end tutorial

I recently read a blog post about setting up your own API and selling it.

I was quite inspired and wanted to test if it works. In just 5 days I was able to create an API from start to end. So I thought I share issues I came across, elaborate on concepts that the article was introducing, and provide a quick checklist to build something yourself. All of this by developing another API.

Table of Contents

About this article

This article can be considered as a tutorial and comprehension of other articles (listed in my “Inspiration” section).

It paints a picture for developing a Python API from start to finish and provides help in more difficult areas like the setup with AWS and Rapidapi.

I thought it will be useful for other people trying to do the same. I had some issues on the way, so I thought I share my approach. It is also a great way to build side projects and maybe even make some money.

As the Table of content shows, it consists of 4 major parts, namely:

  1. Setting up the environment
  2. Creating a problem solution with Python
  3. Setting up AWS
  4. Setting up Rapidapi

You will find all my code open sourced on Github:

You will find the end result here on Rapidapi:

If you found this article helpful let me know and/or buy the functionality on Rapidapi to show support.

Disclaimer

I am not associated with any of the services I use in this article.

I do not consider myself an expert. If you have the feeling that I am missing important steps or neglected something, consider pointing it out in the comment section or get in touch with me. Also, always make sure to monitor your AWS costs to not pay for things you do not know about.

I am always happy for constructive input and how to improve.

Stack used

We will use

  • Github (Code hosting),
  • Anaconda (Dependency and environment management),
  • Jupyter Notebook (code development and documentation),
  • Python (programming language),
  • AWS (deployment),
  • Rapidapi (market to sell)

1. Create project formalities

It’s always the same but necessary. I do it along with these steps:

  1. Create a local folder mkdir NAME
  2. Create a new repository on Github with NAME
  3. Create conda environment conda create --name NAME python=3.7
  4. Activate conda environment conda activate PATH_TO_ENVIRONMENT
  5. Create git repo git init
  6. Connect to Github repo. Add Readme file, commit it and
git remote add origin URL_TO_GIT_REPO
git push -u origin master

Now we have:

  • local folder
  • github repository
  • anaconda virtual environment
  • git version control

2. Create a solution for a problem

Then we need to create a solution to some problem. For the sake of demonstration, I will show how to convert an excel csv file into other formats. The basic functionality will be coded and tested in a Jupyter Notebook first.

Install packages

Install jupyter notebook and jupytext:

pip install notebook jupytext

sets a hook in .git/hooks/pre-commit for tracking the notebook changes in git properly:

#!/bin/sh

jupytext --from ipynb --to jupytext_conversion//py:light --pre-commit

Develop a solution to a problem

pip install pandas requests

Add a .gitignore file and add the data folder (data/) to not upload the data to the hosting.

Download data

Download an example dataset (titanic dataset) and save it into a data folder:

def download(url: str, dest_folder: str):
    if not os.path.exists(dest_folder):
        os.makedirs(dest_folder)

    filename = url.split('/')[-1].replace(" ", "_")
    file_path = os.path.join(dest_folder, filename)
    r = requests.get(url, stream=True)
    if r.ok:
        print("saving to", os.path.abspath(file_path))
        with open(file_path, 'wb') as f:
            for chunk in r.iter_content(chunk_size=1024 * 8):
                if chunk:
                    f.write(chunk)
                    f.flush()
                    os.fsync(f.fileno())
    else:
        print("Download failed: status code {}\n{}".format(r.status_code, r.text))
url_to_titanic_data = 'https://web.stanford.edu/class/archive/cs/cs109/cs109.1166/stuff/titanic.csv'
download(url_to_titanic_data,'./data')

Create functionality

Transform format

df = pd.read_csv('./data/titanic.csv')
df.to_json(r'./data/titanic.json')

Image for post

Conversion example in Jupyter Notebook

#rapidapi #aws-lambda #python #flask #api

Develop and sell a Python API — from start to end tutorial