Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param video_id: Video ID.
:param name: New video title.
:param desc: New video description.
:param privacy_view: Privacy settings in a [vk.com/dev/privacy_setting|special format]. Privacy setting is available for videos uploaded to own profile by user.
:param privacy_comment: Privacy settings for comments in a [vk.com/dev/privacy_setting|special format].
:param no_comments: Disable comments for the group video.
:param repeat: '1' — to repeat the playback of the video, '0' — to play the video once,
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
"video.edit", params, response_model=responses.ok_response.OkResponseModel
)
async def __call__(
self, chat_id: int, user_id: int = None, member_id: int = None
) -> responses.ok_response.OkResponse:
""" messages.removeChatUser
From Vk Docs: Allows the current user to leave a chat or, if the current user started the chat, allows the user to remove another user from the chat.
Access from user, group token(s)
:param chat_id: Chat ID.
:param user_id: ID of the user to be removed from the chat.
:param member_id:
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
"messages.removeChatUser",
params,
async def __call__(
self, type: str, item_id: int, owner_id: int = None
) -> responses.ok_response.OkResponse:
""" newsfeed.unsubscribe
From Vk Docs: Unsubscribes the current user from specified newsfeeds.
Access from user token(s)
:param type: Type of object from which to unsubscribe: 'note' — note, 'photo' — photo, 'post' — post on user wall or community wall, 'topic' — topic, 'video' — video
:param owner_id: Object owner ID.
:param item_id: Object ID.
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
"newsfeed.unsubscribe",
params,
async def __call__(self, key: str) -> responses.ok_response.OkResponse:
""" utils.deleteFromLastShortened
From Vk Docs: Deletes shortened link from user's list.
Access from user token(s)
:param key: Link key (characters after vk.cc/).
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
"utils.deleteFromLastShortened",
params,
response_model=responses.ok_response.OkResponseModel,
)
async def __call__(
self,
owner_id: int,
item_id: int,
album_id: int = None,
before: int = None,
after: int = None,
) -> responses.ok_response.OkResponse:
""" market.reorderItems
From Vk Docs: Changes item place in a collection.
Access from user token(s)
:param owner_id: ID of an item owner community.
:param album_id: ID of a collection to reorder items in. Set 0 to reorder full items list.
:param item_id: Item ID.
:param before: ID of an item to place current item before it.
:param after: ID of an item to place current item after it.
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
async def __call__(self, id: str) -> responses.ok_response.OkResponse:
""" stats.trackVisitor
From Vk Docs:
Access from user token(s)
:param id:
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
"stats.trackVisitor",
params,
response_model=responses.ok_response.OkResponseModel,
)
From Vk Docs: Deletes a retarget group.
Access from user token(s)
:param account_id: Advertising account ID.
:param client_id: 'Only for advertising agencies.' , ID of the client with the advertising account where the group will be created.
:param target_group_id: Group ID.
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
"ads.deleteTargetGroup",
params,
response_model=responses.ok_response.OkResponseModel,
)
async def __call__(
self, owner_id: int, comment_id: int, reason: int = None
) -> responses.ok_response.OkResponse:
""" video.reportComment
From Vk Docs: Reports (submits a complaint about) a comment on a video.
Access from user token(s)
:param owner_id: ID of the user or community that owns the video.
:param comment_id: ID of the comment being reported.
:param reason: Reason for the complaint: , 0 – spam , 1 – child pornography , 2 – extremism , 3 – violence , 4 – drug propaganda , 5 – adult material , 6 – insult, abuse
"""
params = {
k if not k.endswith("_") else k[:-1]: v
for k, v in {**locals(), **self.kwargs}.items()
if k not in ["self"] and v is not None
}
return await self.request(
"video.reportComment",
params,