func (dpnSync *DPNSync) getRestoreRequests(remoteClient *network.DPNRestClient, pageNumber int) *network.DPNResponse { // Get requests updated since the last time we pulled // from this node, where this node is the to_node. // E.g. We ask TDR for restore requests going TO TDR. remoteNode := dpnSync.RemoteNodes[remoteClient.Node] params := url.Values{} params.Set("after", remoteNode.LastPullDate.Format(time.RFC3339Nano)) params.Set("to_node", remoteNode.Namespace) params.Set("page", fmt.Sprintf("%d", pageNumber)) params.Set("per_page", strconv.Itoa(SYNC_BATCH_SIZE)) return remoteClient.RestoreTransferList(params) }