Defining API Calls
Last updated
Last updated
In this step, we'll add all the required data and logic to make the app functional. For your ease, we have hosted the API on our servers for seamless responses.
First, from the Side Navigation Menu, go to the API Call section. Click on "Add", and then "Add new API".
Inside the Call Definition, enter the API Name, "Courses". The HTTP Method as GET, and provide the API Url as: https://strapi.digia.tech/api/courses and then press save.
Similarly, make a new API Call for Articles, enter the name, GET Request, and provide the API Url as: https://strapi.digia.tech/api/articles
For this, we also need to provide a variable to make sure we obtain the correct articles for the courses. Go to the Variables Tab inside the Call Definition, and click on Add Variable.
Enter the values as,
Name: courseName
Type: String
Is List: False
Default Value: flutter
Now, we have correctly defined our API Calls, and we can fetch data from them. We can now proceed to building the Courses page, and fetching data from the APIs.