lib/SteamCondenser/Community/GameItemSchema.php
public function internalFetch() {
        $params = ['language' => $this->language];
        $data = WebApi::getJSONData("IEconItems_{$this->appId}", 'GetSchema', 1, $params);

        $this->attributes = [];
        foreach ($data->attributes as $attribute) {
            $this->attributes[$attribute->defindex] = $attribute;
            $this->attributes[$attribute->name] = $attribute;
        }

        $this->effects = [];
        foreach ($data->attribute_controlled_attached_particles as $effect) {
            $this->effects[$effect->id] = $effect;
        }

        $this->items = [];
        $this->itemNames = [];
        foreach ($data->items as $item) {
            $this->items[$item->defindex] = $item;
            $this->itemNames[$item->name] = $item->defindex;
        }

        if (!empty($data->levels)) {
            $this->itemLevels = [];
            foreach ($data->item_levels as $itemLevelType) {
                $itemLevels = [];
                foreach ($itemLevelType->levels as $itemLevel) {
                    $itemLevels[$itemLevel->level] = $itemLevel->name;
                }
                $this->itemLevels[$itemLevelType->name] = $itemLevels;
            }
        }

        $this->itemSets = [];
        foreach ($data->item_sets as $itemSet) {
            $this->itemSets[$itemSet->item_set] = $itemSet;
        }

        $this->origins = [];
        foreach ($data->originNames as $origin) {
            $this->origins[$origin->origin] = $origin->name;
        }

        $this->qualities = [];
        $index = -1;
        foreach ($data->qualities as $key => $value) {
            $index ++;
            if (property_exists($data->qualityNames, $key)) {
                $qualityName = $data->qualityNames->$key;
            }
            if (empty($qualityName)) {
                $qualityName = ucwords($key);
            }
            $this->qualities[$index] = $qualityName;
        }
    }
public function internalFetch() {
        $params = ['language' => $this->language];
        $data = WebApi::getJSONData("IEconItems_{$this->appId}", 'GetSchema', 1, $params);

        $this->attributes = [];
        foreach ($data->attributes as $attribute) {
            $this->attributes[$attribute->defindex] = $attribute;
            $this->attributes[$attribute->name] = $attribute;
        }

        $this->effects = [];
        foreach ($data->attribute_controlled_attached_particles as $effect) {
            $this->effects[$effect->id] = $effect;
        }

        $this->items = [];
        $this->itemNames = [];
        foreach ($data->items as $item) {
            $this->items[$item->defindex] = $item;
            $this->itemNames[$item->name] = $item->defindex;
        }

        if (!empty($data->levels)) {
            $this->itemLevels = [];
            foreach ($data->item_levels as $itemLevelType) {
                $itemLevels = [];
                foreach ($itemLevelType->levels as $itemLevel) {
                    $itemLevels[$itemLevel->level] = $itemLevel->name;
                }
                $this->itemLevels[$itemLevelType->name] = $itemLevels;
            }
        }

        $this->itemSets = [];
        foreach ($data->item_sets as $itemSet) {
            $this->itemSets[$itemSet->item_set] = $itemSet;
        }

        $this->origins = [];
        foreach ($data->originNames as $origin) {
            $this->origins[$origin->origin] = $origin->name;
        }

        $this->qualities = [];
        $index = -1;
        foreach ($data->qualities as $key => $value) {
            $index ++;
            if (property_exists($data->qualityNames, $key)) {
                $qualityName = $data->qualityNames->$key;
            }
            if (empty($qualityName)) {
                $qualityName = ucwords($key);
            }
            $this->qualities[$index] = $qualityName;
        }
    }
Updates the item definitions of this schema using the Steam Web API

@throws \SteamCondenser\Exceptions\WebApiException if the item schema
cannot be fetched