Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shofiq0023/infocave-blogs
Info cave backend. Blogs crud operation and user related operations are done here. User list fetch, login system etc
https://github.com/shofiq0023/infocave-blogs
cache heroku java postgresql rest-api spring-boot
Last synced: 13 days ago
JSON representation
Info cave backend. Blogs crud operation and user related operations are done here. User list fetch, login system etc
- Host: GitHub
- URL: https://github.com/shofiq0023/infocave-blogs
- Owner: shofiq0023
- Created: 2022-04-06T10:07:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-10T08:57:52.000Z (almost 3 years ago)
- Last Synced: 2024-11-07T14:35:44.188Z (2 months ago)
- Topics: cache, heroku, java, postgresql, rest-api, spring-boot
- Language: Java
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Info-Cave Blogs
Blogs operations are done in this project
## Endpoints:
### **For Blogs:**
Main endpoint: **/api/blogs**
REST api link: [In heroku blogs](https://infocave.herokuapp.com/api/blogs)
Variables:
- **/get/all** : fetches all the blogs from DB.
- **/get/all/author/{authorId}** : fetches all blogs by author id.
- **/get/{blogId}** : gets a single blog by blog id.
- **/add** : adds a new blog to the DB.
Header:
```json
{
"Content-Type": "application/json"
}
```Body:
```json
{
"title": "The Outsider",
"authorId": 2154,
"snippet": "Alien invasion on earth",
"detail": "this is where the actual blogs is written"
}
```- **/update/{blogId}** : updates a blog by blog id. **Request body same as `/add`**
- **/delete/{blogId}** : deletes a blog by blog id.
---
### **For User**:
Main endpoint: **/api/users/**
REST api link: [In heroku users](https://infocave.herokuapp.com/api/users)
Variables:
- **/get/all** : gets all user detail from DB.
- **/get/{userId}** : gets a single user detail using user id from DB.
- **/add** : adds a new user to DB.
Header:
```json
{
"Content-Type": "application/json"
}
```Body:
```json
{
"name": "John Doe",
"authorName": "john",
"email": "[email protected]",
"password": "johndoe123"
}
```**Password will be encoded in the backend**
- **/delete/{userId}** : deletes a user using user id. Returns a message.
- **/login** : login with email and password. Returns boolean if credentials matches with database.
Header:
```json
{
"Content-Type": "application/json"
}
```Body:
```json
{
"email": "[email protected]",
"password": "johndoe123"
}
```