Last active
March 5, 2024 12:58
-
-
Save anuragts/3032df0b387aefc863c3102640cf9642 to your computer and use it in GitHub Desktop.
how to fetch crackeddevsapi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
const API_KEY:string = '9488653d.....' // YOUR CRACKEDDEVS API KEY HERE | |
const LIMIT:number = 2 // No of jobs to fetch , can remove ?limit from url to get all jobs | |
const ACTIVE = true | |
export async function crackeddevs() { | |
const response = await axios.get( | |
`https://api.crackeddevs.com/api/get-jobs?limit=${LIMIT}&active=${ACTIVE}`, | |
{ | |
headers: { | |
'api-key': `${API_KEY}`, // API KEY HERE | |
}, | |
} | |
); | |
console.log(response.data); // get the data from the response | |
return response.data; | |
}; | |
crackeddevs() // function call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment