Skip to content

Commit

Permalink
Merge pull request #11 from xivapi/remove-lodestone
Browse files Browse the repository at this point in the history
Remove no longer supported lodestone requests
  • Loading branch information
Yandawl authored Nov 18, 2020
2 parents f2f462f + d6ec309 commit 4237250
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 96 deletions.
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://xivapi.com/docs/>
Expand Down Expand Up @@ -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()


Expand Down
2 changes: 1 addition & 1 deletion pyxivapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
82 changes: 0 additions & 82 deletions pyxivapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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}')

Expand Down

0 comments on commit 4237250

Please sign in to comment.