bambou/session.go
func (s *Session) FetchEntity(object Identifiable) *Error {

	url, berr := s.getPersonalURL(object)
	if berr != nil {
		return berr
	}

	request, err := http.NewRequest("GET", url, nil)
	if err != nil {
		return NewBambouError("HTTP transaction error", err.Error())
	}

	response, berr := s.send(request, nil)
	if berr != nil {
		return berr
	}
	defer response.Body.Close()

	body, _ := ioutil.ReadAll(response.Body)
	log.Debugf("Response Body: %s", string(body))

	arr := IdentifiablesList{object} // trick for weird api..
	if err := json.Unmarshal(body, &arr); err != nil {
		return NewBambouError("JSON unmarshalling error", err.Error())
	}

	return nil
}
func (s *Session) FetchEntity(object Identifiable) *Error {

	url, berr := s.getPersonalURL(object)
	if berr != nil {
		return berr
	}

	request, err := http.NewRequest("GET", url, nil)
	if err != nil {
		return NewBambouError("HTTP transaction error", err.Error())
	}

	response, berr := s.send(request, nil)
	if berr != nil {
		return berr
	}
	defer response.Body.Close()

	body, _ := ioutil.ReadAll(response.Body)
	log.Debugf("Response Body: %s", string(body))

	arr := IdentifiablesList{object} // trick for weird api..
	if err := json.Unmarshal(body, &arr); err != nil {
		return NewBambouError("JSON unmarshalling error", err.Error())
	}

	return nil
}
// FetchEntity fetchs the given Identifiable from the server.