Skip to content

Commit

Permalink
Merge pull request #326 from nylas/TW-2467-Fixes-for-Contacts-API-sup…
Browse files Browse the repository at this point in the history
…port

Fixes for contacts api
  • Loading branch information
atejada authored Jan 2, 2024
2 parents 25280c3 + 20b179c commit 0f92ddb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
12 changes: 11 additions & 1 deletion nylas/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from nylas.resources.messages import Messages
from nylas.resources.threads import Threads
from nylas.resources.webhooks import Webhooks

from nylas.resources.contacts import Contacts

class Client(object):
"""
Expand Down Expand Up @@ -148,3 +148,13 @@ def webhooks(self) -> Webhooks:
The Webhooks API.
"""
return Webhooks(self.http_client)

@property
def contacts(self) -> Contacts:
"""
Access the Contacts API.
Returns:
The Contacts API.
"""
return Contacts(self.http_client)
1 change: 1 addition & 0 deletions nylas/models/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
class ContactType(str, Enum):
work = "work"
home = "home"
mobile = "mobile"
other = "other"


Expand Down
2 changes: 1 addition & 1 deletion nylas/models/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ class Event:
grant_id: str
calendar_id: str
busy: bool
read_only: bool
created_at: int
updated_at: int
participants: List[Participant]
Expand All @@ -319,6 +318,7 @@ class Event:
default=None, metadata=config(decoder=_decode_conferencing)
)
object: str = "event"
read_only: Optional[bool] = None
description: Optional[str] = None
location: Optional[str] = None
ical_uid: Optional[str] = None
Expand Down
2 changes: 1 addition & 1 deletion nylas/resources/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import urllib.parse
import uuid

from nylas.models.grant import CreateGrantRequest, Grant
from nylas.models.grants import CreateGrantRequest, Grant

from nylas.models.auth import (
CodeExchangeResponse,
Expand Down

0 comments on commit 0f92ddb

Please sign in to comment.