From bf5ff8497c07f70b4e43099b780a1661183a0153 Mon Sep 17 00:00:00 2001 From: elliot-100 <3186037+elliot-100@users.noreply.github.com> Date: Fri, 7 Oct 2022 16:48:51 +0100 Subject: [PATCH 1/4] Clarify what the package does, and its status. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eaddb79..76f9a9a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Spond ![spond logo](https://github.com/Olen/Spond/blob/main/images/spond-logo.png?raw=true) -Simple library with some example scripts to access data from Spond. +Simple, unofficial library with some example scripts to access data from the [Spond](https://spond.com/) API. ## Install From 8050962894b3beec87dbda42b6acd5abafbefaba Mon Sep 17 00:00:00 2001 From: elliot-100 <3186037+elliot-100@users.noreply.github.com> Date: Fri, 7 Oct 2022 17:14:19 +0100 Subject: [PATCH 2/4] Minimal corrections for v0.9.0 --- README.md | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 76f9a9a..48a2a66 100644 --- a/README.md +++ b/README.md @@ -35,45 +35,23 @@ loop.run_until_complete(main()) ``` -## Functions +## Key methods ### get_groups() -Gets all your group memberships and all members of those groups - -### get_events([from_date]) -Gets up to 100 events. - -Optional `from_date` parameter determines the earliest date from which events are returned. -Pass a `datetime` to get earlier events, e.g.: -``` -events = await spond_session.get_events(datetime.now() - timedelta(days=365)) -``` -If omitted, returns events from today - 14 days. - - -### get_events_between(from_date, to_date) -Gets up to 100 events. - -Required `from_date` and `to_date` parameters determines the earliest and latest date from which events are returned. -Both expect a `datetime` object, e.g.: -``` -from_date = datetime.now() - timedelta(days=30) -to_date = datetime.now() + timedelta(days=30) - -events = await spond_session.get_events_between(from_date, to_date) -``` -Will return _up to_ 100 events starting from 30 days in the past until 30 days in the future. +Get details of all your group memberships and all members of those groups. +### get_events([params]) +Get details of events, limited to 100 by default. -### getPerson() -Get information about a member +### get_person() +Get a member's details. -### getMessages() -Get all your messages +### get_messages() +Get all your messages. -### sendMessage(recipient, text) -Send a message to `recipient` with the content `text` +### send_message(recipient, text) +Send a message to `recipient` with the content `text`. ## Example scripts From facacb3b4076e283479ce485eeefa70d5235387d Mon Sep 17 00:00:00 2001 From: elliot-100 <3186037+elliot-100@users.noreply.github.com> Date: Fri, 7 Oct 2022 17:59:46 +0100 Subject: [PATCH 3/4] Summarise `get_events()` params. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 48a2a66..6044333 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Get details of all your group memberships and all members of those groups. ### get_events([params]) Get details of events, limited to 100 by default. +Various optional parameters allow filtering by start and end datetimes, group; more events to be returned; inclusion of 'scheduled' events. ### get_person() Get a member's details. From 2b55413380404b1e649bb2b7a30c3318373f290d Mon Sep 17 00:00:00 2001 From: elliot-100 <3186037+elliot-100@users.noreply.github.com> Date: Fri, 7 Oct 2022 17:59:46 +0100 Subject: [PATCH 4/4] Summarise `get_events()` params. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48a2a66..1e40384 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,10 @@ loop.run_until_complete(main()) Get details of all your group memberships and all members of those groups. -### get_events([params]) +### get_events([group_id, include_scheduled, max_end, min_end, max_start, min_start, max_events]) +) Get details of events, limited to 100 by default. +Optional parameters allow filtering by start and end datetimes, group; more events to be returned; inclusion of 'scheduled' events. ### get_person() Get a member's details.