Skip to content

APIs built using Azure Functions to retrieve GitHub Readme

Notifications You must be signed in to change notification settings

brminnick/GitHubReadmeRetriever

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Readme Retriever

Twitter: TheCodeTraveler

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}

curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadme/{ownerName}/{repositoryName}'

Response

{
    "readme": "string",
    "repositoryName": "string",
    "repositoryOwner": "string"
}

Example

To retrieve this repo's README.md, we'll use the following parameters:

  • ownerName: brminnick
  • repositoryName: GitHubReadmeRetriever
curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadme/brminnick/GitHubReadmeRetriever'
{
    "readme": "<div class=\"header\" align=\"center\">\n  <h1 align=\"center\">GitHub Readme Retriever</h1>\n</div>..."
    "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:

curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadmes/{ownerName}/{token}'

Response

[
  {
      "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.

curl --request GET 'https://githubreadmeretriever.azurewebsites.net/api/GetReadmes/brminnick/debddf126115d5f193526a7f29fe980e525e497e'
[
  {
      "readme": "# AsyncAwaitBestPractices\n\n[![Build Status](https://brminnick.visualstudio.com/AsyncAwaitBestPractices/_apis/build/status/AsyncAwaitBestPractices-.NET%20Desktop-CI)](https://brminnick.visualstudio.com/AsyncAwaitBestPractices/_build/latest?definitionId=5)\n\n...",
      "repositoryName": "AsyncAwaitBestPractices",
      "repositoryOwner": "brminnick"
  }
  {
      "readme": "<div class=\"header\" align=\"center\">\n  <h1 align=\"center\">GitTrends: GitHub Insights</h1>\n</div>\n<p align=\"center\">\n  <a href=\"https://twitter.com/GitTrendsApp\">\n...",
      "repositoryName": "GitTrends",
      "repositoryOwner": "brminnick"
  }
  {
      "readme": "<div class=\"header\" align=\"center\">\n  <h1 align=\"center\">GitHub Readme Retriever</h1>\n</div>...",
      "repositoryName": "GitHubReadmeRetriever",
      "repositoryOwner": "brminnick"
  }
]

Resources

Cloud Backend

Author

👤 Brandon Minnick

Show your support

⭐️ Star the GitHub Repo