Endpoint

class moco_wrapper.util.endpoint.Endpoint(slug: str, url_template: str, http_method: str, objector_model_type=None)
url_format(params=None)

Retrieves the url to use for accessing the api

Parameters:params (dict (default None)) – Dictionary of url parameters
Returns:Url path
Return type:str

Note

If the Endpoint uses an url template like /projects/{id}/assigned, url format will return the final url to use

>> e = Endpoint("my_endpoint", "/projects/{id}/assigned", "GET")
>> params = { "id": 44 }
>> e.url_format(params)
'/projects/44/assigned'