Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/berrysauce/pinned
📌 A REST API to easily get pinned repositories from a GitHub user
https://github.com/berrysauce/pinned
api cloudflare-workers honojs pinned pinned-repos rest
Last synced: 10 days ago
JSON representation
📌 A REST API to easily get pinned repositories from a GitHub user
- Host: GitHub
- URL: https://github.com/berrysauce/pinned
- Owner: berrysauce
- License: mit
- Created: 2023-10-17T14:21:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-14T07:08:22.000Z (2 months ago)
- Last Synced: 2024-10-30T04:30:01.342Z (about 2 months ago)
- Topics: api, cloudflare-workers, honojs, pinned, pinned-repos, rest
- Language: TypeScript
- Homepage: https://pinned.berrysauce.me
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 📌 Pinned
![Uptime](https://uptime.berrysauce.dev/api/badge/8/uptime)
Pinned is an API that returns pinned repositories for the requested username from GitHub. This is ideal for creating a "Pinned Repositories" section on your website.
```http
GET https://pinned.berrysauce.dev/get/username
```Replace `username` with your GitHub username. Pinned will return the JSON in the following format:
```json
[
{
"author": "berrysauce",
"name": "whatdevsneed",
"description": "🧰 Discover new developer tools",
"language": "HTML",
"stars": 58,
"forks": 0
},
...
]
```You can add `?pretty` at the end of your request to get a formatted response.
If Pinned runs into an error, it will return a response with a response code other than `200` and the following format:
```json
{
"detail": "Error parsing HTML"
}
```> [!NOTE]
> This API has a 5 minute cache in place to reduce requests to the origin. With this said, it might take a moment for your pinned repositories to update.## Development
Clone the repository, `cd` into it and run the following commands to install dependencies and run the code:
```
npm install
npm run dev
```Pinned is deployed on [Cloudflare Workers](https://workers.cloudflare.com/). To deploy Pinned, run the following command:
```
npm run deploy
```