-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
name = ly['data']['attributes']['name'] | ||
print(f'LAYER NAME: {name}') | ||
|
||
old_value = ly['data']['attributes']['layerConfig'] |
There was a problem hiding this comment.
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')), |
There was a problem hiding this comment.
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}'
There was a problem hiding this comment.
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?
No description provided.