https://github.com/lnus/golaget
(Golang) Go wrapper for Systembolagets (new) API
https://github.com/lnus/golaget
Last synced: about 1 year ago
JSON representation
(Golang) Go wrapper for Systembolagets (new) API
- Host: GitHub
- URL: https://github.com/lnus/golaget
- Owner: lnus
- License: mit
- Created: 2021-05-14T16:45:53.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-14T18:05:46.000Z (about 5 years ago)
- Last Synced: 2025-06-22T12:08:15.051Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 3.28 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoLaget 🍺



[](https://goreportcard.com/report/github.com/lnus/golaget)

GoLaget is a wrapper for [Systembolagets V2 API](https://api-portal.systembolaget.se/). It currently includes every function listed under V2 on their open API. **No plans to include V1 right now**, since I don't personally need it. But feel free to PR in case you write it out.
## Installation
```bash
go get github.com/lnus/golaget
```
For running the tests, the .env file should be populated with
```bash
PRIMARY_KEY=YOUR_PRIMARY_KEY
```
Please refer to the .env.example file for a safe configuration.
## Usage
```golang
import "github.com/lnus/golaget"
func main() {
instance = golaget.New(API_KEY, false) // API_KEY & verbose mode
result, error := instance.GetAgents() // Returns a list of all agents
for k, v := range *result {
fmt.Println(v.AgentID, v.IsOpen, v.Phone, v.Address)
}
}
```
## Contributing ❤
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License ⚖
[MIT](https://choosealicense.com/licenses/mit/)