Return a service using.
162351
def get_service(self, service_type=None):
        """"""
        for service in self._services:
            if service.type == service_type and service_type:
                return service
        return None
810552
def http(self, *args, **kwargs):
        """"""
        kwargs['api'] = self.api
        return http(*args, **kwargs)
570801
public Object getService(String interfaceClassName, String serviceClassName, String versionRange, Dictionary<String,String> filter)
    {
        return ClassServiceUtility.getClassService().getClassFinder(context).getClassBundleService(interfaceClassName, serviceClassName, versionRange, filter, -1);
    }
938236
def return_response(self, value=None):
        # type: (Any) -> Tuple[Callback, Return]
        """"""
        response = Return(id=self.id, value=value)
        return self.callback, response
1080621
def get_api_service(self, name=None):
        """"""
        try:
            svc = self.services_by_name.get(name, None)
            if svc is None:
                raise ValueError(f"Couldn't find the API service configuration")
            return svc
        except:  # NOQA
            raise Exception(f"Failed to retrieve the API service configuration")
1173379
def services(self):
        ""
        return [self._get_subfolder("%s/%s/" % 
                (s['name'].rstrip('/').split('/')[-1], s['type']), 
                self._service_type_mapping.get(s['type'], Service)) for s
                in self._json_struct.get('services', [])]
780791
def service(self):
        '''
        
        '''
        service_class = getattr(self, 'service_class')
        service = service_class(self.http_request)
        return service
491652
private IBatchServiceBase getService(Name serviceType) throws BatchContainerServiceException {
        String sourceMethod = "getService";
        if (logger.isLoggable(Level.FINE))
            logger.entering(sourceClass, sourceMethod + ", serviceType=" + serviceType);

        initIfNecessary();

        IBatchServiceBase service = new ServiceLoader(serviceType).getService();

        if (logger.isLoggable(Level.FINE))
            logger.exiting(sourceClass, sourceMethod);

        return service;
    }
752346
def service(self, name: str = None):
        
        if self._services_initialized:
            from warnings import warn
            warn('Services have already been initialized. Please register '
                 f'{name} sooner.')
            return lambda x: x

        def wrapper(service):
            self.register_service(name, service)
            return service
        return wrapper
651205
def service_search(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.search_services(**kwargs)
843446
def services(self):
        """"""
        ids = [ref['id'] for ref in self['services']]
        return [Service.fetch(id) for id in ids]
420803
def callback(self, request, **kwargs):
        
        return super(ServiceTrello, self).callback(request, **kwargs)
877303
def get_service(self, name, search_filter):
        """"""
        if self.version == 1:
            service_filter = "service.{name}".format(name=name)
            return jmespath.search(service_filter, self.get(search_filter))
        else:
            service_filter = "services[?name=='{}']".format(name)
            return one(jmespath.search(service_filter, self.get(search_filter)))
52863
def object(self, *args, **kwargs):
        """"""
        kwargs['api'] = self.api
        return Object(*args, **kwargs)
54047
function(serviceName, returnBoolean, alchemyRegex) {
    var regex = alchemyRegex ?
                RegExp('(http|https)(://)('+serviceName+').*') :
                RegExp('(http|https)(://)([^\/]+)(/)('+serviceName+').*');

    var services = appEnv.getServices();

    for (var service in services) {
      if (services[service].hasOwnProperty('credentials')) {
        if (services[service].credentials.hasOwnProperty('url')){
          if (services[service].credentials.url.search(regex) === 0){
            return returnBoolean ? true : services[service].credentials;
          }
        }
      }
    }
    return returnBoolean ? false : null;
  }
1235614
def get(cls, **kwargs):
        """"""

        data = cls._get(**kwargs)
        if data is None:
            new = cls()
            new.from_miss(**kwargs)
            return new
        return cls.deserialize(data)
1111238
def get_backend(self, service_id, version_number, name):
		""""""
		content = self._fetch("/service/%s/version/%d/backend/%s" % (service_id, version_number, name))
		return FastlyBackend(self, content)