{"id":18109581,"url":"https://github.com/andrewzah/cowapi","last_synced_at":"2025-03-29T16:30:50.232Z","repository":{"id":105900654,"uuid":"92880955","full_name":"andrewzah/cowapi","owner":"andrewzah","description":"A Crystal implementation of OWAPI","archived":false,"fork":false,"pushed_at":"2017-06-10T22:16:03.000Z","size":5058,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-01T00:05:27.342Z","etag":null,"topics":["crystal","overwatch","owapi"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewzah.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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-30T22:17:30.000Z","updated_at":"2019-10-04T16:18:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"44c2591b-b353-40bd-9346-ae93d0ffa1a4","html_url":"https://github.com/andrewzah/cowapi","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/andrewzah%2Fcowapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewzah%2Fcowapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewzah%2Fcowapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewzah%2Fcowapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewzah","download_url":"https://codeload.github.com/andrewzah/cowapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246213462,"owners_count":20741729,"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":["crystal","overwatch","owapi"],"created_at":"2024-11-01T00:01:51.981Z","updated_at":"2025-03-29T16:30:50.223Z","avatar_url":"https://github.com/andrewzah.png","language":"Crystal","funding_links":[],"categories":["Community"],"sub_categories":["Github"],"readme":"# cowapi\n\nThis is a Crystal implementation of [OWAPI](https://github.com/SunDwarf/OWAPI).\n\nIt utilizes the [Kemal](http://kemalcr.com/) framework \u0026 [Redis](https://redis.io/) for caching.\n\n## Roadmap\nSee [the Roadmap](roadmap.md)\n\n## Using the API\n### URL Parameters\n#### Region \u0026 Platform\nBy default, the region is `us` and platform is `pc`.  \nYou can set these with `region` and `platform` parameters, respectively.\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/Dad-12262/heroes/lucio?region=eu\u0026platform=xbox\n```\n\nCurrently you cannot specify multiple regions/platforms in 1 request. That feature is on the roadmap.\n\n#### Mode: Comp, Quickplay, or Both\nBy default, cowapi will return both competitive \u0026 quickplay stats.  \nHowever you can specify one or the other via the `mode` parameter:\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/Dad-12262/heroes?mode=competitive\n```\n\n### Heroes/Hero\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/:battleTag/heroes/:hero\n```\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/Dad-12262/heroes/lucio\n```\n**Singular Hero Request**\n```json\n{\n\t\"name\": \"lucio\",\n\t\"quickplay\": [\n\t\t{\n\t\t\"name\": \"sound_barriers_provided\",\n\t\t\"value\": 65,\n\t\t\"category\": \"hero_specific\"\n\t\t},\n\t\t{\n\t\t\"name\": \"sound_barriers_provided_most_in_game\",\n\t\t\"value\": 15,\n\t\t\"category\": \"hero_specific\"\n\t\t},\n\t\t{ ... }\n\t],\n\t\"comp\": [ ... ]\n}\n```\n### Heroes/Hero+Hero\nMultiple heroes can be specified! \n```\nhttps://apis.andrewzah.com/cowapi/v1/u/:battleTag/heroes/:hero1+:hero2+:heroN\n```\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/Dad-12262/heroes/lucio+pharah\n```\n**Multiple Heroes Request**:\n```json\n[\n\t{\n\t\t\"name\": \"lucio\",\n\t\t\"quickplay\": [\n\t\t\t{\n\t\t\t\"name\": \"sound_barriers_provided\",\n\t\t\t\"value\": 65,\n\t\t\t\"category\": \"hero_specific\"\n\t\t\t},\n\t\t\t{\n\t\t\t\"name\": \"sound_barriers_provided_most_in_game\",\n\t\t\t\"value\": 15,\n\t\t\t\"category\": \"hero_specific\"\n\t\t\t},\n\t\t\t{ ... }\n\t\t],\n\t\t\"comp\": [ ... ]\n\t},\n\t{\n\t\t\"name\": \"pharah\",\n\t\t\"quickplay\": [\n\t\t\t{\n\t\t\t\"name\": \"rocket_direct_hits\",\n\t\t\t\"value\": 2598,\n\t\t\t\"category\": \"hero_specific\"\n\t\t\t},\n\t\t\t{\n\t\t\t\"name\": \"barrage_kills\",\n\t\t\t\"value\": 169,\n\t\t\t\"category\": \"hero_specific\"\n\t\t\t},\n\t\t\t{ ... }\n\t\t],\n\t\t\"comp\": [ ... ]\n\t},\n]\n```\n\n### Heroes\nThe same as Heroes/Hero+Hero, but with all heroes + **total**.\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/:battleTag/heroes\n```\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/Dad-12262/heroes\n```\n\n### Profile\nMiscellaneous Profile Info + the same reponse as Heroes.\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/:battleTag/heroes\n```\n```\nhttps://apis.andrewzah.com/cowapi/v1/u/Dad-12262/heroes\n```\n**Profile result**: Comp stats will only return if they have values. \n```json\n{\n\t\"profile\": {\n\t\t\"avatar\": \"https://blzgdapipro-a.akamaihd.net/game/unlocks/0x0250000000000776.png\",\n\t\t\"name\": \"Dad\",\n\t\t\"player_level\": 288,\n\t\t\"border_portrait\": \"https://blzgdapipro-a.akamaihd.net/game/playerlevelrewards/0x025000000000092A_Border.png\",\n\t\t\"comp_rank\": 2288,\n\t\t\"tier_portrait\": \"https://blzgdapipro-a.akamaihd.net/game/rank-icons/season-2/rank-4.png\",\n\t\t\"tier\": \"Platinum\",\n\t\t\"games_won\": 662\n\t},\n\t\"heroes\": [ ... ]\n}\n```\n\n## Installation for Self Hosting\n\nClone this repo. Run `crystal make --release src/cowapi.cr` to build it.\n\n## Usage for Self Hosting\n\nSimply run `./cowapi` to run the server. To use a port other than 3000, use the `--port` flag.\n\ncowapi doesn't have inbuilt rate-limiting, so I recommend using nginx's rate limiting.\n\n## Contributing\n\nSubmitting issues with ideas for features is recommended! If you want to contribute with code:\n\n1. Fork it ( https://github.com/azah/cowapi/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## Contributors\n\n- [your-github-name](https://github.com/azah) Andrew Zah - creator, maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewzah%2Fcowapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewzah%2Fcowapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewzah%2Fcowapi/lists"}