H5 API definations

pydantic model aioqzone.model.api.QzoneApi

The base class for all Qzone APIs below.

Fields:
field params: TypeVar(TyRequest, bound= QzoneRequestParams) [Optional]
field referer: str = 'https://h5.qzone.qq.com/'
accept: ClassVar[Optional[str]] = None
attach_token: ClassVar[bool] = True
host: ClassVar[str] = 'https://h5.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]]
keep_alive: ClassVar[bool] = True
path: ClassVar[str]
response: ClassVar[Type[TypeVar(TyResponse, bound= QzoneResponse)]]
property url: URL
pydantic model aioqzone.model.api.IndexPageApi
Fields:

response

IndexPageResp 的别名

attach_token: ClassVar[bool] = False
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'GET'
keep_alive: ClassVar[bool] = False
path: ClassVar[str] = '/mqzone/index'
pydantic model aioqzone.model.api.UserProfileApi
Fields:

response

ProfilePagePesp 的别名

attach_token: ClassVar[bool] = False
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'GET'
keep_alive: ClassVar[bool] = False
path: ClassVar[str] = '/mqzone/profile'
pydantic model aioqzone.model.api.FeedPageApi
Fields:

response

FeedPageResp 的别名

http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'GET'
path: ClassVar[str] = '/webapp/json/mqzone_feeds/getActiveFeeds'
pydantic model aioqzone.model.api.ShuoshuoApi
Fields:

response

DetailResp 的别名

http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'GET'
path: ClassVar[str] = '/webapp/json/mqzone_detail/shuoshuo'
pydantic model aioqzone.model.api.GetFeedsApi
Fields:

response

ProfileResp 的别名

host: ClassVar[str] = 'https://mobile.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'GET'
path: ClassVar[str] = '/get_feeds'
pydantic model aioqzone.model.api.GetCountApi
Fields:
field params: GetCountParams [Optional]
response

FeedCount 的别名

accept: ClassVar[str] = 'application/json'
host: ClassVar[str] = 'https://mobile.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'GET'
path: ClassVar[str] = '/feeds/mfeeds_get_count'
pydantic model aioqzone.model.api.LikeApi
Fields:

response

SingleReturnResp 的别名

http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'POST'
path: ClassVar[str] = '/proxy/domain/w.qzone.qq.com/cgi-bin/likes/internal_dolike_app'
pydantic model aioqzone.model.api.UnlikeApi
Fields:

path: ClassVar[str] = '/proxy/domain/w.qzone.qq.com/cgi-bin/likes/internal_unlike_app'
pydantic model aioqzone.model.api.AddCommentApi
Fields:

response

AddCommentResp 的别名

http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'POST'
path: ClassVar[str] = '/webapp/json/qzoneOperation/addComment'
pydantic model aioqzone.model.api.ListFriendApi
Fields:

host: ClassVar[str] = 'https://mobile.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'GET'
path: ClassVar[str] = '/friend/mfriend_list'
pydantic model aioqzone.model.api.PublishMoodApi
Fields:

response

PublishMoodResp 的别名

host: ClassVar[str] = 'https://mobile.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'POST'
path: ClassVar[str] = '/mood/publish_mood'
pydantic model aioqzone.model.api.AddOperationApi
Fields:
field response: Type[QzoneResponse] [Required]
host: ClassVar[str] = 'https://mobile.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'POST'
path: ClassVar[str] = 'operation/operation_add'
pydantic model aioqzone.model.api.UploadPicApi
Fields:

response

UploadPicResponse 的别名

host: ClassVar[str] = 'https://mobile.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'POST'
path: ClassVar[str] = '/up/cgi-bin/upload/cgi_upload_pic_v2'
pydantic model aioqzone.model.api.PhotosPreuploadApi
Fields:

response

PhotosPreuploadResponse 的别名

host: ClassVar[str] = 'https://mobile.qzone.qq.com'
http_method: ClassVar[Union[Literal['GET'], Literal['POST']]] = 'POST'
path: ClassVar[str] = '/up/cgi-bin/upload/cgi_upload_pic_v2'

Parameters

pydantic model aioqzone.model.api.request.QzoneRequestParams
build_params(uin, timestamp=None)
ts_fields: ClassVar[Tuple[str, ...]] = ()
uin_fields: ClassVar[Tuple[str, ...]] = ()
pydantic model aioqzone.model.api.request.ActiveFeedsParams
Fields:
field attach_info: str [Required]
pydantic model aioqzone.model.api.request.GetFeedsParams
Fields:
field attach_info: str = ''
field format: str = 'json'
field hostuin: int [Required]
field refresh_type: int = 2
field res_type: int = 2
pydantic model aioqzone.model.api.request.ProfileParams
Fields:
field hostuin: int [Required]
field start_time: float = 0
ms(start_time)
ts_fields: t.ClassVar[t.Tuple[str, ...]] = ('starttime',)
pydantic model aioqzone.model.api.request.ShuoshuoParams
Fields:
field appid: int = 311
field busi_param: str = ''
Constraints:
  • max_length = 100

