Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Egsago-n committed May 27, 2024
1 parent d5df976 commit 88f60cb
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 37 deletions.
2 changes: 0 additions & 2 deletions docs/source/api/objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Here is a list of all API objects.
.. autoclass:: phub.core.Client
:members:
:private-members:
:special-members: __new__

.. autoclass:: phub.objects.Account
:members:
Expand All @@ -21,7 +20,6 @@ Here is a list of all API objects.
.. autoclass:: phub.objects.Like
:members:
:private-members:
:special-members: __len__, __getitem__

.. autoclass:: phub.objects.FeedItem
:members:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/features/account.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Here is an example on how to view your account history.
history_length = 40
for i, video in enumerate(client.account.watched):
print(f'{i}. [{video.key}] "{video.title}"')
for video in client.account.watched:
print(f'Video {video.key} - "{video.title}"')
Accessing the feed
------------------
Expand Down
10 changes: 5 additions & 5 deletions docs/source/features/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ For instance, this query will be restrained to search in the French category.
...,
category = 'french',
exclude_category = ('bbw', 'german'),
production = 'homemade'
production = 'homemade',
...
)
Using queries
Expand Down Expand Up @@ -85,17 +86,16 @@ It is faster and more reliable, but provides less information.
Refreshing queries
------------------

As of right now, queries cannot be refreshed. Instead, you need
to initialise a new query.
Queries cannot be refreshed. Instead, you need to initialise a new query.

.. code-block:: python
# Check search results once every 10 min
args = dict(
query = 'my query',
category = 'french'
# Other parameters if you want
category = 'french',
...
)
while 1:
Expand Down
24 changes: 11 additions & 13 deletions docs/source/features/user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ objects.

.. code-block:: python
user = ...
user.name # The username
user.url # The link to the user page
user.bio # The user public biography (or None)
user.info # User data (relationship, orientation, etc.)
# Warning: Changing the client language affect this.
user.avatar # The user avatar as an phub.Image object.
user.videos # Query containing the videos posted by the user.
user.type # The type of the user (model, channels, pornstar, users, etc.)
# Only if the user is a pornstar
user.uploads # Pornstar personnal uploads
user = client.get(...)
user.name # The username
user.url # The link to the user page
user.bio # The user public biography (or None)
user.info # User data (relationship, orientation, etc.)
# Warning: Changing the client language affect this.
user.avatar # The user avatar as an phub.Image object.
user.videos # Query containing the videos posted by the user.
user.type # The type of the user (model, channels, pornstar, users, etc.)
user.uploads # if user is a Pornstar, stores the personal uploads
Refreshing User data
--------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/source/guides/pkg-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Each ``dictify`` method can take as argument a :py:class:`list[str]` of keys,
if you want to avoid fetching specific things.

Below is a list of all serializable PHUB objects, along with their keys.
PHUB objects are keys that redirect to a PHUB object.
"PHUB objects" are keys that redirect to a PHUB object.

.. list-table:: Serializable objects
:header-rows: 1
Expand Down Expand Up @@ -201,8 +201,8 @@ PHUB objects are keys that redirect to a PHUB object.
- ``user``, ``header``, ``item_type``
- /

By default, recursive keys will appear as ``repr`` strings, unless
you allow repulsiveness with ``object.dictify(recursive = True)``.
By default, PHUB object keys will appear as ``repr`` strings, unless
you allow it with ``object.dictify(recursive = True)``.

.. warning::

Expand Down
10 changes: 2 additions & 8 deletions docs/source/guides/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,17 @@ PHUB uses the following dependencies:
.. _click: https://pypi.org/project/click/
.. _ffmpeg-progress-yield: https://pypi.org/project/ffmpeg-progress-yield/

- Installing the lastest stable release (python 3.11 or higher):
- Installing the lastest stable release (python 3.9 or higher):

.. code-block:: bash
pip install --upgrade phub
- Installing the latest unstable updates (python 3.11 or higher):
- Installing the latest unstable updates (python 3.9 or higher):

.. code-block:: bash
pip install --upgrade git+https://github.com/Egsagon/PHUB.git
- There also is a python 3.10 branch. Beware it might not be updated as often.

.. code-block:: bash
pip install --upgrade git+https://github.com/Egsagon/[email protected]
You can use PHUB as a :doc:`CLI </guides/cli-usage>`,
a :doc:`GUI </guides/gui-usage>` or a :doc:`Python package </guides/pkg-usage>`.
6 changes: 2 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
PHUB documentation
==================

PHUB is an hybrid API for Pornhub. It is able to communicate with Pornhub
using both web-scraping and wrapping the Pornhub's HubTraffic API. It is
able to access most used or useful PH features, like video searching,
accessing account features, and more like video downloading.
PHUB is an easy-to-use API wrapper for Pornhub. It can access most used or useful
PH features, such as video searching, account features, video downloading, and more.

.. image:: assets/logo.svg
:align: center
Expand Down

0 comments on commit 88f60cb

Please sign in to comment.