Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudacademy/voteapp-api-go
Go based API for Programming Language Voting Application
https://github.com/cloudacademy/voteapp-api-go
api cloudacademy go golang gorilla-mux mongodb
Last synced: 2 days ago
JSON representation
Go based API for Programming Language Voting Application
- Host: GitHub
- URL: https://github.com/cloudacademy/voteapp-api-go
- Owner: cloudacademy
- Created: 2019-08-20T23:46:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-23T11:45:12.000Z (over 1 year ago)
- Last Synced: 2024-06-20T16:46:17.282Z (5 months ago)
- Topics: api, cloudacademy, go, golang, gorilla-mux, mongodb
- Language: Go
- Homepage:
- Size: 25 MB
- Stars: 17
- Watchers: 4
- Forks: 41
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Build Status](https://github.com/cloudacademy/voteapp-api-go/actions/workflows/go.yml/badge.svg)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/cloudacademy/voteapp-api-go)# Background
Provides a CRUD based API written in Go. The API is designed to read and write into a MongoDB backend database.# API endpoints
The API provides the following endpoints:
```
GET /ok
GET /cpu
GET /version
GET /languages
GET /languages/{name}
GET /languages/{name}/vote
POST /languages/{name}
DELETE /languages/{name}
```# API GETs with curl and jq
The API can be used to perform GETs with **curl** and **jq** like so:
```
curl -s http://localhost:8080/languages | jq .
curl -s http://localhost:8080/languages/{name} | jq .
curl -s http://localhost:8080/languages/{name}/vote | jq .
```# API POSTs with curl
The API can be used to perform POSTs with **curl** like so:
```
curl http://localhost:8080/languages/{name} \
--header "Content-Type: application/json" \
--request POST \
--data-binary @- <