RayvisionAPI¶
Initialize user, task, query, environment, tag interface.
- class rayvision_api.core.RayvisionAPI(access_id=None, access_key=None, domain='task.renderbus.com', platform='4', protocol='https', logger=None, log_folder=None, log_name=None, log_level='DEBUG')¶
Bases:
object
Create the request object.
Including user action, task action, query action, environment operation and tag action.
- check_and_add_project_name(project_name)¶
Get the tag id.
Call the API interface to obtain all the label information of the user, determine whether the label name to be added already exists, and obtain the label id if it exists. If the label does not exist, the API interface is repeatedly requested. The request is up to three times. If the third time does not exist, the empty string is returned.
- property connect¶
The current connect instance.
- Type:
rayvision.api.Connect
- get_user_id()¶
Get user id.
Example
- user_profile_info = {
“userId”: 10001136, “userName”: “rayvision”, “platform”: 2, “phone”: “173333333333”, “email”: “”, “company”: “”, “name”: “”, “job”: “”, “communicationNumber”: “”, “softType”: 2000, “softStatus”: 1, “businessType”: 1, “status”: 1, “infoStatus”: 0, “accountType”: 1,
}
- Returns:
The ID number of the current user.
- Return type:
- submit(task_id, producer=None)¶
Submit a task.
- submit_by_data(task_info, file_name='task.json', producer=None)¶
Submit tasks based on json files.
- Parameters:
task_info (string) – task.json content.
file_name (string, optional) – The name of the json file to be uploaded, only support “”
producer (string, optional) – Producer.
Returns:
- property user_info¶