Skip to content

GET /site/{id}: Fetch full details for a single site (type, location, etc.) #1

Description

@saumyapalk23

Motivation

Per-site detail pages are where visitors are directly going when they're interested in a good forest, so the site pages need to be detailed and decorated. This includes partner orgs, testimonials, history, and a plant inventory, along with media, hours, etc. This endpoint is necessary and foundational to the site.

Acceptance Criteria:

  • GET /site/{id} returns:
    • name
    • address/location
    • site type (existing_land_trust, existing_coalition, emerging_land_trust, emerging_coalition)
    • accessibility
    • gallery
    • videos
    • site history
    • plant inventory/'meet the plants'
    • seasonal highlights
    • volunteer opportunities
    • partner orgs
    • steward info
  • Endpoint returns 404 if site_id is nonexistent
  • Response excludes events, announcements, and testimonials
  • Response shape is paginated for display

Tasks:

  • Implement route handler for GET /site/{id}
  • Add 404 for handling invalid site_id
  • Write tests: populated vs unpopulated fields, etc., and include documentation

Note: Some items (eg. hours and seasonal highlights) are not yet in the schema, and Abbey may ask us to keep track of other things, so this endpoint may have to be updated in the future.

Story points: 4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions