An open API service indexing awesome lists of open source software.

https://github.com/maxmcd/baodata


https://github.com/maxmcd/baodata

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Baodata

A slow and simple datastore for gitbao.

The api uses REST-style endpoints to store data.

Get:
```Go
resp, err := baodata.Get("/users/1")
// resp => []{"id":"1", "email":"[email protected]"}

resp, err := baodata.Get("/users")
// resp => []{"id":"1", "email":"[email protected]"}
```

Put:
```Go
resp, err := baodata.Put("/users", baodata.Data{"email", "[email protected]"})
// resp => []{"id":"2", "email":"[email protected]"}

resp, err := baodata.Put("/users/2", baodata.Data{"email", "[email protected]"})
// resp => []{"id":"2", "email":"[email protected]"}
```

Delete:
```Go
err := baodata.Delete("/users/1")
```