still in progress
just a check to see server is up and running
returns "5x5"
returns all posts for specified author id
- id : post id
- title : post title
- author_id : author id
- location : location field
- post : post content
- created_date : created date (UNIX time)
- updated_date : updated date (UNIX time) (should be updated with newest updated/edit date)
- media for post
- id
- url
- caption
- owner_id
- author_id
returns all posts no matter the author id
- id : post id
- title : post title
- author_id : author id
- location : location field
- post : post content
- created_date : created date (UNIX time)
- updated_date : updated date (UNIX time) (should be updated with newest updated/edit date)
- media for post
- id
- url
- caption
- owner_id
- author_id
returns post with specified id
- id : post id
- title : post title
- author_id : author id
- location : location field
- post : post content
- created_date : created date (UNIX time)
- updated_date : updated date (UNIX time) (should be updated with newest updated/edit date)
- media for post
- id
- url
- caption
- owner_id
- author_id
expects:
- username (required)
- password (required)
returns:
- username
- JWT token
expects:
- username (required)
- email (required)
- password (required)
returns:
- id
- username
Dates returned in Unix time which is seconds since 00:00:00 Thursday, 1 January 1970 expects:
- title (required) : post title
- location (required) : geographic location
- post (required) : content for post
returns:
- id : post id
- title
- author_id : user id of one who posted
- location
- post
- created_date : date post was created (UNIX time)
expects:
- nothing
returns:
- 204 (no body)
expects:
- title (required)
- location (required)
- post (required)
returns:
- id
- title
- author_id
- location
- post
- created_date
- updated_date
returns all posts for loggedin user (WIP will be edited to also return media associated with posts)
returns post with specified id if author matches loggedin user
returns all media for journal with specified id
expects:
- url (required)
- caption
returns:
- id
- url
- caption
- owner_id
deletes specified media and relationship to post expects:
- nothing
returns:
- 204
updates media values of specified id expects:
- url (required)
- caption
returns:
- id
- url
- caption
- owner_id
returns all media (WIPwill eventually be edited so only media user posts will show)
returns media with specified id (WIP: will be updated so it only returns media of loggedin user)
returns all comments for post
- id
- post_id
- author_id
- comment
expects:
- comment
returns:
- id
- post_id
- author_id
- comment
deleted specified comment returns:
- 204