|
|
|
@ -100,7 +100,14 @@ class Networks(object):
|
|
|
|
|
|
|
|
|
|
return self._networks |
|
|
|
|
|
|
|
|
|
def _targets(self, shortcut): |
|
|
|
|
def user(self, network=None): |
|
|
|
|
"""Return a :class:`NetworkUser` representation for the logged user in |
|
|
|
|
the requested network. If no network is selected, will return the |
|
|
|
|
first found.""" |
|
|
|
|
shortcut = self._targets(network).next() # need this due yield |
|
|
|
|
return self.networks[shortcut].user |
|
|
|
|
|
|
|
|
|
def _targets(self, shortcut=None): |
|
|
|
|
"""Select a network based on the shortcut. If the shortcut is None, |
|
|
|
|
returns all available network shortcuts.""" |
|
|
|
|
if shortcut: |
|
|
|
|