{"id":18571828,"url":"https://github.com/cdleveille/discit-api","last_synced_at":"2025-04-10T07:30:38.339Z","repository":{"id":44957859,"uuid":"425152454","full_name":"cdleveille/discit-api","owner":"cdleveille","description":"RESTful API for disc golf discs.","archived":false,"fork":false,"pushed_at":"2024-11-06T09:19:25.000Z","size":2364,"stargazers_count":30,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-06T09:36:40.096Z","etag":null,"topics":["api","bun","disc","disc-golf","golf","hono","mongodb","mongoose","rest-api","restful","typescript"],"latest_commit_sha":null,"homepage":"https://discit-api.fly.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdleveille.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"cdleveille"}},"created_at":"2021-11-06T04:08:21.000Z","updated_at":"2024-11-06T09:19:28.000Z","dependencies_parsed_at":"2023-10-11T20:44:11.098Z","dependency_job_id":"14ea6508-aef3-4510-9b7f-5417e772eafb","html_url":"https://github.com/cdleveille/discit-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Fdiscit-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Fdiscit-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Fdiscit-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Fdiscit-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdleveille","download_url":"https://codeload.github.com/cdleveille/discit-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223430338,"owners_count":17143624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bun","disc","disc-golf","golf","hono","mongodb","mongoose","rest-api","restful","typescript"],"created_at":"2024-11-06T23:03:52.912Z","updated_at":"2024-11-06T23:03:52.976Z","avatar_url":"https://github.com/cdleveille.png","language":"TypeScript","readme":"# 🥏 DiscIt API\n\nRESTful API for disc golf discs.\n\nEnables developers to programmatically access public disc information from the amazing [Marshall Street Disc Golf Interactive Flight Guide](https://www.marshallstreetdiscgolf.com/flightguide) web page. Disc data is refreshed nightly via the [DiscIt API Refresh Service](https://github.com/cdleveille/discit-api-refresh).\n\nCheck it out live on fly.io! [discit-api.fly.dev/disc](https://discit-api.fly.dev/disc)\n\n## Public Endpoints\n\n| Method | Route       | Description |\n| ------ | ----------- | ----------- |\n| `GET`  | `/disc`     | All discs   |\n| `GET`  | `/disc?`    | By field(s) |\n| `GET`  | `/disc/:id` | By id       |\n\n## Example Requests\n\n-   All discs: [`/disc`](https://discit-api.fly.dev/disc)\n-   By one field: [`/disc?stability=very-overstable`](https://discit-api.fly.dev/disc?stability=very-overstable)\n-   By multiple fields: [`/disc?brand=innova\u0026category=control-driver`](https://discit-api.fly.dev/disc?brand=innova\u0026category=control-driver)\n-   By id: [`/disc/dc3616c5-c9f2-55e3-9563-83a00d0805cb`](https://discit-api.fly.dev/disc/dc3616c5-c9f2-55e3-9563-83a00d0805cb)\n\nRefer to the **Fields** section below for all possible query string parameters, or check out the [Scalar API documentation](https://discit-api.fly.dev/reference). OpenAPI Specification .json data is also available at [discit-api.fly.dev/spec](https://discit-api.fly.dev/spec).\n\n## Fields\n\n| Field              | Searchable? | Search Operator | Description                                                                                                           |\n| ------------------ | ----------- | --------------- | --------------------------------------------------------------------------------------------------------------------- |\n| `id`               | Yes         | `=`             | Unique identifier of the disc                                                                                         |\n| `name`\\*           | Yes         | `LIKE`          | Name of the disc: `Aviar`, `Buzz`, `Crank SS`, etc.                                                                   |\n| `brand`\\*          | Yes         | `LIKE`          | Brand of the disc: `Innova`, `Discraft`, `Dynamic Discs`, etc.                                                        |\n| `category`\\*       | Yes         | `LIKE`          | `Distance Driver`, `Hybrid Driver`, `Control Driver`, `Midrange`, `Putter`                                            |\n| `speed`            | Yes         | `=`             | The relative rate at which the disc can travel through the air: `1` to `15`                                           |\n| `glide`            | Yes         | `=`             | The relative ability of the disc to maintain loft during its flight: `1` to `7`                                       |\n| `turn`             | Yes         | `=`             | The tendency of the disc to turn over or bank to the right (for RHBH throws) at the start of its flight: `+1` to `-5` |\n| `fade`             | Yes         | `=`             | The tendency of the disc to hook left (for RHBH throws) at the end of its flight: `0` to `5`                          |\n| `stability`\\*      | Yes         | `=`             | `Stable`, `Overstable`, `Very Overstable`, `Understable`, `Very Understable`                                          |\n| `link`             | No          | N/A             | Link to search for the disc in the Marshall Street Disc Golf web store                                                |\n| `pic`              | No          | N/A             | Link to a picture showing the approximate flight shape of the disc                                                    |\n| `color`            | No          | N/A             | Text color for the disc on the Marshall Street Flight Guide page                                                      |\n| `background_color` | No          | N/A             | Background color for the disc on the Marshall Street Flight Guide page                                                |\n\n\\* These fields use a URL-friendly **slug** string for search comparison. All non-alphanumeric characters are stripped out, and each space is replaced with a hyphen (e.g. `Crank SS` = `crank-ss`, `#1 Driver` = `1-driver`).\n\n## Setup\n\n-   Install [bun](https://bun.sh).\n-   Install package dependencies: `bun i`\n-   Create and populate a `.env` file based on the `.env.example` file in the root directory.\n    -   `API_KEY`: Secret key used to authenticate requests to the API. Can be any string value, but must match the value used in the [discit-api-refresh](https://github.com/cdleveille/discit-api-refresh) project.\n    -   `MONGO_URI` (optional): Connection string to a MongoDB database. If not provided, a Docker container will need to be used instead to host the database locally.\n-   If not using a custom MongoDB connection string, install and run [Docker Desktop](https://www.docker.com/products/docker-desktop). Run `bun compose` to initialize the database container.\n-   Run `bun dev` to start in watch mode (server restarts on file save).\n-   Server will listen for requests on [localhost:5000](http://localhost:5000).\n-   To populate the database with disc data, refer to the setup instructions for the [discit-api-refresh](https://github.com/cdleveille/discit-api-refresh) process.\n\n## Technologies\n\n-   [Bun](https://bun.sh/)\n-   [Hono](https://hono.dev)\n-   [MongoDB](https://www.mongodb.com)\n-   [TypeScript](https://www.typescriptlang.org)\n\n## See Also\n\n-   [DiscIt](https://github.com/cdleveille/discit) - a responsive disc golf disc search engine that uses the DiscIt API.\n-   [Marshall Street Disc Golf Interactive Flight Guide](https://www.marshallstreetdiscgolf.com/flightguide)\n-   [PDGA REST API Services](https://www.pdga.com/dev/api/rest/v1/services)\n-   [Disc Flight Ratings System](https://www.innovadiscs.com/home/disc-golf-faq/flight-ratings-system)\n","funding_links":["https://ko-fi.com/cdleveille"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdleveille%2Fdiscit-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdleveille%2Fdiscit-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdleveille%2Fdiscit-api/lists"}