Image support (external media URL or Covers) #57
-
Hi ! I'm not sure it's undoable with pytion, but i couldn't find anything =/ If not, it would be a nice feature to add :) Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There is no support for editing the page cover or the page "files" property at the moment. Only "url" type is supported. And it works for gallery view, I can see the picture from external URL. Create page example: from pytion import Notion
from pytion.models import PropertyValue, LinkTo
no = Notion(token="x")
pv = PropertyValue.create(type_="url", value="https://example.com/image.jpg") # for editing one of properties of the page
parent = LinkTo.create(database_id="bc339ec71988466c95c083359e239a7c") # enter database ID to create the page inside
page = no.pages.page_create(parent=parent, title="Some title", properties={"Picture": pv}) # "Picture" is the property name Almost the same for updating: page.page_update(properties={"Picture": pv}) |
Beta Was this translation helpful? Give feedback.
-
Why didn't i try URL =/ Thanks a lot for all the work and your quick answer ! |
Beta Was this translation helpful? Give feedback.
There is no support for editing the page cover or the page "files" property at the moment.
Only "url" type is supported. And it works for gallery view, I can see the picture from external URL.
Create page example:
Almost the same fo…