For the purposes of providing a concrete example for my question, let's say I'm building an API that provides access to an email system and contains a set of public classes e.g.
MessageAttachment, and so on.
Is it a good idea to try to anticipate how clients may use the API and provide "helper" methods for common operations?
For example, imagine my
Message class has a
Save(string toFilePath) method. Maybe it would be helpful to provide another method in
Message that builds a "safe file name" from the subject of the message, i.e. a file name that is some reasonable portion of the subject (since the length of an email subject can far exceed the maximum length of a file path) where all characters that are not valid for use in a file name have been replaced with a usable character.
The reason for this would be that I anticipate clients may often want to save an email with a name that resembles the subject.