-
While trying to edit an the external_url of a ModuleItem, I am getting the error: I have my API_URL and API_KEY but do not want to show in the code.
I am wondering if anyone knows how to fix this problem. I am following the ucfopen README but I cannot find anything there to help me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @maxjeltes, According to the Canvas docs for editing a module item, changing the external URL requires the parameter Try the following:
For more information about how CanvasAPI handles keyword arguments, check out our keyword argument documentation. In particular, take a look at the Nested Parameters section. |
Beta Was this translation helpful? Give feedback.
Hey @maxjeltes,
According to the Canvas docs for editing a module item, changing the external URL requires the parameter
module_item[external_url]
. Since brackets aren't allowed in argument names in Python, the CanvasAPI library requires you to use an argument calledmodule_item
and set it equal to a dictionary containing a key calledexternal_url
. What you have is close, but the name of the argument is important.Try the following:
For more information about how CanvasAPI handles keyword arguments, check out our keyword argument documentation. In particular, take a look at the Nested Parameters section.