From 874a1c8b2dafe711bdb833e01172c4d425dfd55b Mon Sep 17 00:00:00 2001 From: KenesuEXE Date: Mon, 14 Aug 2023 09:31:32 +0800 Subject: [PATCH] docs: Fix wrong code in index.rst Fix sample code in docs - Fix wrong syntax - Add import statement --- docs/index.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 2ce6097..0359d1d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,18 +10,19 @@ Welcome to gkeepapi's documentation! .. contents:: **gkeepapi** is an unofficial client for programmatically interacting with Google Keep:: + import gkeepapi keep = gkeepapi.Keep() keep.login('user@gmail.com', 'password') - note = gkeepapi.createNote('Todo', 'Eat breakfast') + note = keep.createNote('Todo', 'Eat breakfast') note.pinned = True note.color = gkeepapi.node.ColorValue.Red keep.sync() - print note.title - print note.text + print(note.title) + print(note.text) The client is mostly complete and ready for use, but there are some hairy spots. In particular, the interface for manipulating labels and blobs is subject to change.