// GetReferences returns an iterator that reads all references at the given IRI. The IRI either resolves
// to an ActivityPub actor, collection or ordered collection.
GetReferences returns an iterator that reads all references at the given IRI. The IRI either resolves
to an ActivityPub actor, collection or ordered collection.
// GetReferences returns an iterator that reads all references at the given IRI . The IRI either resolves // to an ActivityPub actor collection or ordered collection .
func (c *Client) GetReferences(iri *url.URL) (ReferenceIterator, error) {
	respBytes, err := c.get(iri)
	if err != nil {
		return nil, fmt.Errorf("error reading response from %s: %w", iri, err)
	}
	logger.Debugf("Got response from %s: %s", iri, respBytes)
	objProps, firstPage, _, totalItems, err := unmarshalCollection(respBytes)
	if err != nil {
		return nil, fmt.Errorf("error unmarsalling response from %s: %w", iri, err)
	}
	items := make([]*url.URL, len(objProps))
	for i, prop := range objProps {
		items[i] = prop.IRI()
	}
	return newReferenceIterator(items, firstPage, totalItems, c.get), nil
}
func ( c * Client ) GetReferences ( iri * url . URL ) ( ReferenceIterator , error ) { respBytes , err := c . get ( iri ) if err != nil { return nil , fmt . Errorf ( " " , iri , err ) } logger . Debugf ( " " , iri , respBytes ) objProps , firstPage , _ , totalItems , err := unmarshalCollection ( respBytes ) if err != nil { return nil , fmt . Errorf ( " " , iri , err ) } items := make ( [ ] * url . URL , len ( objProps ) ) for i , prop := range objProps { items [ i ] = prop . IRI ( ) } return newReferenceIterator ( items , firstPage , totalItems , c . get ) , nil }
GetReferences returns an iterator that reads all references at the given IRI.
GetReferences returns an iterator that reads all references at the given IRI .