-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,37 @@ | |
from internetarchive.exceptions import AccountAPIError | ||
from internetarchive.session import ArchiveSession | ||
|
||
""" | ||
internetarchive.account | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
:copyright: (C) 2012-2025 by Internet Archive. | ||
:license: AGPL 3, see LICENSE for more details. | ||
This module provides the `Account` class for interacting with user accounts on the | ||
Internet Archive. It requires administrative privileges. | ||
""" | ||
|
||
|
||
@dataclass | ||
class Account: | ||
""" | ||
A class for interacting with user accounts on the Internet Archive. | ||
Note: | ||
This class requires administrative privileges. | ||
This class provides methods to: | ||
- Fetch account details using various identifiers (e.g., email, screenname, itemname). | ||
- Lock and unlock accounts. | ||
- Convert account data to a dictionary for serialization. | ||
Example Usage: | ||
>>> from internetarchive.account import Account | ||
>>> account = Account.from_account_lookup('email', '[email protected]') | ||
>>> account.lock(comment="Locked spam account") | ||
>>> print(account.to_dict()) | ||
""" | ||
locked: bool | ||
verified: bool | ||
email: str | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters