New to Python and to the Google Photo API, but trying to teach myself by creating a 'useful' tool. So far I have successfully connected to the API and extracted a list of all my albums and also a separate list of all my media. I am then analysing this data to help me find duplicates etc.
I now want to write back to the API and update the description of each photo with various pieces of information, but am struggling on how to correctly format the request.
This is a snippet of code that doesn't work. media_items_found[] contains all of my media, where mediaId is the Id of the media item. In this code I am simply trying to change the description of the first photo to be "Hello World!". However I get "unexpected keyword argument mediaItemId"
test_photo=media_items_found[0]
photo_id=test_photo['mediaId']
new_description='Hello World!'
body = {"description": new_description}
updated_item = service.mediaItems().patch(
mediaItemId=photo_id,
body=body,
updateMask="description"
).execute()