TimeTree API SDK for Python
Project description
TimeTree SDK for Python
TimeTree API SDK for Python.
Installing
$ pip install timetree-sdk
Usage
from timetree_sdk import TimeTreeApi
api = TimeTreeApi('API_ACCESS_TOKEN')
calendar = api.get_calendar('CALENDAR_ID')
print(calendar.data.attributes.name) # calendar name
API
User
get_current_user
user = api.get_current_user()
print(user.data.attributes.name) # user name
Calendar
get_calendars
calenders = api.get_calendars()
print(calenders.data[0].attributes.name) # first calender name
get_calendar
calendar = api.get_calendar('CALENDAR_ID')
print(calendar.data.attributes.name) # calendar name
get_calendar_labels
labels = api.get_calendar_labels('CALENDAR_ID')
print(labels.data[0].attributes.name) # first calender's label name
get_calendar_members
members = api.get_calendar_members('CALENDAR_ID')
print(members.data[0].attributes.name) # first calender's member name
Event
get_event
event = api.get_event('CALENDAR_ID', 'EVENT_ID')
print(event.data.attributes.title) # event title
get_upcoming_events
events = api.get_upcoming_events('CALENDAR_ID', 'Asia/Tokyo', 7)
print(events.data[0].attributes.title) # most recent event title in 7 days
-
create_event
-
delete_event
-
update event
Event Comment
create comment to event
comment = EventComment(
data=EventCommentData(
attributes=EventCommentAttributes(
content='Hello, world'
)
)
)
event_comment = api.create_event_comment('CALENDAR_ID', 'EVENT_ID', comment)
print(event_comment.data.attributes.content) # Hello, world
Documentation
Official API documentation
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
timetree-sdk-0.1.2.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for timetree_sdk-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d6e0964c0533147fa1cdc8c82d439fa8477c1b28768bf9ef579eff12ebb0081 |
|
MD5 | b36713e3c2ba23702dc9f95c683a4c57 |
|
BLAKE2b-256 | fe13352a7244dcd5a57886b34d2520a085458fd6e738ceba7e66e93d92d8df09 |