def get_href(element, rel):
 links = element.findall('link')
 for link in links:
  if (link.attrib['rel'] == rel):
   href = link.attrib['href']
   needle = '/api/'
   url_path = urlparse.urlparse(href).path
   index = url_path.find(needle)
   result = url_path[((index + len(needle)) - 1):]
   return result

def get_href ( element , rel ) : links = element . findall ( 'link' ) for link in links : if ( link . attrib [ 'rel' ] == rel ) : href = link . attrib [ 'href' ] needle = '/api/' url_path = urlparse . urlparse ( href ) . path index = url_path . find ( needle ) result = url_path [ ( ( index + len ( needle ) ) - 1 ) : ] return result
search a restlink element in the :class:abiquoresponse .