Ejemplo n.º 1
0
def load_user_profile(info=None):
    """Gets the information associated with the user profile,
    such as username, email, and links to the urls for other profiles.

    :param info: The name of the key whose value is to be returned from the function.
    :type info: Optional[str]
    :returns: The function returns a dictionary of key/value pairs. \
    If a string is passed in to the info parameter, then the function will return \
    a string corresponding to the value of the key whose name matches the info parameter.
    :Dictionary Keys: * url
                      * id
                      * id_info
                      * username
                      * email
                      * email_verified
                      * first_name
                      * last_name
                      * origin
                      * profile_name
                      * created_at

    """
    url = urls.user_profile()
    data = helper.request_get(url)
    return (helper.filter_data(data, info))
Ejemplo n.º 2
0
def load_user_profile(info=None):
    """Gets the information associated with the user profile,
    such as username, email, and links to the urls for other profiles.

    :param info: The name of the key whose value is to be returned from the function.
    :type info: Optional[str]
    :returns: The function returns a dictionary of key/value pairs. \
    If a string is passed in to the info parameter, then the function will return \
    a string corresponding to the value of the key whose name matches the info parameter.

    """
    url = urls.user_profile()
    data = helper.request_get(url)
    return helper.data_filter(data, info)