I am developing a new set of API methods for carpooling/cab booking, so if a developer needs to develop an app or webportal for carpooling, he can call my JSON API. Basically making it easy for developers.
My API current has:
AddVehicle
AddJourney
SearchJourney
SubscribeToThisJourney(journey)
SubscriberList(journey)
to get list of people who have subscribed for this journeyAcceptSubscription(subscriber)
AcceptedSubcriberList
SubscriberList
to get list of providers I have subscribed to
I need help with replacing subscriber with something else. It’s difficult to remember, and confusing when you see 3 methods that mean very different things: SubscriberList
, SubscribedToThisJourneyList
and AcceptedSubscriberList
. Confusing to remember.
- One is a list of who I have subscribed to
- Who has subscribed to me
- Whose subscription I have accepted
How can I name these methods to make them easier to understand and remember?
4
Here are some suggestions for names for the three methods that you list as needing attention:
- One is a list of who I have subscribed to – based on your earlier description for
SubscriberList
, I assume by ‘who’ you mean which providers, so a clearer version might be:ProvidersSubscribedTo(user)
- Who has subscribed to me – assuming this is meant to list the subscribers who I, as a Provider, have not yet accepted:
PendingSubscribers(provider)
- Whose subscription I have accepted –
AcceptedSubscribers(provider)
I’ve used parameters to indicate the context of the method call, so depending on how the calls are made, they might not be required.
1
I do not see a problem with your chosen names, as the verb subscribe
and the noun subscriber
have very different (but rightly) related meanings in English.
Proper documentation is going to be key here.
1