Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Update facility details API #1218

Closed
2 tasks
dboyer opened this issue Jan 28, 2021 · 0 comments
Closed
2 tasks

Update facility details API #1218

dboyer opened this issue Jan 28, 2021 · 0 comments
Assignees
Labels
task 004 Enable contributors to embed a map displaying only the facilities with which they are associated in
Milestone

Comments

@dboyer
Copy link

dboyer commented Jan 28, 2021

Overview

The embedded map feature supports a contributor generating an iframe of a map showing just the facilities they have contributed as well as potentially additional fields they have added that are not visible on OAR.

For this task, add additional contributor fields to the facility details API.

Part of #317

Describe the solution you'd like

Update facility details API

  • Add embed and contributor arguments (/api/facilities/{id}/?embed=1&contributor={id})
  • Conditionally include extra fields, as defined by that contributor's EmbedConfig, when embed is 1, in the format:
    "id": "OAR_ID",
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [1, 1]
    },
    "properties": {
       ...regular data,
       "contributor_fields": [
       {
            "label": "Test Field",
            "value": "1234"
        },
       ...
     ]
    }
}```
@dboyer dboyer added this to the 2021 Q1 milestone Jan 28, 2021
@jwalgran jwalgran added task 004 Enable contributors to embed a map displaying only the facilities with which they are associated in and removed embedded map labels Mar 19, 2021
@TaiWilkin TaiWilkin changed the title DRAFT: Update facility details API Update facility details API May 7, 2021
@TaiWilkin TaiWilkin self-assigned this May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
task 004 Enable contributors to embed a map displaying only the facilities with which they are associated in
Projects
None yet
Development

No branches or pull requests

4 participants