Auth
airvpn.web.auth
AuthUser
Bases: WebUser
Represents the currently logged-in AirVPN user.
Extends WebUser with authentication and account-management
actions that require an active, authenticated session.
Attributes:
| Name | Type | Description |
|---|---|---|
session |
WebSession
|
The authenticated web session used for all requests made by this user. |
api |
APIManager
|
Manager for the user's api keys. |
ports |
PortManager
|
Manager for the user's forwarded ports. |
devices |
DeviceManager
|
Manager for the user's devices. |
sessions |
SessionManager
|
Manager for the user's active sessions. |
dns |
DnsManager
|
Manager for the user's dns settings. |
premium |
bool
|
Flag for if the user has a current plan. |
name |
str
|
Your display name. Inherited from |
id |
int
|
User's ID. Inherited from |
image |
str
|
URL of the user's profile image. Inherited from
|
profile_url |
str
|
Full URL to the user's profile page. Inherited
from |
content_count |
int | None
|
Number of content items (posts) the user
has made. Inherited property from |
followers |
int | None
|
Number of followers the user has. Inherited
property from |
community_reputation |
int | None
|
The user's community reputation
score. Inherited property from |
rank |
str | None
|
Display name of the user's rank. Inherited
property from |
joined |
datetime | None
|
Date and time the user joined. Inherited
property from |
last_visited |
datetime | None
|
Date and time of the user's last
visit. Inherited property from |
about |
About | None
|
The user's "About" information. Inherited
property from |
gender |
str | None
|
The user's disclosed gender. Inherited property
from |
location |
str | None
|
The user's disclosed location. Inherited
property from |
interests |
str | None
|
The user's disclosed interests. Inherited
property from |
about
property
About | None: The user's "About" information, including detailed rank data and birthday.
api
property
APIManager: Manager for the user's api keys
community_reputation
property
int | None: The user's community reputation score.
contacts
property
Contacts | None: The user's contact methods.
content_count
property
int | None: Number of content items (posts) the user has made.
devices
property
DeviceManager: Manager for the user's devices
dns
property
DnsManager: Manager for the user's dns settings
followers
property
int | None: Number of followers the user has.
gender
property
str | None: The user's disclosed gender.
image
property
str: The user's profile picture.
inbox
property
InboxManager: Manger for the user's inbox
interests
property
str | None: The user's disclosed interests.
joined
property
datetime | None: Date and time the user joined.
last_visited
property
datetime | None: Date and time of the user's last visit.
location
property
str | None: The user's disclosed location.
ports
property
PortManager: Manager for the user's forwarded ports.
rank
property
str | None: Display name of the user's rank, as shown in the profile header.
sessions
property
SessionManager: Manager for the user's sessions.
edit_profile(birthday: datetime = None, website: str = None, twitter: str = None, mastodon: str = None, aim: str = None, msn: str = None, icq: str = None, yahoo: str = None, xmpp: str = None, skype: str = None, gender: str = None, location: str = None, interests: str = None, about_me: str = None, profile_privacy: ProfilePrivacy = None) -> bool
Edit the authenticated user's profile.
Fetches the profile edit form to determine current values and the
CSRF token, then submits an update to the profile with the given
fields. Any argument left as None falls back to the current
value already on the form or on the user object (and ultimately to
an empty string, ProfilePrivacy.ALL, or a zeroed-out
datetime for birthday), so only the fields the caller wants to
change need to be supplied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
birthday
|
datetime
|
New birthday to set. Defaults to the user's current
|
None
|
website
|
str
|
New personal website URL. |
None
|
twitter
|
str
|
New Twitter/X handle. |
None
|
mastodon
|
str
|
New Mastodon handle. |
None
|
aim
|
str
|
New AIM contact identifier. |
None
|
msn
|
str
|
New MSN contact identifier. |
None
|
icq
|
str
|
New ICQ contact identifier. |
None
|
yahoo
|
str
|
New Yahoo contact identifier. |
None
|
xmpp
|
str
|
New XMPP/Jabber contact identifier. |
None
|
skype
|
str
|
New Skype contact identifier. |
None
|
gender
|
str
|
New disclosed gender. |
None
|
location
|
str
|
New disclosed location. |
None
|
interests
|
str
|
New disclosed interests. |
None
|
about_me
|
str
|
New "About Me" text. Defaults to the current value. |
None
|
profile_privacy
|
ProfilePrivacy
|
New |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
|
follow() -> bool
Follow this member.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
|
get_unread_notifications() -> tuple[list[Notification], list[Message]]
Retrieves a list of unread notifications and messages for the authenticated user.
Returns:
| Type | Description |
|---|---|
tuple[list[Notification], list[Message]]
|
tuple[list[Notification], list[Message]]: A tuple containing two lists:
- A list of |
login(username: Optional[str] = None, password: Optional[str] = None, remember_me: bool = False, session_key: Optional[str] = None)
Login to the AirVPN website.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Account username or email address. |
None
|
password
|
str
|
Account password. |
None
|
rememeber_me
|
bool
|
Whether or not to store the session's credentials. |
required |
session_key
|
str
|
The value from |
None
|
Raises:
| Type | Description |
|---|---|
LoginError
|
If the login request does not redirect away from the login page (indicating invalid credentials or a failed login attempt). |
unfollow() -> bool
Unfollow the user.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
|
update()
Force update attributes.