MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / parse

Method parse

pokemongo_bot/inventory.py:253–262  ·  view source on GitHub ↗

Make an instance of an Item from raw item data. :param item_data: Item data to make an item from :return: Instance of the Item. :rtype: Item

(self, item_data)

Source from the content-addressed store, hash-verified

251 STATIC_DATA_FILE = os.path.join(_base_dir, 'data', 'items.json')
252
253 def parse(self, item_data):
254 """
255 Make an instance of an Item from raw item data.
256 :param item_data: Item data to make an item from
257 :return: Instance of the Item.
258 :rtype: Item
259 """
260 item_id = item_data.get(Items.ID_FIELD, None)
261 item_count = item_data['count'] if 'count' in item_data else 0
262 return Item(item_id, item_count)
263
264 def all(self):
265 """

Callers 8

browserMqtt.jsFile · 0.45
buildBuilderBrowserFunction · 0.45
connectFunction · 0.45
urlParseFunction · 0.45
displayChatMessageOnMapFunction · 0.45
timeUntilFunction · 0.45
initialiseEventBusFunction · 0.45
load_gpxMethod · 0.45

Calls 2

ItemClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected