Skip to content

This API can fetch 10 free courses and discount coupon from various sources like udemy, data lab etc.

Notifications You must be signed in to change notification settings

tuhinexe/freecourses_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation

Introduction

The FreecourseAPI is built with node.js/express. This API is simple yet useful and a very much easy to use. With different route end points this API can return 'Free udemy courses, Datacamp and amazon coupons' from real.discount API . This can be very much useful for developers and mostly students who are wanting to create any personal project related to this API, mainly this one is helpful cause there are currently no exclusive official API that provides the Free Coupon of Udemy courses data. This API returns a JSON object with all the details of courses like 'Course name','Price' and 'Url' as well.

Use Cases

There are many use cases are possible, such as

  • You can get the data of 10 FREE courses AND COUPONS each day and add the data to you personal website.
  • Create an webpage where users can get 'Course URL' so that they don't have to look for many sites individually.

Requests and Response

The API is not an RESTful API, there are no CURD operation available, it just takes an simple and cute get requests and returns you your wanted data. Though with differenct route points requests you can specify what data you want the API to fetch.

This is the main API endpoints: https://freecoursefetch.onrender.com

GET //freecoursefetch.onrender.com

Then you can go on and add your specific routes. Here are all the endpoints you can fetch the API from:

GET //freecoursefetch.onrender.com/courses
  • fetches Courses and returs you a JSON, This JSON contains a object full of other courses for a total of 10 courses.
GET //freecoursefetch.onrender.com/courses/course1
  • fetches only the Course1 JSON, which contains details like Course Image,Course Price,Sale Price,Course Name,Course Url and some more details like 'id' etc.
GET //freecoursefetch.onrender.com/courses/course2
  • fetches only the Course2 JSON contains same details as course 1.

  • Like above routes you can access total 10 routes upto https://freecoursefetch.onrender.com/courses/course9. There you can get separate JSON for every course.

Previews:

  • Home route preview

image

  • /courses route preview

image

  • Separate courses route previw i.e. /course/course1.

image

Responses

Here is JavaSript request format

fetch("https://freecoursefetch.onrender.com/")
  .then(response => data.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

the response json will return so many things:

if you have done console.log(result) it will be in console though.

fetch("https://freecoursefetch.onrender.com/courses")
  .then(response => data.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
fetch("https://freecoursefetch.onrender.com/courses/course1")
  .then(response => data.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
fetch("https://freecoursefetch.onrender.com/courses/course2")
  .then(response => data.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Status Codes

FreecoursesAPI returns the following status codes in its API:

Status Code Description
200 OK
400 BAD REQUEST
404 NOT FOUND

About

This API can fetch 10 free courses and discount coupon from various sources like udemy, data lab etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published