Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
steinitzu committed Jul 2, 2023
1 parent dccc664 commit 21e8b82
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions sources/hubspot/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ def extract_property_history(objects: List[Dict[str, Any]]) -> Iterator[Dict[str
yield {"object_id": item["id"], "property_name": key, **entry}


def fetch_object(
endpoint: str, api_key: str, params: Optional[Dict[str, Any]] = None
) -> Dict[str, Any]:
"""Fetch a single data object from the API. From e.g. `.../contacts/{id}` endpoint"""
url = get_url(endpoint)
headers = _get_headers(api_key)
r = requests.get(url, headers=headers, params=params)
return r.json() # type: ignore


def fetch_data_with_history(
endpoint: str, api_key: str, params: Optional[Dict[str, Any]] = None
) -> Iterator[Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]]:
Expand Down

0 comments on commit 21e8b82

Please sign in to comment.