I’m working on an app in which users can become a ‘fan’ of another user.
I’m trying to determine if and how this is similar to a ‘friendship’
model, like the one seen in the has_many_friends plugin, but I haven’t
got my head round the differences yet, so I’m looking for advice. I’m
coming to the conclusion that ‘fans’ are different to ‘friends’ because
a user can have a fan without themselves being a fan of the fan, whereas
a friendship model requires both users to be friends with one another
when the friendship is created.
A User1 clicks a button on User2’s profile page to become a ‘fan’ of
User2. User2 will, depending on their email notification settings
(yes/no), be notified that they have a new fan.
That’s pretty much it, but I’m also considering an option which enables
users to first approve of other users becoming a fan. This would be
specified in a profile setting. I presume this function will necessitate
adding a ‘status’ to the fan table and adding ‘requested’ statuses etc.
How would you set up this up in a RESTful app?