Ejemplo n.º 1
0
def get_project(token):
    v_api = VentureApi()
    set_login_status(v_api, token)
    today = datetime.today().date()
    while True:
        project_name = "project" + str(random.randint(1, 10000))
        rv = v_api.applications_check_project_name_post(project_name)
        if not rv.result:
            break
    return {
        "projectName": project_name,
        "description": "XXXXXXXXXXXXXXXX",
        "officialWebsite": "www.xxxx.com",
        "whitePaperKey": "url/pdf123455",
        "areaCode": "+86",
        "projectPosterKey": 'f210c0d8a4e747cb8438031fe2b99931',
        "cellphone": "13510022445",
        "telephone": 12874846,
        "email": "*****@*****.**",
        "fullName": get_random_coin_full_name(),
        "shortName": get_random_coin_short_name(),
        "issuePrice": "2.24545",
        "issuedVolume": "1000000",
        "circulationVolume": "1000000",
        "issuedDate": str(today),
        "coinLogoKey": 'f210c0d8a4e747cb8438031fe2b99931',
        "blockchainType": "public_chain",
        "dataLink": "www.baidu.com",
        "blockBrowser": "www.baidu.com"
    }
Ejemplo n.º 2
0
def get_project():
    manager = PlatformManager('venture')
    token = manager.login(user, password)
    api = VentureApi()
    api.api_client.set_default_header("Authentication-Token", token)
    while True:
        project_name = "test_project_" + str(random.randint(1, 10000))
        rv = api.applications_check_project_name_post(
            project_name=project_name)
        if not rv.result:
            break
    return dict(project_name=project_name,
                description="hell of a project",
                official_website="http://showmethemoney.com",
                white_paper="http://showmethemoney.com/whitepaper",
                area_code="1333",
                project_poster="http://showmethemoney.com/poster",
                cellphone="86-123812391",
                telephone="12434234",
                email="*****@*****.**",
                full_name="hellboy",
                short_name="HB",
                issue_price="100 dollors",
                issued_volume="15",
                circulation_volume="13",
                issued_at=datetime.now(),
                coin_logo="http://showmethemoney.com/coin_logo",
                blockchain_type="public_chain",
                data_link="link me baby",
                block_browser="browser what")