Skip to content

Commit 269d739

Browse files
authored
Merge pull request #24 from Galarzaa90/dev
v3.0.0
2 parents d1745b2 + 7b9eaed commit 269d739

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+5181
-1910
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [3.5, 3.6, 3.7]
12+
python-version: [3.6, 3.7]
1313

1414
steps:
1515
- uses: actions/checkout@v1

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
language: python
22

33
python:
4-
- "3.5"
54
- "3.6"
6-
- "3.7-dev"
7-
- "pypy3.5"
5+
- "3.7"
6+
- "3.8"
87

98
cache: pip
109

@@ -34,7 +33,7 @@ after_script:
3433
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then codecov; fi
3534

3635
deploy:
37-
provider: pages
36+
provider: pagestotal_pages
3837
skip_cleanup: true
3938
github-token: $GITHUB_TOKEN
4039
local-dir: docs/_build/html

CHANGELOG.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,35 @@ Changelog
66
Due to this library relying on external content, older versions are not guaranteed to work.
77
Try to always use the latest version.
88

9+
.. v3.0.0:
10+
11+
3.0.0 (2020-07-13)
12+
==================
13+
- The ``Client`` class' methods now return their responses wrapped in a ``TibiaResponse`` object.
14+
This contains information about Tibia.com's cache.
15+
- Added parsing for Guild wars.
16+
- Added class ``GuildWars``
17+
- Added class ``GuildWarsEntry``
18+
- Added ``url_wars`` property and ``get_url_wars`` class method to all Guild classes.
19+
- Added ``active_war`` attribute to ``Guild``.
20+
- Added parsing for the Tibia forums: Boards, Threads, Posts, Announcements
21+
- Added classes ``ForumBoard`` and ``ListedBoard``
22+
- Added classes ``ForumThread`` and ``ListedThread``
23+
- Added classes ``ForumAnnouncement`` and ``ListedAnnouncement``
24+
- Added classes ``ForumPost``
25+
- Added auxiliary classes ``LastPost``, ``ForumAuthor`` and ``ThreadStatus``.
26+
- Added property ``thread_url`` to ``News``.
27+
- Updated highscores for Summer Update 2020:
28+
- ``page`` and ``total_pages`` are now fields instead of properties.
29+
- Added ``last_updated`` field.
30+
- Added ``Category.GOSHNARS_TAINT`` and ``Category.CHARM_POINTS``.
31+
- Added ``VocationFilter.NONE``.
32+
- Removed deprecated property ``house`` from ``Character``, use ``houses`` instead.
33+
- Removed support for Python 3.5.
34+
- Changed the hierarchy of base classes. Base classes no longer implement ``Serializable``, ``Serializable`` is now
35+
directly implemented by most classes.
36+
- Removed TibiaData functionality.
37+
938
.. _v2.5.1:
1039

1140
2.5.1 (2020-05-27)

docs/api.rst

Lines changed: 115 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Client
1414
.. autoclass:: Client
1515
:members:
1616

17+
.. autoclass:: TibiaResponse
18+
:members:
19+
1720
Enumerations
1821
============
1922
Enumerations are provided for various values in order to avoid depending on strings.
@@ -55,6 +58,10 @@ Enumerations are provided for various values in order to avoid depending on stri
5558
:members:
5659
:undoc-members:
5760

61+
.. autoclass:: ThreadStatus
62+
:members:
63+
:undoc-members:
64+
5865
.. autoclass:: TournamentWorldType
5966
:members:
6067
:undoc-members:
@@ -75,8 +82,6 @@ Enumerations are provided for various values in order to avoid depending on stri
7582
:members:
7683
:undoc-members:
7784

78-
.. automethod:: VocationFilter.from_name
79-
8085
.. autoclass:: WorldLocation
8186
:members:
8287
:undoc-members:
@@ -98,12 +103,48 @@ Character
98103
:members:
99104
:inherited-members:
100105

106+
CMPostArchive
107+
-------------
108+
.. autoclass:: CMPostArchive
109+
:members:
110+
:inherited-members:
111+
112+
EventSchedule
113+
-------------
114+
.. autoclass:: EventSchedule
115+
:members:
116+
:inherited-members:
117+
118+
ForumAnnouncement
119+
-----------------
120+
.. autoclass:: ForumAnnouncement
121+
:members:
122+
:inherited-members:
123+
124+
ForumBoard
125+
----------
126+
.. autoclass:: ForumBoard
127+
:members:
128+
:inherited-members:
129+
130+
ForumThread
131+
-----------
132+
.. autoclass:: ForumThread
133+
:members:
134+
:inherited-members:
135+
101136
Guild
102137
-----
103138
.. autoclass:: Guild
104139
:members:
105140
:inherited-members:
106141

142+
GuildWars
143+
---------
144+
.. autoclass:: GuildWars
145+
:members:
146+
:inherited-members:
147+
107148
Highscores
108149
----------
109150
.. autoclass:: Highscores
@@ -122,6 +163,18 @@ KillStatistics
122163
:members:
123164
:inherited-members:
124165

