Skip to content

Thiru-Malai/current-affairs-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Current Affairs API

This API provides the Current Affairs of India and International News and daily quizzes for practicing your skills on current affairs.

Features:

  1. International current affairs
  2. India’s current affairs
  3. Quiz for today
  4. Today in Indian History
  5. Current affair for any day ( dev )

Installation

npm install

Endpoints:

  1. /international-today
const axios = require('axios');

const options = {
  method: 'GET',
  url: 'https://current-affairs-of-india.p.rapidapi.com/international-today',
  headers: {
    'X-RapidAPI-Key': 'your-rapidapi-key',
    'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
  }
};

try {
	const response = await axios.request(options);
	console.log(response.data);
} catch (error) {
	console.error(error);
}
  1. /recent
const axios = require('axios');

const options = {
  method: 'GET',
  url: 'https://current-affairs-of-india.p.rapidapi.com/recent',
  headers: {
    'X-RapidAPI-Key': 'your-rapidapi-key',
    'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
  }
};

try {
	const response = await axios.request(options);
	console.log(response.data);
} catch (error) {
	console.error(error);
}
  1. /today-quiz
const axios = require('axios');

const options = {
  method: 'GET',
  url: 'https://current-affairs-of-india.p.rapidapi.com/today-quiz',
  headers: {
    'X-RapidAPI-Key': 'your-rapidapi-key',
    'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
  }
};

try {
	const response = await axios.request(options);
	console.log(response.data);
} catch (error) {
	console.error(error);
}
  1. /history-of-today
const axios = require('axios');

const options = {
  method: 'GET',
  url: 'https://current-affairs-of-india.p.rapidapi.com/history-of-today',
  headers: {
    'X-RapidAPI-Key': 'your-rapidapi-key',
    'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
  }
};

try {
	const response = await axios.request(options);
	console.log(response.data);
} catch (error) {
	console.error(error);
}

About

This API will provides you with Current Affairs of India

Resources

License

Stars

Watchers

Forks

Packages

No packages published