# Imports
from platforms import PLATFORMS, PLATFORMS_MAP


# Possible values to extract from a Git Url
REQUIRED_ATTRIBUTES = (
    'domain',
    'repo',
)


class GitUrlParsed(object):
    def __init__(self, parsed_info):
        self._parsed = parsed_info

        # Set parsed objects as attributes
        for k, v in parsed_info.items():
            setattr(self, k, v)

    def _valid_attrs(self):
        return all([
            getattr(self, attr, None)
            for attr in REQUIRED_ATTRIBUTES
        ])

    @property
    def valid(self):
        return all([
            self._valid_attrs(),
        ])

    @property
    def _platform_obj(self):
        return PLATFORMS_MAP[self.platform]

    ##
    # Alias properties
    ##
    @property
    def host(self):
        return self.domain

    @property
    def user(self):
        return getattr(self, '_user') or self.owner

    ##
    # Format URL to protocol
    ##
    def format(self, protocol):
        return self._platform_obj.FORMATS[protocol] % self._parsed

    ##
    # Rewriting
    ##
    def url2ssh(self):
        return self.format('ssh')

    def url2http(self):
        return self.format('http')

    def url2https(self):
        return self.format('https')

    def url2git(self):
        return self.format('git')

    # All supported Urls for a repo
    @property
    def urls(self):
        pass

    ##
    # Platforms
    ##
    @property
    def github(self):
        return self.platform == 'github'

    @property
    def bitbucket(self):
        return self.platform == 'bitbucket'

    @property
    def friendcode(self):
        return self.platform == 'friendcode'

    @property
    def assembla(self):
        return self.platform == 'assembla'

    ##
    # Get data as dict
    ##
    @property
    def data(self):
        return self._parsed

@@ -1029,16 +1029,129 @@
 parsed%0A%0A
+    ##%0A    # Normalize%0A    ##%0A    @property%0A    def normalized(self):%0A        return self.format(self.protocol)%0A%0A
     ##%0A 
@@ -1164,32 +1164,46 @@
 ewriting%0A    ##%0A
+    @property%0A
     def url2ssh(
@@ -1240,24 +1240,38 @@
 mat('ssh')%0A%0A
+    @property%0A
     def url2
@@ -1314,24 +1314,38 @@
 at('http')%0A%0A
+    @property%0A
     def url2
@@ -1390,24 +1390,38 @@
 t('https')%0A%0A
+    @property%0A
     def url2
@@ -1548,12 +1548,133 @@
     
-pass
+return dict(%0A            (protocol, self.format(protocol))%0A            for protocol in self._platform_obj.PROTOCOLS%0A        )
 %0A%0A  
@@ -2113,24 +2113,29 @@
      return 
+dict(
 self._parsed
@@ -2122,21 +2122,22 @@
 rn dict(self._parsed
+)
 %0A

Improve result object