joshuadunlop commited on
Commit
7634104
·
1 Parent(s): c1900c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -14,8 +14,7 @@ def fetch_shareasale_data(action_verb, affiliate_id, api_token, api_secret_key,
14
  'affiliateId': affiliate_id,
15
  'token': api_token,
16
  'version': api_version,
17
- 'action': action_verb,
18
- 'merchantId': '' # Adding merchantId as a query parameter (fill in the value if needed)
19
  })
20
 
21
  sig = f"{api_token}:{my_timestamp}:{action_verb}:{api_secret_key}"
@@ -44,7 +43,7 @@ st.title("Affiliate Earnings Dashboard")
44
  st.sidebar.title("Settings")
45
 
46
  # API and credential settings
47
- my_affiliate_id = st.sidebar.text_input("Affiliate ID", "YOUR_AFFILIATE_ID")
48
  api_token = st.sidebar.text_input("API Token", "YOUR_API_TOKEN")
49
  api_secret_key = st.sidebar.text_input("API Secret Key", "YOUR_API_SECRET_KEY", type="password")
50
 
@@ -65,7 +64,7 @@ if st.sidebar.button("Fetch Data"):
65
  df_filtered = df.loc[df['action'] == 'Transaction Created']
66
 
67
  # Remove 'ledgerid' and 'transid' columns
68
- df_filtered = df_filtered.drop(columns=['ledgerid', 'transid'])
69
 
70
  # Display the DataFrame as a table
71
- st.write(df_filtered)
 
14
  'affiliateId': affiliate_id,
15
  'token': api_token,
16
  'version': api_version,
17
+ 'action': action_verb
 
18
  })
19
 
20
  sig = f"{api_token}:{my_timestamp}:{action_verb}:{api_secret_key}"
 
43
  st.sidebar.title("Settings")
44
 
45
  # API and credential settings
46
+ my_affiliate_id = st.sidebar.text_input("ShareASale Affiliate ID", "599431")
47
  api_token = st.sidebar.text_input("API Token", "YOUR_API_TOKEN")
48
  api_secret_key = st.sidebar.text_input("API Secret Key", "YOUR_API_SECRET_KEY", type="password")
49
 
 
64
  df_filtered = df.loc[df['action'] == 'Transaction Created']
65
 
66
  # Remove 'ledgerid' and 'transid' columns
67
+ df_filtered = df_filtered.drop(columns=['ledgerid', 'transid', 'action'])
68
 
69
  # Display the DataFrame as a table
70
+ st.write(df_filtered)