Skip to content

[WIP] feat: Add StacDynamicView parser for fetching and rendering API data #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 9, 2025

Conversation

divyanshub024
Copy link
Member

Description

This PR adds a new StacDynamicView parser that enables fetching data from APIs and dynamically rendering it in STAC JSON templates. The implementation supports:

  • Making HTTP requests to external APIs
  • Extracting data from API responses using targetPath
  • Applying data to templates using placeholders (e.g., {{fieldName}})
  • Handling nested data structures
  • Processing multiple placeholders in a single string

Example

Added a user profile example in the STAC Gallery that demonstrates fetching user data from the DummyJSON API and displaying it in a profile layout with:

  • User image
  • Name
  • Email
  • Phone
  • Age

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

@divyanshub024 divyanshub024 added this to the v1.0 milestone Apr 4, 2025
@divyanshub024 divyanshub024 marked this pull request as ready for review April 9, 2025 12:09
@divyanshub024 divyanshub024 merged commit a024983 into dev Apr 9, 2025
4 checks passed
@divyanshub024 divyanshub024 deleted the dv/api-component branch April 9, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant