From d6ec309977b791f4cdf136cf32c7dacc29cbab02 Mon Sep 17 00:00:00 2001 From: Lethys Date: Wed, 18 Nov 2020 15:17:08 +0000 Subject: [PATCH] Remove no longer supported lodestone requests --- README.md | 13 ------- pyxivapi/__init__.py | 2 +- pyxivapi/client.py | 82 -------------------------------------------- 3 files changed, 1 insertion(+), 96 deletions(-) diff --git a/README.md b/README.md index 9aaec36..134bf5b 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,7 @@ pip install pyxivapi * /index/search (e.g. recipe, item, action, pvpaction, mount, e.t.c.) * /index/id * /lore/search -* /lodestone -* /lodestone/news -* /lodestone/notices -* /lodestone/maintenance -* /lodestone/updates -* /lodestone/status * /lodestone/worldstatus -* /lodestone/devblog -* /lodestone/devposts -* /lodestone/deepdungeon -* /lodestone/feasts ## Documentation @@ -137,9 +127,6 @@ async def fetch_example_results(): language="de" ) - # Get all categories of posts from the Lodestone (cached evert 15 minutes) - lodestone = await client.lodestone_all() - await client.session.close() diff --git a/pyxivapi/__init__.py b/pyxivapi/__init__.py index 69d05a3..a5c132a 100644 --- a/pyxivapi/__init__.py +++ b/pyxivapi/__init__.py @@ -2,7 +2,7 @@ __author__ = 'Lethys' __license__ = 'MIT' __copyright__ = 'Copyright 2019 (c) Lethys' -__version__ = '0.3.1' +__version__ = '0.4.0' from .client import XIVAPIClient from .exceptions import ( diff --git a/pyxivapi/client.py b/pyxivapi/client.py index 971e509..e5bfa06 100644 --- a/pyxivapi/client.py +++ b/pyxivapi/client.py @@ -389,52 +389,6 @@ async def lore_search(self, query, language="en"): async with self.session.get(url, params=params) as response: return await self.process_response(response) - @timed - async def lodestone_all(self): - """|coro| - Request all categories of Lodestone posts. This function is recommended because it returns a cached (every 15 minutes) collection of - information and will return much quicker. - """ - url = f'{self.base_url}/lodestone?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - - @timed - async def lodestone_news(self): - """|coro| - Request posts under the topics Lodestone category. - """ - url = f'{self.base_url}/lodestone/news?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - - @timed - async def lodestone_notices(self): - """|coro| - Request posts under the notices Lodestone category. - """ - url = f'{self.base_url}/lodestone/notices?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - - @timed - async def lodestone_maintenance(self): - """|coro| - Request posts under the maintenance Lodestone category. - """ - url = f'{self.base_url}/lodestone/maintenance?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - - @timed - async def lodestone_updates(self): - """|coro| - Request posts under the updates Lodestone category. - """ - url = f'{self.base_url}/lodestone/updates?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - @timed async def lodestone_worldstatus(self): """|coro| @@ -444,42 +398,6 @@ async def lodestone_worldstatus(self): async with self.session.get(url) as response: return await self.process_response(response) - @timed - async def lodestone_devblog(self): - """|coro| - Request posts under the developer blog Lodestone category. - """ - url = f'{self.base_url}/lodestone/devblog?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - - @timed - async def lodestone_devposts(self): - """|coro| - Request developer posrs from the official FFXIV forums. - """ - url = f'{self.base_url}/lodestone/devposts?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - - @timed - async def lodestone_deepdungeon(self): - """|coro| - Request Deep Dungeon post from the Lodestone. - """ - url = f'{self.base_url}/lodestone/deepdungeon?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - - @timed - async def lodestone_feasts(self): - """|coro| - Request Feast post from the Lodestone. - """ - url = f'{self.base_url}/lodestone/feasts?private_key={self.api_key}' - async with self.session.get(url) as response: - return await self.process_response(response) - async def process_response(self, response): __log__.info(f'{response.status} from {response.url}')