-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
asyncAsync client implementationAsync client implementationcoreCore API moduleCore API moduleenhancementNew feature or requestNew feature or request
Description
User Story
As a developer using pyOFSC in async applications
I want async versions of activity GET (read-only) methods
So that I can fetch activity data without blocking in async/await contexts
Description
Implement async versions of all activity GET operations in AsyncOFSCore.
Methods to Implement (13 total)
Core Activity Operations
get_activities(params)- GET/rest/ofscCore/v1/activitiesget_activity(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}
File Operations
get_file_property(activity_id, label)- GET/rest/ofscCore/v1/activities/{activityId}/custom-properties/{label}/content
Multiday Operations
get_multiday_segments(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/multiday-segments
Form Operations
get_submitted_forms(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/forms
Resource Preference Operations
get_resource_preferences(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/resourcePreferences
Inventory Operations
get_required_inventories(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/inventories/requiredget_customer_inventories(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/inventories/customerget_installed_inventories(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/inventories/installedget_deinstalled_inventories(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/inventories/deinstalled
Linked Activities
get_linked_activities(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/linksget_activity_link(activity_id, link_id)- GET/rest/ofscCore/v1/activities/{activityId}/links/{linkId}
Capacity Operations
get_capacity_categories(activity_id)- GET/rest/ofscCore/v1/activities/{activityId}/capacityCategories
Acceptance Criteria
- All methods use Pydantic models only (no raw dict responses)
- Models exist/created in
ofsc/models.pyfor all responses - Saved responses captured in
tests/saved_responses/activities/ - Live tests with
@pytest.mark.uses_real_datamarker - Model validation tests against saved responses
- Methods follow async pattern (httpx, error handling)
- All tests passing
Technical Design
File: ofsc/async_client/core.py
Pattern: Follow async metadata implementation pattern
Related Files
ofsc/async_client/core.py- Implement async methodsofsc/models.py- Activity modelstests/async/test_async_activities.py- Test filetests/saved_responses/activities/- API response files
Metadata
Metadata
Assignees
Labels
asyncAsync client implementationAsync client implementationcoreCore API moduleCore API moduleenhancementNew feature or requestNew feature or request