Alpha108 commited on
Commit
a91602d
·
verified ·
1 Parent(s): a3dc17c

Update backend/agents/rapidapi_upwork.py

Browse files
Files changed (1) hide show
  1. backend/agents/rapidapi_upwork.py +12 -6
backend/agents/rapidapi_upwork.py CHANGED
@@ -4,13 +4,19 @@ import os
4
 
5
  # --- THIS IS A SKELETON FILE ---
6
 
7
- try:
8
- import streamlit as st
9
- RAPIDAPI_KEY = st.secrets.get("RAPIDAPI_KEY")
10
- except (ImportError, KeyError, FileNotFoundError):
11
- RAPIDAPI_KEY = os.getenv("RAPIDAPI_KEY", "YOUR_RAPIDAPI_KEY_HERE")
12
 
13
- RAPIDAPI_HOST = "upwork-freelancer-jobs.p.rapidapi.com" # Example host
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  def fetch_upwork_jobs_stub(query="web developer", limit=5):
16
  """
 
4
 
5
  # --- THIS IS A SKELETON FILE ---
6
 
 
 
 
 
 
7
 
8
+ url = "https://upwork-jobs-api2.p.rapidapi.com/active-freelance-1h"
9
+
10
+ querystring = {"limit":"10"}
11
+
12
+ headers = {
13
+ "x-rapidapi-key": "bfac064b2fmsh8be26d692fcad76p168d6cjsncf4237253560",
14
+ "x-rapidapi-host": "upwork-jobs-api2.p.rapidapi.com"
15
+ }
16
+
17
+ response = requests.get(url, headers=headers, params=querystring)
18
+
19
+ print(response.json())
20
 
21
  def fetch_upwork_jobs_stub(query="web developer", limit=5):
22
  """