Spaces:
Sleeping
Sleeping
Commit
·
32c7a53
1
Parent(s):
a32188a
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import hashlib
|
|
3 |
from time import strftime, gmtime
|
4 |
import streamlit as st
|
5 |
from datetime import datetime, timedelta
|
|
|
6 |
|
7 |
# Function to fetch data from ShareASale
|
8 |
def fetch_shareasale_data(action_verb, affiliate_id, api_token, api_secret_key, api_version=1.4):
|
@@ -49,5 +50,10 @@ if st.sidebar.button("Fetch Data"):
|
|
49 |
action_verb = 'ledger'
|
50 |
ledger_data = fetch_shareasale_data(action_verb, my_affiliate_id, api_token, api_secret_key)
|
51 |
|
52 |
-
#
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
3 |
from time import strftime, gmtime
|
4 |
import streamlit as st
|
5 |
from datetime import datetime, timedelta
|
6 |
+
import pandas as pd # Assuming you'll convert the data to a Pandas DataFrame
|
7 |
|
8 |
# Function to fetch data from ShareASale
|
9 |
def fetch_shareasale_data(action_verb, affiliate_id, api_token, api_secret_key, api_version=1.4):
|
|
|
50 |
action_verb = 'ledger'
|
51 |
ledger_data = fetch_shareasale_data(action_verb, my_affiliate_id, api_token, api_secret_key)
|
52 |
|
53 |
+
# TODO: Parse the ledger_data into a Pandas DataFrame (or any other suitable data structure)
|
54 |
+
# For demonstration, let's assume `ledger_data_df` is a Pandas DataFrame containing the parsed ledger data
|
55 |
+
# ledger_data_df = some_parsing_function(ledger_data)
|
56 |
+
|
57 |
+
# Display data as a table
|
58 |
+
# st.table(ledger_data_df)
|
59 |
+
st.write("Replace this line with the parsed table data using st.table")
|