parseAchievements will return a list of achievements belonging to a Habbo

@param $id
@return Achievement[]
@throws Exception
428259
public function parseAchievements($id)
    {
        $achievements = array();

        list($data) = $this->_callUrl($this->api_base . '/api/public/achievements/' . $id, true);

        if ($data) {
            foreach ($data as $ach) {
                $tmp_ach = new Achievement();
                $tmp_ach->parse($ach);
                $achievements[] = $tmp_ach;
                unset($tmp_ach);
            }
        }

        return $achievements;
    }
286073
public function getVazby($id = null)
    {
        if (is_null($id)) {
            $id = $this->getRecordID();
        }
        if (!empty($id)) {
            $vazbyRaw = $this->getColumnsFromFlexibee(['vazby'],
                ['relations' => 'vazby', 'id' => $id]);
            $vazby    = array_key_exists('vazby', $vazbyRaw[0]) ? $vazbyRaw[0]['vazby']
                    : null;
        } else {
            throw new \Exception(_('ID requied to get record relations '));
        }
        return $vazby;
    }
883135
public function getMany(array $id) {
		$idPrepared = array_map([$this, 'prepareId'], $id);
		$idsMap     = array_combine($idPrepared, $id);
		$backend    = $this->getBackend();
		
		$results = [];
		
		foreach ($idPrepared as $partId) {
			try {
				$result = $backend->get($partId);
			}
			catch (PhalconCacheException $exception) {
				if ($this->operationsExceptions) {
					throw new OperationFailed('Fetching of the data from the cache failed due to the backend exception occurred: "' . $exception->getMessage() . '"', 0, $exception);
				} else {
					return [];
				}
			}
			
			if ($result !== null) {
				$results[$idsMap[$partId]] = $result;
			}
		}
		
		return $results;
	}
317616
public function install($id)
    {
        $plugin = $this->getById($id);
        if (!$plugin) {
            return ['code' => -1, 'message' => 'Plugin not found'];
        }

        if ($this->isInstalled($id)) {
            return ['code' => -2, 'message' => 'Plugin has been installed'];
        }

        $ret = $plugin->install();
        if ($ret['code'] !== 1) {
            return $ret;
        }

        $pluginIds = $this->getInstalledIds();
        $pluginIds[] = $id;
        $this->setInstalledIds($pluginIds);

        $this->getEvents(true);

        return $ret;
    }
492458
public function indexOfId($id)
    {
        $id = (string) $id;
        foreach ($this as $key => $entity) {
            if (!$entity instanceof Model) {
                throw new Exception('Error, `indexOfId()` is only available on models.');
            }
            if ($id === (string) $entity->id()) {
                return $key;
            }
        }
    }
1146772
public function viewThread(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/notifications/threads/:id', (string)$id));
    }
1097721
public function activate($id)
    {
        $id = (int) $id;
        if ($id <= 0) {
            throw new Exception('Invalid param id');
        }
        $data = [];
        $data['id'] = $id;
        $data['status'] = 'active';
        return $this->update($data);
    }
115453
public function parseMeta($id)
	{
		$items = array();
		$data = ContentMetadata::model()->findAllByAttributes(array('content_id' => $id));
		foreach ($data as $element)
			$items[$element->key] = $this->isJson($element->value) ? CJSON::decode($element->value) : $element->value;
		
		return $items;
	}
1312463
protected function getAnchorsInPage($id)
    {
        $page = SiteTree::get()->byID($id);

        if (!$page || !$page->canView()) {
            return [];
        }

        return $page->getAnchorsOnPage();
    }
598888
public function find($id)
    {
        if (trim($id) == "") {
            throw new Exception\NotFound('dispute with id "' . $id . '" not found');
        }

        try {
            $path = $this->_config->merchantPath() . '/disputes/' . $id;
            $response = $this->_http->get($path);
            return Dispute::factory($response['dispute']);
        } catch (Exception\NotFound $e) {
            throw new Exception\NotFound('dispute with id "' . $id . '" not found');
        }
    }
807699
public function toSimpleWorkflow($id)
	{
		if ($id === null) {
			$id = self::VALUE_NULL;
		}
		$statusId = array_search($id, $this->_map);
		if ($statusId === false) {
			throw new Exception('Conversion to SimpleWorkflow failed : no value found for id = '.$id);
		}
		return ($statusId == self::VALUE_NULL ? null : $statusId);
	}
902391
public function mediatemplate($id)
    {
        $template = $this->templateManager->find($id);

        if (!$template) {
            return [];
        }

        return $template->getParameters();
    }
608254
public function AnimeNews(int $id): array
    {
        return $this->myanimelist->getNewsList(
            new Request\Anime\AnimeNewsRequest($id)
        );
    }
573464
public function parse($achievement)
    {
        // add default fields
        $this->id = $achievement['achievement']['id'];
        $this->name = $achievement['achievement']['name'];
        $this->category = $achievement['achievement']['category'];

        // add requirements if available
        if (isset($achievement['requirements'])) {
            $this->requirements = $achievement['requirements'];
        }

        // add user state if available
        if (isset($achievement['level'])) {
            $this->level = $achievement['level'];
        }
        if (isset($achievement['score'])) {
            $this->score = $achievement['score'];
        }
    }
1086093
public function exportById($id): array
    {
        $user = Craft::$app->users->getUserById($id);
        return $this->export($user);
    }
1269293
public function exportById($id): array
    {
        $field = Craft::$app->fields->getFieldById((int) $id);

        return $this->export($field);
    }
346707
protected function getRowKey($id)
    {
        foreach ($this->getData() as $key => $data)
        {
            if ($data->{$this->databaseConfig->getIdentifier()} == $id)
            {
                return $key;
                break;
            }
        }
        throw new \Exception('No data found with ID: ' . $id);
    }