This API allows:
1. Create user 2. Post message for user 3. Follow another user 4. Unfollow followed user 5. Get feed ( list of all messages from all followed users sorted by date and limited by 20 ) 6. Get Global feed ( list of all messages from all users sorted by date and limited by 20 )
Install rails ( rubyonrails.org ) get this application from github.com/benjaminharel/Twits run
$> rake:db:migrate $> rails s
POST CreateUser [UserName] POST PostMessage [UserId, MessageText] POST Follow [FollowingUser, FollowedUser] DELETE Unfollow [FollwingUser, UnfollowedUser] GET GetFeed [ForUserId] GET GetGlobalFeed
Example: localhost:3000/GetFeed?ForUserId=5
Tests are available under test directory. Migrations are available under db/migrate.
Enjoy.