forked from lemeryfertitta/BoardLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
lekanteto edited this page Mar 14, 2024
·
1 revision
Welcome to the BoardLib wiki!
Example for use in your own code taken from this issue
import getpass
import boardlib.api.aurora
import pandas
username = "username"
password = getpass.getpass()
login_info = boardlib.api.aurora.login("kilter", username, password)
token = login_info["token"]
user_id = login_info["user_id"]
user_data = boardlib.api.aurora.user_sync(
"kilter", token, user_id, tables=["ascents", "bids", "attempts"]
)
# Sent climbs
# NOTE: to map UUID to a climb name, you can use boardlib.api.aurora.get_climb_name("kilter", uuid)
ascents = user_data["PUT"].get("ascents", [])
# Attempted, but not sent climbs?
bids = user_data["PUT"].get("bids", [])
# Mapping of attempt_id to semantic meaning
attempts = user_data["PUT"].get("attempts", [])
ascents_df = pandas.DataFrame(ascents)
bids_df = pandas.DataFrame(bids)
attempts_df = pandas.DataFrame(attempts)
print(ascents_df)
print(bids_df)
print(attempts_df)