https://github.com/efectn/rest-countries
https://github.com/efectn/rest-countries
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/efectn/rest-countries
- Owner: efectn
- License: gpl-3.0
- Created: 2021-08-02T11:53:38.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-26T22:03:50.000Z (almost 5 years ago)
- Last Synced: 2025-04-01T17:54:51.713Z (about 1 year ago)
- Language: Go
- Size: 10.7 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rest Countries Go
Get information about countries via a RESTful API made by Go.
_**Build:**_
- Clone repository.
- Edit .env file and main.go to change `@host` var.
- `go get -u`
- `swag init .`
- `CGO_ENABLED=0 go build -ldflags "-s -w" .`
**_Usage:_** `./rest-countries`
**_Demo:_** https://rest-countries-go.herokuapp.com/
## Endpoints:
| Method | Route |
|---|---|
| GET | /api/v1/all |
| GET | /api/v1/name/:name |
| GET | /api/v1/code/:code |
| GET | /api/v1/currency/:currency |
| GET | /api/v1/language/:language |
| GET | /api/v1/capital/:capital |
| GET | /api/v1/calling/:code |
| GET | /api/v1/region/:region |
| GET | /api/v1/regional-block/:block |
### **Note:** Look at swagger docs for more information.