This file contains hidden or 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
| const https = require('node:https'); | |
| const PDFParser = require('pdf2json'); | |
| const url = require('node:url'); | |
| const PDF_URL = 'https://ontheline.trincoll.edu/images/bookdown/sample-local-pdf.pdf'; | |
| const parsedUrl = url.parse(PDF_URL); | |
| const options = { | |
| hostname: parsedUrl.hostname, | |
| port: parsedUrl.port || 443, |
This file contains hidden or 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
| const axios = require("axios"); | |
| async function getToken() { | |
| try { | |
| const response = await axios.post("https://reqres.in/api/login", { | |
| email: "eve.holt@reqres.in", | |
| password: "cityslicka" | |
| }, { | |
| headers: { "Content-Type": "application/json" } | |
| }); |
This file contains hidden or 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
| name: Sync API Docs | |
| on: | |
| push: | |
| branches: | |
| - main # Trigger the action when changes are pushed to the main branch. | |
| jobs: | |
| sync-api-docs: | |
| name: Sync API Documentation for Project 1 and Project 2 |