Update IUCN Red List API endpoint to v4
Replit-Commit-Author: Agent Replit-Commit-Session-Id: e931b5ab-041b-42e7-baf1-50017869cef6 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/e19c6a51-7e4c-4bb8-a6a6-46dc00f0ec99/84f6ff7e-917a-4db8-bbd7-a6d3e935090c.jpg
This commit is contained in:
@ -323,7 +323,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Check if the API is working by hitting the version endpoint
|
// Check if the API is working by hitting the version endpoint
|
||||||
const response = await axios.get("https://apiv4.iucnredlist.org/api/v4/information/api_version", {
|
const response = await axios.get("https://api.iucnredlist.org/api/v4/information/api_version", {
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": `Bearer ${iucnToken}`
|
"Authorization": `Bearer ${iucnToken}`
|
||||||
}
|
}
|
||||||
@ -400,7 +400,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Use the v4 API with scientific name endpoint
|
// Use the v4 API with scientific name endpoint
|
||||||
const response = await axios.get("https://apiv4.iucnredlist.org/api/v4/taxa/scientific_name", {
|
const response = await axios.get("https://api.iucnredlist.org/api/v4/taxa/scientific_name", {
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": `Bearer ${iucnToken}`
|
"Authorization": `Bearer ${iucnToken}`
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user