field count: int = 20
field fid: str [Required]
field format: str = 'json'
field refresh_type: int = 31
field subid: str = ''
field uin: int [Required]
pydantic model aioqzone.model.api.request.GetCountParams
Fields:
field format: str = 'json'
pydantic model aioqzone.model.api.request.DolikeParam
Fields:
field appid: int [Required]
field curkey: str [Required]
field format: str = 'purejson'
field opr_type: str = 'like'
field unikey: str [Required]
uin_fields: t.ClassVar[t.Tuple[str, ...]] = ('opuin',)
pydantic model aioqzone.model.api.request.AddCommentParams
Fields:
field appid: int = 311
field busi_param: dict [Optional]
field bypass_param: dict [Optional]
field content: str [Required]
Constraints:
  • min_length = 1

  • max_length = 2000

field fid: str [Required]
field ownuin: int [Required]
field private: int [Required]
uin_fields: t.ClassVar[t.Tuple[str, ...]] = ('uin',)
pydantic model aioqzone.model.api.request.PublishMoodParams
Fields:
field content: str [Required]
Constraints:
  • min_length = 1

  • max_length = 2000

field format: str = 'json'
field opr_type: str = 'publish_shuoshuo'
field photos: List[PhotoData] [Optional]
field sync_weibo: int = False
field ugc_right: UgcRight = UgcRight.all
richval(photos)
uin_fields: t.ClassVar[t.Tuple[str, ...]] = ('res_uin',)
pydantic model aioqzone.model.api.request.DeleteUgcParams
Fields:
field appid: int [Required]
field fid: str [Required]
field format: str = 'json'
field opr_type: str = 'delugc'
field real_del: int = 0
uin_fields: t.ClassVar[t.Tuple[str, ...]] = ('res_uin',)
pydantic model aioqzone.model.api.request.UploadPicParams
Fields:
field Exif_CameraMaker: str = ''
field Exif_CameraModel: str = ''
field Exif_Time: str = ''
field base64: int = 1
field charset: str = 'utf-8'
field hd_height: int [Required]
field hd_quality: int = 70
field hd_width: int [Required]
field logintype: str = 'sid'
field output_charset: str = 'utf-8'
field output_type: str = 'json'
field picture: bytes [Required]
field preupload: int = 1
b64_picture(picture)
返回类型:

str

