@param $list_id
@param int $offset

@return mixed
@throws Exception

API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969429
165570
public function reportSubscribersInList($list_id, $offset=0)
		{
			$form_data = array(
				'list_id' => $list_id,
				'offset' => $offset
			);
			$xml = $this->call('rpt_subscribers_in_list', $form_data);

			return json_decode(json_encode($xml), TRUE);
		}
457770
public function getAuthorizers($offset = 0, $count = 500)
    {
        $params = [
            'component_appid' => $this->app['config']['app_id'],
            'offset' => $offset,
            'count' => $count,
        ];

        return $this->httpPostJson('cgi-bin/component/api_get_authorizer_list', $params);
    }
1116993
public function getGamesByCompany($id, $offset = 0, $limit = 25)
    {
        list($offset, $limit) = $this->normalizeOffsetAndLimit($offset, $limit);

        $id = (int) $id;
        $id = max(0, $id);

        return $this->request('companies/'.$id.'/games', [
            'offset' => $offset,
            'limit' => $limit,
        ]);
    }
971182
protected function getResponse($offset = 0, $itemCountPerPage = 0)
    {
        $id = md5($offset . $itemCountPerPage);
        if (!isset($this->responses[$id])) {
            $query = new \SolrDisMaxQuery();
            $this->filter->filter($this->params, $query, $this->facets);
            $query->setStart($offset);
            $query->setRows($itemCountPerPage);
            try {
                $this->responses[$id] = $this->client->query($query);
            } catch (\Exception $e) {
                throw new ServerException('Failed to process query', $e->getCode(), $e);
            }
        }

        return $this->responses[$id];
    }
1328971
public function listDiscounts($location_id)
    {
        list($response, $statusCode, $httpHeader) = $this->listDiscountsWithHttpInfo ($location_id);
        return $response; 
    }
667899
public function getAttachments ($list_name, $list_item_id) {
		// Wrap in CAML
		$CAML = '
		<GetAttachmentCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/">
			<listName>' . $list_name . '</listName>
			<listItemID>' . $list_item_id . '</listItemID>
		</GetAttachmentCollection>';

		$xmlvar = new \SoapVar($CAML, XSD_ANYXML);

		// Attempt to run operation
		try {
			$rawXml = $this->soapClient->GetAttachmentCollection($xmlvar)->GetAttachmentCollectionResult->any;
		} catch (\SoapFault $fault) {
			$this->onError($fault);
		}

		// Load XML in to DOM document and grab all list items.
		$nodes = $this->getArrayFromElementsByTagName($rawXml, 'Attachment');

		$attachments = array();

		// Format data in to array or object
		foreach ($nodes as $counter => $node) {
			$attachments[] = $node->textContent;
		}

		// Return Array of attachment URLs
		return $attachments;
	}
651075
public function listMethod($employee_id)
    {
        $result = $this->listMethodInternal(compact('employee_id'));
        $statusCode = (int)$result[ 'statusCode' ];

        if ($statusCode === 200) {
            return $this->getResultAsArrayWithoutStatusCode($result);
        }

        $this->reportUnexpectedResponse($result, 1541006346);
    }
255595
public function listModifierLists($location_id)
    {
        list($response, $statusCode, $httpHeader) = $this->listModifierListsWithHttpInfo ($location_id);
        return $response; 
    }
329639
public function getCounter($listUuid)
    {
        if ($this->existsListInIndex($listUuid)) {
            $index = $this->getIndex($listUuid);

            return $index['size'];
        }

        return 0;
    }
426424
public function getLists($listType = 2, $isPrivate = true, $folder = null) {
        $data["Envelope"] = array(
            "Body" => array(
                "GetLists" => array(
                    "VISIBILITY" => ($isPrivate ? '0' : '1'),
                    "FOLDER_ID" => $folder,
                    "LIST_TYPE" => $listType,
                ),
            ),
        );
        $response = $this->_request($data);
        $result = $response["Envelope"]["Body"]["RESULT"];
        if ($this->_isSuccess($result)) {
            if (isset($result['LIST']))
                return $result['LIST'];
            else {
                return array(); //?
            }
        } else {
            throw new \Exception("GetLists Error: ".$this->_getErrorFromResponse($response));
        }
    }
926513
public function listTrashed($offset, $limit, array $sort = null)
    {
        try {
            return $this->innerGateway->listTrashed($offset, $limit, $sort);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
53746
public function increment($id, $offset = 1)
	{
		$data = $this->_get($id);

		if ($data === FALSE)
		{
			$data = array('data' => 0, 'ttl' => 60);
		}
		elseif ( ! is_int($data['data']))
		{
			return FALSE;
		}

		$new_value = $data['data'] + $offset;
		return $this->save($id, $new_value, $data['ttl'])
			? $new_value
			: FALSE;
	}
1368865
public function slice($offset = 0, $length = null, $preserve_keys = false)
	{
		return array_slice($this->list, $offset, $length, $preserve_keys);
	}
1073614
public function offsetGet($offset)
	{
		if ( ! $this->offsetExists($offset))
			return NULL;
		$ids = $this->list_ids();
		return $this->_load($ids[$offset]);
	}
74537
public function slice(int $offset, int $length = null)
    {
        $actions = $this->internalDataListActions;
        $actions[] = ['slice', $offset, $length];
        $data = $this->internalDataListUpdateData($this->internalDataListData, $actions);
        $slice = array_slice($data, $offset, $length);
        $className = get_class($this);
        $list = new $className();
        foreach ($slice as $object) {
            $list->push($object);
        }
        return $list;
    }
210175
public function tagsList($limit = 25, $offset = 0)
    {
        $resource = '/tags.json';

        // Create request
        $data = $this->auth->request(
            'GET',
            $resource,
            array('query' => array('limit' => (int) $limit, 'offset' => (int) $offset))
        );

        return $data;
    }
941761
public function fetchById($int_key_id)
    {
        $arr_results = $this->fetchByIds([$int_key_id]);
        if(count($arr_results) > 0) {
            return $arr_results[0];
        }
        return null;
    }