예제 #1
0
파일: apiclient.py 프로젝트: frenos/gw2app
 def getItemIdsChunked(self):
     """
     Get all available itemId from API and return them chunked.
     :return: list of lists of itemIds
     """
     allItemIds = self.getItemIds()
     return idList2Chunks(allItemIds)
예제 #2
0
파일: apiclient.py 프로젝트: frenos/gw2app
 def getPriceIdsChunked(self):
     """
     Get all available price-ids.
     :return: list of list of price-ids
     """
     allPriceIds = self.getPriceIds()
     return idList2Chunks(allPriceIds)
예제 #3
0
파일: apiclient.py 프로젝트: frenos/gw2app
 def getMaps(self):
     """
     Get information about maps from the api.
     :return: information about all maps as list of dict
     """
     url = apiBaseUrl + apiEndpoints["Maps"]
     params = {"lang": apiLanguage}
     response = self.httpSession.get(url=url, params=params)
     mapIds = response.json()
     mapData = []
     if len(mapIds) > 0:
         mapdIsChunked = idList2Chunks(mapIds)
         for chunk in mapdIsChunked:
             idsString = idList2String(chunk)
             params = {"lang": apiLanguage,
                       "ids": idsString}
             response = self.httpSession.get(url=url, params=params)
             mapData.extend(response.json())
     return mapData
예제 #4
0
파일: apiclient.py 프로젝트: frenos/gw2app
 def getRecipeIdsChunked(self):
     allRecipeIds = self.getRecipeIds()
     return idList2Chunks(allRecipeIds)