Fetches a contact given its ID

        :param contact_id: Contact ID
        :type contact_id: str
        :return: Contact or Error
        :rtype: Contact
774787
def get_contact_from_id(self, contact_id):
        
        contact = self.wapi_functions.getContact(contact_id)

        if contact is None:
            raise ContactNotFoundError("Contact {0} not found".format(contact_id))

        return Contact(contact, self)
826986
def get_user_contact_lists_contacts(self, id, contact_list_id, **data):
        
        
        return self.get("/users/{0}/contact_lists/{0}/contacts/".format(id,contact_list_id), data=data)
431328
public function deleteContact($contactId)
    {
        if (is_null($contactId) || $contactId == '') {
            throw new Exception('The contactId is required to delete a contact.');
        }

        $params = array(
            'method' => 'sp.contact.delete',
            'contact_id' => $contactId
        );

        return $this->_makeApiRequest($params);
    }
995052
def getContacts(self, only_active=True):
        
        contacts = self.objectValues("Contact")
        if only_active:
            contacts = filter(api.is_active, contacts)
        return contacts
1318875
def new_contact(self):
        
        contact = self.contact_constructor(parent=self)
        if not self.root:
            contact.__folder_id = self.folder_id
        return contact
1247940
def add_contact(self, segment_id, contact_id):
        

        response = self._client.session.post(
            '{url}/{segment_id}/contact/add/{contact_id}'.format(
                url=self.endpoint_url,
                segment_id=segment_id,
                contact_id=contact_id
            )
        )
        return self.process_response(response)
1267320
public function resolveContactFunction($id)
    {
        if ($this->cache->contains($id)) {
            return $this->cache->fetch($id);
        }

        $contact = $this->contactRepository->find($id);
        if (null === $contact) {
            return;
        }

        $this->cache->save($id, $contact);

        return $contact;
    }
1056246
def _get_contact(self, *args, **kwargs):
        

        from warnings import warn
        warn('NIRWhois._get_contact() has been deprecated and will be '
             'removed. You should now use NIRWhois.get_contact().')
        return self.get_contact(*args, **kwargs)
63863
def get(cls, resource_id):
        
        res = Resource.get(resource_id)
        return cls(res) if res else None
205452
def contact_methods(self, **kwargs):
        """"""
        endpoint = '{0}/{1}/contact_methods'.format(
            self.endpoint,
            self['id'],
        )
        result = self.request('GET', endpoint=endpoint, query_params=kwargs)
        return result['contact_methods']
1260410
public Contact updateContact(final String id, ContactRequest contactRequest) throws UnauthorizedException, GeneralException {
        if (id == null) {
            throw new IllegalArgumentException("Contact ID must be specified.");
        }
        String request = CONTACTPATH + "/" + id;
        return messageBirdService.sendPayLoad("PATCH", request, contactRequest, Contact.class);
    }
10039
def get(self, id, param):
        
        assert isinstance(id, basestring)
        assert isinstance(param, basestring)
        return self.params_.get(param, {}).get(id)
905306
def get_contact(self, msisdn):
        
        response = self.session.post(
            urllib_parse.urljoin(self.api_url, "/v1/contacts"),
            json={"blocking": "wait", "contacts": [msisdn]},
        )
        response.raise_for_status()
        whatsapp_id = response.json()["contacts"][0].get("wa_id")
        if not whatsapp_id:
            self.fire_failed_contact_lookup(msisdn)
        return whatsapp_id
8572
def get_user_contact_lists(self, id, **data):
        
        
        return self.get("/users/{0}/contact_lists/".format(id), data=data)
17167
def get_contact_by_email(self, email):
        
        if not email:
            return None

        email = email.strip()
        query = self.q().any(collection='email_addresses', attribute='address',
                             word=email, operation='eq')
        contacts = self.get_contacts(limit=1, query=query)
        return contacts[0] if contacts else None
698873
public function getAction($id)
    {
        $contactManager = $this->getContactManager();
        $locale = $this->getUser()->getLocale();

        try {
            $view = $this->responseGetById(
                $id,
                function($id) use ($contactManager, $locale) {
                    return $contactManager->getById($id, $locale);
                }
            );

            $context = new Context();
            $context->setGroups(static::$contactSerializationGroups);
            $view->setContext($context);
        } catch (EntityNotFoundException $e) {
            $view = $this->view($e->toArray(), 404);
        }

        return $this->handleView($view);
    }
1156467
def getRequest(self, id_):
        
        for request in self.requests:
            if request.id == id_:
                return request

        raise LookupError("Request %r not found" % (id_,))