{"id":19689021,"url":"https://github.com/oni-zerone/punkapi","last_synced_at":"2026-06-11T12:31:44.196Z","repository":{"id":62451274,"uuid":"171109341","full_name":"Oni-zerone/PunkAPI","owner":"Oni-zerone","description":"A wrapper around PunkAPI v2 by @samjbmason","archived":false,"fork":false,"pushed_at":"2022-01-20T16:13:26.000Z","size":263,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-01-10T08:23:30.054Z","etag":null,"topics":["api-client","beer","brewdog-punk-api","ios","punkapi","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/Oni-zerone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-17T10:34:54.000Z","updated_at":"2019-06-17T13:57:41.000Z","dependencies_parsed_at":"2022-11-01T23:34:03.374Z","dependency_job_id":null,"html_url":"https://github.com/Oni-zerone/PunkAPI","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oni-zerone%2FPunkAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oni-zerone%2FPunkAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oni-zerone%2FPunkAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oni-zerone%2FPunkAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oni-zerone","download_url":"https://codeload.github.com/Oni-zerone/PunkAPI/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240995363,"owners_count":19890722,"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-client","beer","brewdog-punk-api","ios","punkapi","swift"],"created_at":"2024-11-11T18:39:42.334Z","updated_at":"2025-11-22T12:02:40.630Z","avatar_url":"https://github.com/Oni-zerone.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PunkAPI\n\n[![Version](https://img.shields.io/cocoapods/v/PunkAPI.svg?style=flat)](https://cocoapods.org/pods/PunkAPI)\n[![Build Status](https://travis-ci.com/Oni-zerone/PunkAPI.svg?branch=develop)](https://travis-ci.com/Oni-zerone/PunkAPI)\n[![codebeat badge](https://codebeat.co/badges/bfe75f4d-ac1f-4e09-8a25-4f836bb93428)](https://codebeat.co/projects/github-com-oni-zerone-punkapi-develop)\n[![Coverage Status](https://coveralls.io/repos/github/Oni-zerone/PunkAPI/badge.svg?branch=develop)](https://coveralls.io/github/Oni-zerone/PunkAPI?branch=develop)\n[![Language](https://img.shields.io/badge/language-swift-orange.svg)](https://cocoapods.org/pods/PunkAPI)\n[![Platform](https://img.shields.io/cocoapods/p/PunkAPI.svg?style=flat)](https://cocoapods.org/pods/PunkAPI)\n[![License](https://img.shields.io/cocoapods/l/PunkAPI.svg?style=flat)](https://cocoapods.org/pods/PunkAPI)\n\n**This is a wrapper around PunkAPI v2 by [@samjbmason](https://twitter.com/samjbmason) you can find more informations about those APIs at https://punkapi.com/**\n\n_Have you ever wanted to search through Brewdog's expansive back catalogue of beer in a programmatic way? Maybe build a tool that pairs beer with food, or search beers with an abv of more than 4%? Well now your prayers have been answered!_\n\n_The Punk API takes Brewdog's DIY Dog and turns it into a searchable, filterable API that's completely free and open source._\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Usage\n```swift\nlet punkApi = PunkApi(configuration: .default)\n\npunkApi.get(RandomBeerRequest(), queue: .main) { beersResult in  }\npunkApi.get(BeerRequest(id: 1), queue: .main) { beersResult in  }\npunkApi.get(RandomBeerRequest(), queue: .main) { beersResult in  }\npunkApi.get(BeersRequest(filter: [.abv(condition: .more, value: 3),\n                                  .beerName(value: \"Punk\")]), \n                         queue: .main) { beersResult in  }\n```\n\n## API\n####    `RandomBeerRequest()`\nGet a random beer request\n```swift\npunkApi.get(RandomBeerRequest(), queue: .main) { beersResult in  }\n```\n\n####    `BeerRequest(id: 1)`\nGet a beer from given id\n```swift\npunkApi.get(BeerRequest(id: 1), queue: .main) { beersResult in  }\n```\n\n####    `BeersRequest(filter: [BeersRequest.Parameter.beerName(value: \"Punk IPA\")])`\nGet beers that match the passed in options, if no options are passed in it will return all beers in ascending order of `id`.\n```swift\npunkApi.get(RandomBeerRequest(), queue: .main) { beersResult in  }\n```\n**Options**\n\n##### `BeersRequest.Parameter.abv(condition: .more, value: 3)`\nCondition: `Condition`\nValue: `Float`\nWill return beers with an abv greater or lower than the passed in value.\n\n##### `BeersRequest.Parameter.ibu(condition: .more, value: 3)`\nCondition: `Condition`\nValue: `Float`\nWill return beers with an ibu greater or lower than the passed in value.\n\n##### `BeersRequest.Parameter.ebc(condition: .more, value: 3)`\nCondition: `Condition`\nValue: `Float`\nWill return beers with an ebc greater or lower than the passed in value.\n\n##### `BeersRequest.Parameter.beerName(value: \"Punk\")`\nValue: `String`\nWill return beers matching the string passed in (we use fuzzy matching to find the names).\n\n##### `BeersRequest.Parameter.yeast(value: \"American Ale\")`\nValue: `String`\nWill return beers which match the name of the yeast of the string passed in (we use fuzzy matching to find the yeast names).\n\n##### `BeersRequest.Parameter.brewed(condition: .more, value: 3)`\nCondition: `Condition`\nValue: `Date`\nWill return beers brewed before or after the passed in date.\n\n##### `BeersRequest.Parameter.hops(value: \"Ahtanum\")`\nValue: `String`\nWill return beers which match the name of the hops of the string passed in (we use fuzzy matching to find the hop names).\n\n##### `BeersRequest.Parameter.malt(value: \"Extra Pale\")`\nValue: `String`\nWill return beers which match the name of the malt of the string passed in (we use fuzzy matching to find the hop names).\n\n##### `BeersRequest.Parameter.food(value: \"Cheesecake\")`\nValue: `String`\nWill return beers which match food pairings of the string passed in (we use fuzzy matching to find the foods).\n\n##### `BeersRequest.Parameter.ids(value: [1, 2, 4, 6])`\nValue: `Array\u003cInt\u003e`\nWill return beers which match the given ids.\n\n## Installation\n\nPunkAPI is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'PunkAPI'\n```\n\n## Author\n\n[@Oni_zerone](https://twitter.com/Oni_zerone), oni.zerone@gmail.com\n\n## License\n\nPunkAPI is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foni-zerone%2Fpunkapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foni-zerone%2Fpunkapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foni-zerone%2Fpunkapi/lists"}