166+
ListedAnnouncement
167+
------------------
168+
.. autoclass:: ListedAnnouncement
169+
:members:
170+
:inherited-members:
171+
172+
ListedBoard
173+
-----------
174+
.. autoclass:: ListedBoard
175+
:members:
176+
:inherited-members:
177+
125178
ListedGuild
126179
-----------
127180
.. autoclass:: ListedGuild
@@ -140,6 +193,12 @@ ListedNews
140193
:members:
141194
:inherited-members:
142195

196+
ListedThread
197+
------------
198+
.. autoclass:: ListedThread
199+
:members:
200+
:inherited-members:
201+
143202
ListedTournament
144203
-----------------------
145204
.. autoclass:: ListedTournament
@@ -211,12 +270,36 @@ CharacterHouse
211270
:members:
212271
:inherited-members:
213272

273+
CMPost
274+
------
275+
.. autoclass:: CMPost
276+
:members:
277+
:inherited-members:
278+
279+
EventEntry
280+
-------------
281+
.. autoclass:: EventEntry
282+
:members:
283+
:inherited-members:
284+
214285
ExpHighscoresEntry
215-
-------------------------
286+
------------------
216287
.. autoclass:: ExpHighscoresEntry
217288
:members:
218289
:inherited-members:
219290

291+
ForumAuthor
292+
-----------
293+
.. autoclass:: ForumAuthor
294+
:members:
295+
:inherited-members:
296+
297+
ForumEmoticon
298+
-------------
299+
.. autoclass:: ForumEmoticon
300+
:members:
301+
:inherited-members:
302+
220303
Death
221304
-----
222305
.. autoclass:: Death
@@ -247,6 +330,11 @@ GuildMembership
247330
:members:
248331
:inherited-members:
249332

333+
GuildWarEntry
334+
-------------
335+
.. autoclass:: GuildWarEntry
336+
:members:
337+
:inherited-members:
250338

251339
HighscoresEntry
252340
---------------
@@ -260,6 +348,12 @@ Killer
260348
:members:
261349
:inherited-members:
262350

351+
LastPost
352+
--------
353+
.. autoclass:: LastPost
354+
:members:
355+
:inherited-members:
356+
263357
LeaderboardEntry
264358
----------------
265359
.. autoclass:: LeaderboardEntry
@@ -314,6 +408,15 @@ The following classes are not meant to be used or instantiated, but are document
314408

315409
They implement methods and properties that can be inherited by other classes to implement their functionality.
316410

411+
412+
.. autoclass:: tibiapy.abc.BaseAnnouncement
413+
:members:
414+
:inherited-members:
415+
416+
.. autoclass:: tibiapy.abc.BaseBoard
417+
:members:
418+
:inherited-members:
419+
317420
.. autoclass:: tibiapy.abc.BaseCharacter
318421
:members:
319422
:inherited-members:
@@ -326,14 +429,22 @@ They implement methods and properties that can be inherited by other classes to
326429
:members:
327430
:inherited-members:
328431

329-
.. autoclass:: tibiapy.abc.BaseHouseWithId
432+
.. autoclass:: tibiapy.abc.HouseWithId
330433
:members:
331434
:inherited-members:
332435

333436
.. autoclass:: tibiapy.abc.BaseNews
334437
:members:
335438
:inherited-members:
336439

440+
.. autoclass:: tibiapy.abc.BasePost
441+
:members:
442+
:inherited-members:
443+
444+
.. autoclass:: tibiapy.abc.BaseThread
445+
:members:
446+
:inherited-members:
447+
337448
.. autoclass:: tibiapy.abc.BaseTournament
338449
:members:
339450
:inherited-members:

docs/conf.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212

1313
def setup(app):
14-
app.add_stylesheet('custom.css')
15-
app.add_javascript('custom.js')
14+
app.add_css_file('custom.css')
15+
app.add_js_file('custom.js')
1616

1717
# -- Path setup --------------------------------------------------------------
1818

@@ -29,7 +29,7 @@ def setup(app):
2929
# -- Project information -----------------------------------------------------
3030

3131
project = 'Tibia.py'
32-
copyright = '2018, Allan Galarza'
32+
copyright = '2020, Allan Galarza'
3333
author = 'Allan Galarza'
3434

3535
# The short X.Y version
@@ -56,8 +56,7 @@ def setup(app):
5656
'sphinx.ext.viewcode',
5757
'sphinx.ext.githubpages',
5858
'sphinx.ext.napoleon',
59-
'sphinx.ext.coverage',
60-
'sphinxcontrib.asyncio'
59+
'sphinx.ext.coverage'
6160
]
6261

6362
# Add any paths that contain templates here, relative to this directory.
@@ -196,5 +195,5 @@ def setup(app):
196195
# Example configuration for intersphinx: refer to the Python standard library.
197196
intersphinx_mapping = {
198197
'https://docs.python.org/': None,
199-
'aiohttp': ('https://aiohttp.readthedocs.io/en/stable/', None)
198+
'aiohttp': ('https://aiohttp.readthedocs.io/en/stable/', None),
200199
}

docs/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Tibia.py
99

1010

1111
Tibia.py is a library for parsing HTML content from Tibia.com_. into Python objects.
12-
It can also parse json content from TibiaData_.
1312

