• Presenting Sponsor

  • Associate Sponsor

  • Associate Sponsor

  • Associate Sponsor

  • Associate Sponsor

  • Associate Sponsor

Bravehearts

{ var i = imageUrl.lastIndexOf("."); var newImageUrl = imageUrl.substr(0, i) + "_" + width + "x" + height + "" + pramrs + "" + imageUrl.substr(i) || ""; return newImageUrl.replace(/^http:\/\//i, "https://"); }; const fetchRecords = () => { const loadButton = document.getElementById("loadmorebtn"); loadButton.style.display = "none"; const ACCOUNT_ID = "site/501n6lm71l"; const URL = "https://3z6yrji2sb.execute-api.ap-south-1.amazonaws.com/v1/article/search/"; const searchParams = {}; let filters = []; const categoryId = "india-independence/indian-bravehearts"; searchParams.sort = [{"name": "publishedDate", "order": "desc"}] if (categoryId) { filters.push({ name: "categoryId", values: categoryId, }); } searchParams.filters = filters; searchParams.pagination = { pageSize: 10, pageNumber: pageNo, }; if (isNextPage) { fetch(URL, { method: "POST", headers: { "Content-Type": "application/json", "x-account-id": ACCOUNT_ID, }, body: JSON.stringify(searchParams), }) .then((response) => response.json()) .then((data) => { console.log("response zk", data); const articles = data.items; const nextPage = data.pagination.nextPageNumber; const hasMorePages = data.pagination.hasMorePages; const listElement = document.getElementById("india75-listing"); let html = ""; articles.forEach((article) => { html += ``; }); var z = document.createElement("div"); z.style.marginTop = "35px"; z.innerHTML = html; listElement.appendChild(z); pageNo = nextPage; isNextPage = hasMorePages; if (hasMorePages) { loadButton.style.display = "block"; } }); } };