classmethod from_bytes(image_bytes, quality=70)
classmethod from_image(image_file, quality=70)
uin_fields: t.ClassVar[t.Tuple[str, ...]] = ('uin',)
pydantic model aioqzone.model.api.request.PhotosPreuploadParams
Fields:
field albumtype: int = 7
field big_style: int = 1
field charset: str = 'utf-8'
field cur_num: int = 0
field op_src: int = 15003
field output_charset: str = 'utf-8'
field output_type: str = 'json'
field preupload: int = 2
field refer: str = 'shuoshuo'
field upload_hd: int = 0
field upload_pics: List[UploadPicResponse] [Required]
field uploadtype: int = 1
build_params(uin, timestamp=None)
uin_fields: t.ClassVar[t.Tuple[str, ...]] = ('uin',)
property uploadNum
class aioqzone.model.api.request.UgcRight(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
unknown = 0
all = 1
qq = 4
part = 16
self = 64
blacklist = 128
pydantic model aioqzone.model.api.request.PhotoData
Fields:
field albumid: str [Required]
field height: int = 0
field lloc: str [Required]
field origin_height: int = 0
field origin_uuid: str = ''
field origin_width: int = 0
field sloc: str [Required]
field type: str = ''
field width: int = 0
classmethod from_PicInfo(o)
to_richval()

Responses

pydantic model aioqzone.model.api.response.QzoneResponse
classmethod from_response_object(obj)

Parses the response text or object recieved from Qzone API.

参数:

obj (Dict[str, Union[bool, int, str, Dict[Union[str, int], Union[bool, int, str, Dict[Union[str, int], JsonValue], List[JsonValue]]], List[Union[bool, int, str, Dict[Union[str, int], JsonValue], List[JsonValue]]]]]) – the parsed response object. see .response_to_object

抛出:

aioqzone.exception.QzoneError – if returned result code != 0

返回类型:

Self

返回:

Self

async classmethod response_to_object(response)
返回类型:

Dict[str, Union[bool, int, str, Dict[Union[str, int], Union[bool, int, str, Dict[Union[str, int], JsonValue], List[JsonValue]]], List[Union[bool, int, str, Dict[Union[str, int], JsonValue], List[JsonValue]]]]]

pydantic model aioqzone.model.api.response.FeedPageResp

Represents RESPonse from get feed page operation. Used to validate response data in aioqzone.api.h5.QzoneH5API.index() and aioqzone.api.h5.QzoneH5API.getActivateFeeds()

Fields:
field attachinfo: str = ''
field hasmore: bool = False
field newcnt: int [Required]
field undeal_info: FeedCount [Required]
field vFeeds: List[FeedData] [Required]
pydantic model aioqzone.model.api.response.ProfileResp
Fields:
field vFeeds: List[ProfileFeedData] [Required]
pydantic model aioqzone.model.api.response.IndexPageResp
Fields:
field qzonetoken: str = ''
async classmethod response_to_object(response)
pydantic model aioqzone.model.api.response.ProfilePagePesp
Fields:
field feedpage: ProfileResp [Required]
field info: QzoneInfo [Required]
field qzonetoken: str [Required]
classmethod from_response_object(obj)

Parses the response text or object recieved from Qzone API.

参数:

obj (Dict[str, Union[bool, int, str, Dict[Union[str, int], Union[bool, int, str, Dict[Union[str, int], JsonValue], List[JsonValue]]], List[Union[bool, int, str, Dict[Union[str, int], JsonValue], List[JsonValue]]]]]) – the parsed response object. see .response_to_object

抛出:

aioqzone.exception.QzoneError – if returned result code != 0

返回类型:

Self

返回:

Self

async classmethod response_to_object(response)
pydantic model aioqzone.model.api.response.DetailResp
Fields:
Validators:
field attach_info: str = ''
Validated by:
field hasmore: bool = False
Validated by:
validator remove_prefix  »  all fields
pydantic model aioqzone.model.api.response.FeedCount
Fields:
field active_cnt: int = 0
field gamebar_cnt: int = 0
field gift_cnt: int = 0
field passive_cnt: int = 0
field visitor_cnt: int = 0
pydantic model aioqzone.model.api.response.SingleReturnResp
model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

返回类型:

None

Args:

self: The BaseModel instance. context: The context.

pydantic model aioqzone.model.api.response.AddCommentResp
Fields:
field commentLikekey: Annotated[Url] [Required]
Constraints:
  • max_length = 2083

  • allowed_schemes = [‘http’, ‘https’]

field commentid: int = 0
field msg: str = ''
field ret: int = 0
field verifyurl: str = ''
pydantic model aioqzone.model.api.response.PublishMoodResp
Fields:
field fid: str [Required]
field msg: str = ''
field ret: int = 0
field undeal_info: FeedCount [Optional]
pydantic model aioqzone.model.api.response.DeleteUgcResp
Fields:
field msg: str = ''
field ret: int = 0
field undeal_info: FeedCount [Optional]
pydantic model aioqzone.model.api.response.UploadPicResponse
Fields:
field filelen: int [Required]
field filemd5: str [Required]
model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

返回类型:

None

Args:

self: The BaseModel instance. context: The context.

async classmethod response_to_object(response)
pydantic model aioqzone.model.api.response.PhotosPreuploadResponse
Fields:
field photos: List[PicInfo] [Optional]
model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

返回类型:

None

Args:

self: The BaseModel instance. context: The context.

async classmethod response_to_object(response)
pydantic model aioqzone.model.api.response.FeedData
Fields:
  • comment (aioqzone.model.api.feed.FeedComment)

  • like (aioqzone.model.api.feed.LikeInfo)

  • original (aioqzone.model.api.feed.FeedOriginal | aioqzone.model.api.feed.Share | None)

  • share_info (aioqzone.model.api.feed.ShareInfo)

field comment: FeedComment [Optional]
field like: LikeInfo [Optional]
field original: Union[FeedOriginal, Share, None] = None
Constraints:
  • union_mode = left_to_right

field share_info: ShareInfo [Optional]
pydantic model aioqzone.model.api.response.PicInfo
Fields:
field albumid: str [Required]
field height: int [Required]
field lloc: str [Required]
field pre: Annotated[Url] [Required]
Constraints:
  • max_length = 2083

  • allowed_schemes = [‘http’, ‘https’]

field sloc: str [Required]
field url: Annotated[Url] [Required]
Constraints:
  • max_length = 2083

  • allowed_schemes = [‘http’, ‘https’]

field width: int [Required]
model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

返回类型:

None

Args:

self: The BaseModel instance. context: The context.

pydantic model aioqzone.model.api.response.ProfileFeedData
Fields:
  • comment (aioqzone.model.api.profile.ProfileComment)

  • like (aioqzone.model.api.profile.ProfileLikeInfo)

  • original (aioqzone.model.api.profile.ProfileFeedOriginal | aioqzone.model.api.feed.Share | None)

  • share_info (aioqzone.model.api.feed.ShareInfo)

field comment: ProfileComment [Optional]
field like: ProfileLikeInfo [Optional]
field original: Union[ProfileFeedOriginal, Share, None] = None
Constraints:
  • union_mode = left_to_right

field share_info: ShareInfo [Optional]