Implement 10 new API endpoint methods for individual item retrieval#6
Implement 10 new API endpoint methods for individual item retrieval#6
Conversation
Co-authored-by: tin900 <113692500+tin900@users.noreply.github.com>
…ints Co-authored-by: tin900 <113692500+tin900@users.noreply.github.com>
I've added optional query parameters support to all 10 individual item endpoint functions. Each function now accepts a Usage example: # With query parameters
activity <- get_activity(semestry, "MATH101_LEC", fields = "code,name", format = "detailed")
building <- get_building(semestry, "MAIN_HALL", "NORTH_CAMPUS", include = "rooms")Commit: 87c7409 |
tin900
left a comment
There was a problem hiding this comment.
@copilot Not like this. Write functions arguments for the query parameters. So the bames of the params in the args, but default =NULL. See other fucntions in this package how we do that. Check against the api documentation which params
…ll 10 individual item endpoint functions Co-authored-by: tin900 <113692500+tin900@users.noreply.github.com>
I've updated all 10 individual item endpoint functions to use explicit parameter names instead of the generic All function signatures are now:
This provides better IDE support and documentation while maintaining full backward compatibility. Commit: cd902a0 |
This PR implements 10 new API endpoint methods that complement the existing collection endpoints by allowing retrieval of specific individual items, following the same pattern established in PR #4.
New Methods Added
Individual item retrieval endpoints:
get_activity(semestry, activity_code)- Individual activity by code (GET /activity/{c})get_activitygroup(semestry, activitygroup_code)- Individual activity group by code (GET /activitygroup/{c})get_activitytemplate(semestry, activitytemplate_code)- Individual activity template by code (GET /activitytemplate/{c})get_activitytype(semestry, activitytype_code)- Individual activity type by code (GET /activitytype/{c})get_assessmenttype(semestry, assessmenttype_code)- Individual assessment type by code (GET /assessmenttype/{c})get_building(semestry, building_code, campus_code)- Individual building by building and campus codes (GET /building/{b}/{c})get_campus(semestry, campus_code)- Individual campus by code (GET /campus/{c})get_capability(semestry, capability_code)- Individual capability by code (GET /capability/{c})get_contactrequirement(semestry, contactrequirement_code)- Individual contact requirement by code (GET /contactrequirement/{c})get_course(semestry, course_code)- Individual course by course code (GET /course/{cc})Implementation Details
All new methods follow the established patterns in the codebase:
Authorization: k{api_key})jsonlite::fromJSON()Files Modified
[x]checkboxesUsage Example
This significantly expands the package's API coverage by providing granular access to individual items while maintaining full backward compatibility with existing collection endpoints.
Fixes #5.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.