Fetch News Info
Example code is provided for both JavaScript , along with a response schema.
Route Schema (URL)
https://api.pewds.vercel.app/prothomalo/info/:idpath Parameters
| Parameter | Type | Description | Required? | Default |
|---|---|---|---|---|
| id | string | This is the ID of the news story that will be returned in the function. Example: "5214a22c-e5ae-4b55-9edf-53dbc2eeba46" | Yes | N/A |
Request Samples
import axios from "axios";
const url = "https://api.pewds.vercel.app/prothomalo/info/5214a22c-e5ae-4b55-9edf-53dbc2eeba46";
const data = async () => {
try {
const { data } = await axios.get(url);
return data;
} catch (err) {
throw new Error(err.message);
}
};
console.log(data);Response Schema
MIME Type: application/json
[
{
id: "string",
title: "string",
uploadedAt: "string",
intro: "string",
description: "string",
thumbnail: "string",
url: "string"
}
]