GitHubHttpApp is a library that simplifies the creation of HTTP requests to the GitHub API within Google Apps Script. It abstracts away the details of building the request, allowing you to concentrate on the logic of your application.
Add to the library of your Google Apps Script project using the ID:
1suWVnfT6mr4PlgV2-djY0DhVZW3LRuV1zR10SWrk0IN2wRHtTwuasinq
Or clone the repository, and create your own project using clasp
const response = await GithubHttpApp.putter(GH_TOKEN, endpoint, payload = null);
Logger.log(response.getResponseCode()); // Returns the response status code
For a complete and detailed overview of all functions and features, including parameters and examples, visit the full documentation on the project wiki: or
.
- Requests: GET, POST, PUT, DELETE
- Header management: Authentication with GitHub token and other required headers.
- Pagination: The
fetcher
function supports pagination automatically. - Return: Returns an
UrlFetchApp.HTTPResponse
object for parsing the response.
Limited by the capabilities of the Google Apps Script library UrlFetchApp
.
Thank you for considering the GithubHttpApp for your needs. If you have any questions or need further assistance, please don't hesitate to reach out.