Skip to content

fix: use the live api endpoint for map updating.#17

Merged
arredond merged 1 commit intofelt:mainfrom
jovincroninwilesmith:fix/map-update-function
Nov 19, 2024
Merged

fix: use the live api endpoint for map updating.#17
arredond merged 1 commit intofelt:mainfrom
jovincroninwilesmith:fix/map-update-function

Conversation

@jovincroninwilesmith
Copy link
Contributor

@jovincroninwilesmith jovincroninwilesmith commented Nov 15, 2024

While working on integrating the API.

I just noticed that in the API -- Map Update POST https://felt.com/api/v2/maps/{map_id}/update but in the Felt Python update_map() leverages a PATCH (https://github.com/felt/felt-python/blob/main/felt_python/maps.py#L44) maps.py

Example:

Returns 200

curl --location 'https://felt.com/api/v2/maps/[MAP ID]/update' \
--header 'Authorization: Bearer [TOKEN]' \
--header 'Content-Type: application/json' \
--data '{"title": "new title"}'

Returns 404 - Route in python package.

curl --location --request PATCH 'https://felt.com/api/v2/maps/[MAP ID]' \
--header 'Authorization: Bearer [TOKEN]' \
--header 'Content-Type: application/json' \
--data '{"title": "new title"}'

Copy link
Contributor

@arredond arredond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix and also for providing a testing notebook! I'll add some more map-specific functionality to that in a followup PR.

@arredond arredond merged commit 95cc167 into felt:main Nov 19, 2024
@arredond arredond mentioned this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants