def resource(self, ttype: ResourceType, val: Optional[str]=None) -> str:
    'Create a resource identifier string based on the current config.\n\n        Parameters\n        ----------\n        ttype : ResourceType\n            Type of resource.\n        val : str, optional\n            Branch or commit identifier.\n\n        Returns\n        -------\n        str\n            The constructed resource string.\n\n        Examples\n        --------\n        >>> client = WOQLClient("https://127.0.0.1:6363")\n        >>> client.resource(ResourceType.DB)\n        \'<team>/<db>/\'\n        >>> client.resource(ResourceType.META)\n        \'<team>/<db>/_meta\'\n        >>> client.resource(ResourceType.COMMITS)\n        \'<team>/<db>/<repo>/_commits\'\n        >>> client.resource(ResourceType.REF, "<reference>")\n        \'<team>/<db>/<repo>/commit/<reference>\'\n        >>> client.resource(ResourceType.BRANCH, "<branch>")\n        \'<team>/<db>/<repo>/branch/<branch>\'\n        '
    base = (((self.team + '/') + self.db) + '/')
    ref_value = (val if val else self.ref)
    branch_value = (val if val else self.branch)
    urls = {ResourceType.DB: base, ResourceType.META: f'{base}_meta', ResourceType.REPO: f'{base}{self.repo}/_meta', ResourceType.COMMITS: f'{base}{self.repo}/_commits', ResourceType.REF: f'{base}{self.repo}/commit/{ref_value}', ResourceType.BRANCH: f'{base}{self.repo}/{branch_value}'}
    return urls[ttype]
Create a resource identifier string based on the current config.

Parameters
----------
ttype : ResourceType
    Type of resource.
val : str, optional
    Branch or commit identifier.

Returns
-------
str
    The constructed resource string.

Examples
--------
>>> client = WOQLClient("https://127.0.0.1:6363")
>>> client.resource(ResourceType.DB)
'<team>/<db>/'
>>> client.resource(ResourceType.META)
'<team>/<db>/_meta'
>>> client.resource(ResourceType.COMMITS)
'<team>/<db>/<repo>/_commits'
>>> client.resource(ResourceType.REF, "<reference>")
'<team>/<db>/<repo>/commit/<reference>'
>>> client.resource(ResourceType.BRANCH, "<branch>")
'<team>/<db>/<repo>/branch/<branch>'
def resource(self, ttype: ResourceType, val: Optional[str]=None) -> str:
    'Create a resource identifier string based on the current config.\n\n        Parameters\n        ----------\n        ttype : ResourceType\n            Type of resource.\n        val : str, optional\n            Branch or commit identifier.\n\n        Returns\n        -------\n        str\n            The constructed resource string.\n\n        Examples\n        --------\n        >>> client = WOQLClient("https://127.0.0.1:6363")\n        >>> client.resource(ResourceType.DB)\n        \'<team>/<db>/\'\n        >>> client.resource(ResourceType.META)\n        \'<team>/<db>/_meta\'\n        >>> client.resource(ResourceType.COMMITS)\n        \'<team>/<db>/<repo>/_commits\'\n        >>> client.resource(ResourceType.REF, "<reference>")\n        \'<team>/<db>/<repo>/commit/<reference>\'\n        >>> client.resource(ResourceType.BRANCH, "<branch>")\n        \'<team>/<db>/<repo>/branch/<branch>\'\n        '
    base = (((self.team + '/') + self.db) + '/')
    ref_value = (val if val else self.ref)
    branch_value = (val if val else self.branch)
    urls = {ResourceType.DB: base, ResourceType.META: f'{base}_meta', ResourceType.REPO: f'{base}{self.repo}/_meta', ResourceType.COMMITS: f'{base}{self.repo}/_commits', ResourceType.REF: f'{base}{self.repo}/commit/{ref_value}', ResourceType.BRANCH: f'{base}{self.repo}/{branch_value}'}
    return urls[ttype]