Skip to content
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

Edit wms datasets #66

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Edit wms datasets #66

wants to merge 6 commits into from

Conversation

chrowe
Copy link
Member

@chrowe chrowe commented Jun 7, 2023

No description provided.

name = ly['data']['attributes']['name']
print(f'LAYER NAME: {name}')

old_value = ly['data']['attributes']['layerConfig']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should replace ['layerConfig'] with [layer_field]?

def create_headers():
return {
'content-type': "application/json",
'authorization': "{}".format(os.getenv('apiToken')),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the same format as the other update? 'authorization': f'Bearer {API_TOKEN}'

Copy link
Collaborator

Choose a reason for hiding this comment

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

This edit_dataset script is not on the same level as the other edit_layer scripts. It should be the same for WMS/GEE/Carto to update any dataset fields. The differences are in the layer fields. I'm thinking about creating two scripts, one for updating dataset fields (could be used for all datasets), and the other for updating WMS layer fields. What do you think?

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.

2 participants