This is an API for TOAD, a short message social network where users can post "croaks".
This project was a joint assignment between the front-end and back-end class at The Iron Yard. This code is JUST THE API. The front-end ought to be available at (not actually available right now).
To get started, you will need to run rails db:migrate
.
If you want to seed the database with fake data, you can run rails db:seed
.
db:seed
, unless edited, will ensure you have at least 10 users in the database. Each user will have a few posts and should have a few followers and followees. They also should have avatar photos. Each of these is easily changed in the seeds.rb
file. Simply comment/uncomment the method you wish to include/exclude.
-
users can signup or login
-
without signing up or in, a user can see all posts chronologically.
-
without signing up or in, a user can see a specific user, or specific posts.
-
A logged in user can:
- see a timeline of their posts and those of anyone they follow.
- make posts.
- search for users or posts. (note: NOT FULLY TESTED)
- see their own profile.
- see all posts by specific users.
- follow/unfollow other users.
-
post /users
- signup -
post /login
- login -
post /posts
- create a post (token required) -
get /users
- see a list of all users (token required) -
get /users
- search for users and posts (token and :search parameter required) -NOT FULLY TESTED -
get /posts
- see a list of all posts (no token) -
get /posts
- see timeline (token required) -
get /users/profile
- see your profile (token required) -
get /users/:id
- see the profile of a specific user -
get /post/:user_id
- see all the posts for a specific user (token required) -
post /socialize/follow
- toggle the follow status for the current user, of a specific user (requires a token and a username as parameters)
- robust testing ( or any testing)
- likes
- mentions
- a better readme
- smoothing over/refining search
If you're really curious, the Heroku instance of the API is running here: https://hidden-plains-75908.herokuapp.com