agorava/agorava-core

Methods in SocialNetworkServiceHub

keilw opened this issue · 3 comments

Why is the profile method called getMyProfile and the one related to session just getSession?
Will there be more than one profile method as opposed to having only one session?
Otherwise renaming it to getProfile seems like a clearer name.

Yes you can get the profile of another user. Now I'm not sure that it's the best name in the world :-)

I was also hoping to clarify the relation between that interface and MultiServicesManager.

In MultiServicesManager there are several methods like
getCurrentService()
getCurrentSession()
...

as opposed to
getSession() and
getMyProfile()
in SocialNetworkServicesHub

It looks like the "Hub" is nested via
getCurrentServiceHub()

Wouldn't it be clearer to also call it
getCurrentProfile() instead of getMyProfile() then?

As mentioned, MultiServicesManager has
public OAuthSession getCurrentSession();
and the value of getCurrentServiceHub()
a SocialNetworkServicesHub has
public OAuthSession getSession();

Can you please explain the difference between
manager.getCurrentServiceHub().getSession()
and
manager.getCurrentSession()

Is this redundancy desired or could it be simplified? (on either side)