Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,22 @@ def update_user_profile(self, user_id: str, profile_fields: dict, device_config:

return self.http_client.execute('POST', f'/v1/user/{user_id}/profile', body_data=body, headers=headers)

def upload_video(self, files: dict, device_config: str, cookie: str, country_code: str, proxy: str) -> Response:
"""
:param device_config: JSON string with device configuration
:param cookie: cookie string
:param proxy: http, https, socks4 or socks5 proxy
:return: Response object
"""

headers = {
'x-device': device_config,
'x-cookie': cookie,
'x-proxy': proxy
}

return self.http_client.execute('POST', '/v1/post/create?region={}'.format( country_code ), files=files, headers=headers)

def update_username(self, user_id: str, username: str, device_config: str, cookie: str, proxy: str) -> Response:
"""
:param user_id: user id
Expand Down