Find the service endpoint

        :return: The service endpoint (a URL)
764919
def get_endpoint(self):
        
        if self.endpoint:
            return self.endpoint
        else:
            return self.service_context.provider_info[self.endpoint_name]
861684
def get_services(self):
        

        if self.services:
            return self.services

        url = 'http://api.embed.ly/1/services/python'

        http = httplib2.Http(timeout=self.timeout)
        headers = {'User-Agent': self.user_agent,
                   'Connection': 'close'}
        resp, content = http.request(url, headers=headers)

        if resp['status'] == '200':
            resp_data = json.loads(content.decode('utf-8'))
            self.services = resp_data

            # build the regex that we can use later
            _regex = []
            for each in self.services:
                _regex.append('|'.join(each.get('regex', [])))

            self._regex = re.compile('|'.join(_regex))

        return self.services
69006
def _get_api_url(self, secure=None, **formatters):
        '''
        '''
        if self.endpoint is None:
            raise NotImplementedError('endpoint must be defined on a subclass')
        if secure is None:
            secure = self.secure
        if secure:
            api_url = POSTMARK_API_URL_SECURE
        else:
            api_url = POSTMARK_API_URL
        url = urljoin(api_url, self.endpoint)
        if formatters:
            url = url.format(**formatters)
        return url
1304221
def search(self, *args, **kwargs):
        
        return self._get(self._build_url(self.endpoint.search(*args, **kwargs)))
1357649
public function get_endpoint() {

        $this->parse_template();
        $url = $this->get_service()->get_service_path() . $this->get_template();
        foreach ($this->params as $key => $value) {
            $url = str_replace('{' . $key . '}', $value, $url);
        }
        $toolproxy = $this->get_service()->get_tool_proxy();
        if (!empty($toolproxy)) {
            $url = str_replace('{tool_proxy_id}', $toolproxy->guid, $url);
        }

        return $url;

    }
573475
def api_url(self):
        ''''''
        return pathjoin(Bin.path, self.name, url=self.service.url)
1230595
def get_endpoint(self, endpoint=None):
        """"""
        base_url = self.api_config.api_url
        if not endpoint:
            if 'localhost' in base_url:
                endpoint = ''
            else:
                endpoint = ENDPOINTS[self.endpoint_type]

        endpoint = '/'.join([p.strip('/') for p in (base_url, endpoint)]).strip('/')
        self.logger.info("Using Endpoint: %s", endpoint)
        return endpoint
605169
def get_service_endpoint_types(self, type=None, scheme=None):
        
        query_parameters = {}
        if type is not None:
            query_parameters['type'] = self._serialize.query('type', type, 'str')
        if scheme is not None:
            query_parameters['scheme'] = self._serialize.query('scheme', scheme, 'str')
        response = self._send(http_method='GET',
                              location_id='5a7938a4-655e-486c-b562-b78c54a7e87b',
                              version='5.0-preview.1',
                              query_parameters=query_parameters)
        return self._deserialize('[ServiceEndpointType]', self._unwrap_collection(response))
762233
def _url_format(self, service):
        
        base_service_url = '{base}{service}'.format(
            base=self.urlbase,
            service=service
        )
        return base_service_url
974378
private Endpoint getEndpoint(String serviceName) {
        Endpoint cachedEndpoint = endpointCache.get(serviceName);

        if (cachedEndpoint == null) {
            cachedEndpoint = computeEndpoint(serviceName);
            if (cachedEndpoint == null) {
                return null;
            }
        }

        endpointCache.put(serviceName, cachedEndpoint);
        return cachedEndpoint;
    }
610329
def endpoint_get(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.get_endpoint(**kwargs)
1252813
def __get_base_bundle_url(self):
        
        return self.__serviceAccount.get_url() + '/' + \
            self.__serviceAccount.get_instance_id() + self.__BUNDLES_PATH
847772
def endpoint_get(service, region=None, profile=None, interface=None, **connection_args):
    '''
    
    '''
    auth(profile, **connection_args)
    services = service_list(profile, **connection_args)
    if service not in services:
        return {'Error': 'Could not find the specified service'}
    service_id = services[service]['id']
    endpoints = endpoint_list(profile, **connection_args)

    e = [_f for _f in [e
          if e['service_id'] == service_id and
            (e['region'] == region if region else True) and
            (e['interface'] == interface if interface else True)
            else None for e in endpoints.values()] if _f]
    if len(e) > 1:
        return {'Error': 'Multiple endpoints found ({0}) for the {1} service. Please specify region.'.format(e, service)}
    if len(e) == 1:
        return e[0]
    return {'Error': 'Could not find endpoint for the specified service'}
1029761
def filter(self, endpoint, params):
        
        params = self.parse_params(params)
        params = urlencode(params)
        path = '{0}?{1}'.format(endpoint, params)
        return self.get(path)
588772
def _get_action_endpoint(action):
    
    _endpoint = None
    if is_method(action):
        if hasattr(action, "_rule_cache"):
            rc = action._rule_cache
            if rc:
                k = list(rc.keys())[0]
                rules = rc[k]
                len_rules = len(rules)
                if len_rules == 1:
                    rc_kw = rules[0][1]
                    _endpoint = rc_kw.get("endpoint", None)
                    if not _endpoint:
                        _endpoint = _build_endpoint_route_name(action)
                elif len_rules > 1:
                    _prefix = _build_endpoint_route_name(action)
                    for r in Mocha._app.url_map.iter_rules():
                        if ('GET' in r.methods or 'POST' in r.methods) \
                                and _prefix in r.endpoint:
                            _endpoint = r.endpoint
                            break
    return _endpoint
784099
def endpoint(self):
        
        if self._endpoint:
            return self._endpoint
        elif self._controller_cls:
            endpoint = f'{snake_case(self._controller_cls.__name__)}.{self.method_name}'
            return endpoint if not self.bp_name else f'{self.bp_name}.{endpoint}'
        elif self.bp_name:
            return f'{self.bp_name}.{self.method_name}'
        return f'{self.view_func.__module__}.{self.method_name}'
441303
def _get_uri(self):
        
        if not self.service.exists():
            logging.warning("Service does not yet exist.")

        return self.service.settings.data['uri']