https://github.com/TheCodeTraveler/GitHubReadmeRetriever
APIs built using Azure Functions to retrieve GitHub Readme
https://github.com/TheCodeTraveler/GitHubReadmeRetriever
api azure azure-functions github github-api github-graphql github-graphql-api readme readme-md
Last synced: 4 months ago
JSON representation
APIs built using Azure Functions to retrieve GitHub Readme
- Host: GitHub
- URL: https://github.com/TheCodeTraveler/GitHubReadmeRetriever
- Owner: TheCodeTraveler
- Created: 2020-03-26T17:12:34.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-10-22T22:27:36.000Z (about 5 years ago)
- Last Synced: 2025-09-07T04:39:11.238Z (4 months ago)
- Topics: api, azure, azure-functions, github, github-api, github-graphql, github-graphql-api, readme, readme-md
- Language: C#
- Homepage:
- Size: 72.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GitHub Readme Retriever
The GitHub Readme Retriever APIs allow you retrieve the `README.md` from any GitHub Repo.
## GET README
Retrieve the `README.md` file from any public GitHub Repository.
**Request**
The API request requires two parameters: `ownerName` and `repositoryName`:
- `ownerName` is the name of the GitHub user who owns the repository
- `repositoryName` is the name of the GitHub Repository
Both values be extracted from the GitHub repository's url:
`https://github.com/{ownerName}/{repositoryName}`
```bash
curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadme/{ownerName}/{repositoryName}'
```
**Response**
```javascript
{
"readme": "string",
"repositoryName": "string",
"repositoryOwner": "string"
}
```
### Example
To retrieve this repo's `README.md`, we'll use the following parameters:
- ownerName: `brminnick`
- repositoryName: `GitHubReadmeRetriever`
```bash
curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadme/brminnick/GitHubReadmeRetriever'
```
```javascript
{
"readme": "
\n GitHub Readme Retriever
\n..."
"repositoryName": "GitHubReadmeRetriever",
"repositoryOwner": "brminnick"
}
```
## GET ALL READMEs
Retrieve the `README.md` file from all private and public GitHub Repositories owned by the user.
**Request**
The API request requires two parameters: `ownerName` and `token`:
- `ownerName` is your GitHub username / login
- `token` is your Personal Access Token [generated by following these steps](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token)
```bash
curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadmes/{ownerName}/{token}'
```
**Response**
```javascript
[
{
"readme": "string",
"repositoryName": "string",
"repositoryOwner": "string"
}
{
"readme": "string",
"repositoryName": "string",
"repositoryOwner": "string"
}
]
```
### Example
To retrieve the `README.md` for all of my repositories, we will use the following parameters:
- ownerName: `brminnick`
- token: `debddf126115d5f193526a7f29fe980e525e497e`
> **Note:** This example is not using a real token. You can [create your token by following these steps](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token).
```bash
curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadmes/brminnick/debddf126115d5f193526a7f29fe980e525e497e'
```
```javascript
[
{
"readme": "# AsyncAwaitBestPractices\n\n[](https://brminnick.visualstudio.com/AsyncAwaitBestPractices/_build/latest?definitionId=5)\n\n...",
"repositoryName": "AsyncAwaitBestPractices",
"repositoryOwner": "brminnick"
}
{
"readme": "
\n GitTrends: GitHub Insights
\n\n
## Resources
Cloud Backend
- [.NET Core](https://docs.microsoft.com/dotnet/core/?WT.mc_id=mobile-0000-bramin) - an [open-source](https://github.com/dotnet/core), general-purpose development platform maintained by Microsoft and the .NET community on [GitHub](https://github.com/dotnet/core)
- [Azure Functions](https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=mobile-0000-bramin) - a serverless compute service that lets you run event-triggered code without having to explicitly provision or manage infrastructure
- [Azure Functions Dependency Injection](https://docs.microsoft.com/azure/azure-functions/functions-dotnet-dependency-injection?WT.mc_id=mobile-0000-bramin) - Azure Functions supports the dependency injection (DI) software design pattern, which is a technique to achieve [Inversion of Control (IoC)](https://docs.microsoft.com/dotnet/standard/modern-web-apps-azure-architecture/architectural-principles?WT.mc_id=mobile-0000-bramin#dependency-inversion) between classes and their dependencies
- [Polly + HttpClientFactory](https://docs.microsoft.com/dotnet/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly?WT.mc_id=mobile-0000-bramin) - the recommended approach for retries with exponential backoff is to take advantage of more advanced .NET libraries
- [Refit + HttpClientFactory](https://docs.microsoft.com/aspnet/core/fundamentals/http-requests?WT.mc_id=mobile-0000-bramin#generated-clients) - `IHttpClientFactory` can be used in combination with third-party libraries such as Refit
## Author
👤 **Brandon Minnick**
- Twitter: [@TheCodeTraveler](https://twitter.com/TheCodeTraveler)
- Blog: https://codetraveler.io
- Github: [@brminnick](https://github.com/brminnick)
## Show your support
⭐️ [Star the GitHub Repo](https://github.com/brminnick/GitHubReadmeRetriever/)