1413
**Features:**
1514

@@ -22,7 +21,6 @@ It can also parse json content from TibiaData_.
2221

2322

2423
.. _Tibia.com: https://www.tibia.com/news/?subtopic=latestnews
25-
.. _TibiaData: https://www.tibiadata.com/
2624
.. _aiohttp: https://aiohttp.readthedocs.io/en/stable/
2725

2826

docs/intro.rst

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Introduction
66

77
Prerequisites
88
=============
9-
Tibia.py requires Python 3.5 or higher.
9+
Tibia.py requires Python 3.6 or higher.
1010
Dependencies are installed automatically when installing the package.
1111

1212
However, since it uses ``lxml`` for parsing, on Linux you may require to install libxml on your system.
@@ -39,8 +39,8 @@ The asynchronous client (:class:`tibiapy.Client`) contains methods to obtain inf
3939

4040
The parsing methods allow you to get Python objects given the html content of a page.
4141

42-
The main models have a ``get_url``/``get_url_tibiadata`` method that can be used to get their Tibia.com/TibiaData.com page.
43-
With the url, the html/json content can be fetched and then passed to their ``from_content``/``from_tibiadata`` methods.
42+
The main models have a ``get_url`` method that can be used to get their Tibia.com page.
43+
With the url, the html/json content can be fetched and then passed to their ``from_content`` methods.
4444

4545
This allows you to use any networking module to obtain the data, and use the library to parse it.
4646

@@ -67,10 +67,29 @@ Supported Sections
6767
+============================+============================================+=============================================+
6868
| Characters_ | :meth:`Character.from_content` | :meth:`Client.fetch_character` |
6969
+----------------------------+--------------------------------------------+---------------------------------------------+
70+
| `CM Post Archive`_ | :meth:`CMPostArchive.from_content` | :meth:`Client.fetch_cm_post_archive` |
71+
+----------------------------+--------------------------------------------+---------------------------------------------+
72+
| `Event Schedule`_ | :meth:`EventSchedule.from_content` | :meth:`Client.fetch_event_schedule` |
73+
+----------------------------+--------------------------------------------+---------------------------------------------+
7074
| Guilds_ (Individual) | :meth:`Guild.from_content` | :meth:`Client.fetch_guild` |
7175
+----------------------------+--------------------------------------------+---------------------------------------------+
7276
| Guilds_ (List) | :meth:`ListedGuild.list_from_content` | :meth:`Client.fetch_world_guilds` |
7377
+----------------------------+--------------------------------------------+---------------------------------------------+
78+
| Guilds_ (Wars) | :meth:`GuildWars.from_content` | :meth:`Client.fetch_guild_wars` |
79+
+----------------------------+--------------------------------------------+---------------------------------------------+
80+
| Forums_ (Section) | :meth:`ListedBoard.list_from_content` | :meth:`Client.fetch_forum_world_boards` |
81+
| | | :meth:`Client.fetch_forum_trade_boards` |
82+
| | | :meth:`Client.fetch_forum_community_boards` |
83+
| | | :meth:`Client.fetch_forum_support_boards` |
84+
+----------------------------+--------------------------------------------+---------------------------------------------+
85+
| Forums_ (Board) | :meth:`ForumBoard.from_content` | :meth:`Client.fetch_forum_board` |
86+
+----------------------------+--------------------------------------------+---------------------------------------------+
87+
| Forums_ (Announcement) | :meth:`ForumAnnouncement.from_content` | :meth:`Client.fetch_forum_announcement` |
88+
+----------------------------+--------------------------------------------+---------------------------------------------+
89+
| Forums_ (Thread) | :meth:`ForumThread.from_content` | :meth:`Client.fetch_forum_thread` |
90+
+----------------------------+--------------------------------------------+---------------------------------------------+
91+
| Highscores_ | :meth:`Highscores.from_content` | :meth:`Client.fetch_highscores_page` |
92+
+----------------------------+--------------------------------------------+---------------------------------------------+
7493
| Highscores_ | :meth:`Highscores.from_content` | :meth:`Client.fetch_highscores_page` |
7594
+----------------------------+--------------------------------------------+---------------------------------------------+
7695
| Houses_ (Individual) | :meth:`House.from_content` | :meth:`Client.fetch_house` |
@@ -95,7 +114,10 @@ Supported Sections
95114

96115

97116
.. _Characters: https://www.tibia.com/community/?subtopic=characters
117+
.. _CM Post Archive: https://www.tibia.com/forum/?subtopic=forum&action=cm_post_archive
118+
.. _Event Schedule: https://www.tibia.com/news/?subtopic=eventcalendar
98119
.. _Guilds: https://www.tibia.com/community/?subtopic=guilds
120+
.. _Forums: https://www.tibia.com/community/?subtopic=forum
99121
.. _Highscores: https://www.tibia.com/community/?subtopic=highscores
100122
.. _Houses: https://www.tibia.com/community/?subtopic=houses
101123
.. _Kill Statistics: https://www.tibia.com/community/?subtopic=killstatistics

0 commit comments

Comments
 (0)