Skip to content

Commit

Permalink
version bump for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetrucciani committed Mar 20, 2020
1 parent ce79220 commit 331ab7c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Jacobi Petrucciani
Copyright (c) 2020 Jacobi Petrucciani

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 10 additions & 8 deletions hubspot3/engagements.py
Expand Up @@ -3,6 +3,7 @@
"""
from hubspot3.base import BaseClient
from hubspot3.utils import get_log
from typing import Dict, List


ENGAGEMENTS_API_VERSION = "1"
Expand All @@ -14,11 +15,12 @@ class EngagementsClient(BaseClient):
for data. It returns a python object translated from the json returned
"""

def __init__(self, *args, **kwargs):
def __init__(self, *args, **kwargs) -> None:
super(EngagementsClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.engagements")

def _get_path(self, subpath):
def _get_path(self, subpath: str) -> str:
"""get full subpath"""
return "engagements/v{}/{}".format(
self.options.get("version") or ENGAGEMENTS_API_VERSION, subpath
)
Expand All @@ -29,14 +31,14 @@ def get(self, engagement_id, **options):
"engagements/{}".format(engagement_id), method="GET", **options
)

def get_associated(self, object_type, object_id, **options):
def get_associated(self, object_type, object_id, **options) -> List[Dict]:
"""
get all engagements associated with the given object
:param object_type: type of object to get associations on [CONTACT, COMPANY, DEAL]
:param object_id: ID of the object to get associations on
"""
finished = False
output = []
output = [] # type: List[Dict]
query_limit = 100 # Max value according to docs
offset = 0
while not finished:
Expand All @@ -62,10 +64,10 @@ def update(self, key, data=None, **options):
"engagements/{}".format(key), data=data, method="PUT", **options
)

def get_all(self, **options):
def get_all(self, **options) -> List[Dict]:
"""get all engagements"""
finished = False
output = []
output = [] # type: List[Dict]
query_limit = 250 # Max value according to docs
offset = 0
while not finished:
Expand All @@ -81,10 +83,10 @@ def get_all(self, **options):

return output

def get_recently_modified(self, since, **options):
def get_recently_modified(self, since, **options) -> List[Dict]:
"""get recently modified engagements"""
finished = False
output = []
output = [] # type: List[Dict]
query_limit = 100 # Max value according to docs
offset = 0
while not finished:
Expand Down
2 changes: 1 addition & 1 deletion hubspot3/globals.py
@@ -1,7 +1,7 @@
"""
globals file for hubspot3
"""
__version__ = "3.2.46"
__version__ = "3.2.47"


BASE_URL = "https://api.hubapi.com"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py{35,36,37}
envlist = py{35,36,37,38}

[testenv]
setenv =
Expand Down

0 comments on commit 331ab7c

Please sign in to comment.