Skip to content

Commit

Permalink
wip(today's fortune): A day without sunshine is like night.
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Dec 13, 2024
1 parent f121798 commit 7cda327
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sources/affinity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@

from pydantic import TypeAdapter

from .rest_client import get_v1_rest_client, get_v2_rest_client, hooks
from .rest_client import (
get_v1_rest_client,
get_v2_rest_client,
hooks,
MAX_PAGE_LIMIT_V1,
MAX_PAGE_LIMIT_V2,
)
from .type_adapters import note_adapter, list_adapter
from .model.v1 import Note
from .model.v2 import *
Expand All @@ -28,8 +34,6 @@

LISTS_LITERAL = Literal["lists"]
ENTITY = Literal["companies", "persons", "opportunities"]
MAX_PAGE_LIMIT_V1 = 500
MAX_PAGE_LIMIT_V2 = 100


def get_entity_data_class(entity: ENTITY | LISTS_LITERAL):
Expand Down
2 changes: 2 additions & 0 deletions sources/affinity/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ def raise_if_error(response: Response, *args: Any, **kwargs: Any) -> None:


hooks = {"response": [raise_if_error]}
MAX_PAGE_LIMIT_V1 = 500
MAX_PAGE_LIMIT_V2 = 100

0 comments on commit 7cda327

Please sign in to comment.