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 journey
  • AcceptSubscription(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?

  • Please note, I have been migrated from ux.stackexchange.com. I hope to get feedback from the developers out there. – Siddharth Nov 1 '12 at 16:20
  • So your question is? We can probably guess it, but it's a good idea to make it explicit in the text of the question. – Mike Partridge Nov 1 '12 at 16:34
  • I hope its clearer now. – Siddharth Nov 1 '12 at 16:46
  • I hope I didn't change your meaning with my edit, but your use of the term API was a little off. Questions for you: SubscriberList and AcceptedSubscriberList are in your initial list, but SubscribedToThisJourneyList is not; is there a typo in there somewhere? – Mike Partridge Nov 1 '12 at 17:00

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.

  • Oh man, my test looks so neat now. PendingSubscribers, For loop, acceptSubscription, AcceptedSubscribers. This is what I am talking about. – Siddharth Nov 2 '12 at 4:55

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.

  • I agree, proper documentation is needed. – Siddharth Nov 2 '12 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.