Skip to content

Commit 54bb2d0

Browse files
author
ellis
committed
update
1 parent e101798 commit 54bb2d0

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

org-notion.el

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -902,11 +902,11 @@ are lists of values."
902902
:documentation "The symbol used to maintain a hashtable
903903
of org-notion instances. The instance hashtable
904904
is treated as a variable, with new instanaces
905-
added to it.")
905+
added to it."))
906906
:documentation "Mixin used to cache object instances based on
907907
`eieio-instance-tracker'. Inheritors must override
908908
`cache' which is a variable used to cache instances."
909-
:abstract t))
909+
:abstract t)
910910

911911
(cl-defmethod cache-instance ((this org-notion-cache) &rest _slots)
912912
"Make sure OBJ is in our cache. Optional argument SLOTS are the
@@ -1156,13 +1156,13 @@ a bot. Identified by the `:id' slot.")
11561156
(created_time
11571157
:initarg :created_time
11581158
:documentation "Datetime when this block was created.")
1159-
(last_edited_by
1159+
(updated_by
11601160
:initform nil
1161-
:initarg :last_edited_by
1161+
:initarg :updated_by
11621162
:type (or org-notion-user null)
11631163
:documentation "Last user to edit this block.")
1164-
(last_edited_time
1165-
:initarg :last_edited_time
1164+
(updated_time
1165+
:initarg :updated_time
11661166
:documentation "Datetime when this block was last edited.")
11671167
(icon
11681168
:initform nil
@@ -1211,8 +1211,8 @@ a bot. Identified by the `:id' slot.")
12111211
(alist-get 'title json))))) ; this is a vector
12121212
:created_by (alist-get 'created_by json)
12131213
:created_time (alist-get 'created_time json)
1214-
:last_edited_by (alist-get 'last_edited_by json)
1215-
:last_edited_time (alist-get 'last_edited_time json)
1214+
:updated_by (alist-get 'last_edited_by json)
1215+
:updated_time (alist-get 'last_edited_time json)
12161216
:icon (alist-get 'icon json)
12171217
:cover (alist-get 'cover json)
12181218
:properties (alist-get 'properties json)
@@ -1233,16 +1233,16 @@ a bot. Identified by the `:id' slot.")
12331233

12341234
(cl-defmethod org-notion-to-org ((obj org-notion-database) &optional type)
12351235
"Convert database to org-element TYPE."
1236-
(with-slots (id title created updated icon cover properties parent url) obj
1236+
(with-slots (id title created_by created_time updated_by updated_time icon cover properties parent url) obj
12371237
;; TODO 2023-01-07: we can do better here
12381238
(let ((props
1239-
(when (or id icon cover created updated url)
1239+
(when (or id icon cover created_time updated_time url)
12401240
(org-notion--property-drawer
12411241
`((id . ,id)
12421242
(icon . ,icon)
12431243
(cover . ,cover)
1244-
(created . ,created)
1245-
(updated . ,updated)
1244+
(created . ,created_time)
1245+
(updated . ,updated_time)
12461246
(url . ,url))))))
12471247
(pcase type
12481248
((or 'nil 'heading)
@@ -1259,7 +1259,7 @@ a bot. Identified by the `:id' slot.")
12591259

12601260
(cl-defmethod org-notion-from-org ((obj org-notion-database) &optional str)
12611261
"Parse STR org element into an `org-notion-database' OBJ."
1262-
(with-slots (id title created updated icon cover properties parent url) obj
1262+
(with-slots (id title created_by created_time updated_by updated_time icon cover properties parent url) obj
12631263
(with-temp-buffer
12641264
(insert str)
12651265
(let* ((elt (caddr (org-element-parse-buffer)))
@@ -1655,13 +1655,13 @@ enabled."
16551655
)))))))
16561656

16571657
;;;###autoload
1658-
(defun org-notion-get-user (id)
1658+
(defun org-notion-get-user (&optional id)
16591659
"Get user with given ID from workspace."
16601660
(interactive)
16611661
(org-notion-dispatch
16621662
(org-notion-request
16631663
:method 'user
1664-
:data id
1664+
:data (or id (oref org-notion-current-user :id))
16651665
:callback (org-notion-with-callback
16661666
(when (equal (cdar json-data) "user")
16671667
(org-notion-from-json (org-notion-user) json-data))))))

README.org renamed to readme.org

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#+TITLE: org-notion
2-
#+DATE: 2023-01-15
2+
#+DATE: 2023-07-12
33
#+DESCRIPTION: Notion.so Org-mode Extension
44
#+AUTHOR: ellis
55
6-
6+
* Overview
77
[[https://orgmode.org/][Org-mode]] is the [[https://www.gnu.org/software/emacs/][GNU Emacs]] major-mode for keeping notes, maintaining
88
TODO lists, and project planning. It is a very powerful text-based
99
system for organizing your life in plaintext.
@@ -15,7 +15,14 @@ realtime collaboration, and as of 2021 an [[https://developers.notion.com/][offi
1515
=org-notion= is an Emacs package that uses this API to integrate the
1616
beauty of Notion with your Org-mode workflow.
1717

18-
* Overview
18+
** Status
19+
+ state :: ON HOLD
20+
This package is not yet complete. I plan to continue development in
21+
the next few months but am open to contribs and chatting about
22+
design/features in the meantime. Check the [[*Dev Log][Dev Log]] for updates.
23+
* TODO Introduction
24+
25+
* Design
1926
This package wraps the full Notion API with support for all web
2027
requests and object types. The requests are dispatched via the methods
2128
specializing on the =org-notion-request= EIEIO class instance. The
@@ -83,7 +90,7 @@ recommended as it avoids the prompt and is more secure. You can
8390
disable the check if you wish to temporarily use a different token
8491
with =(setq org-notion-check-auth-source nil)=.
8592

86-
* Usage
93+
* TODO Usage
8794
The autoloaded functions in this package provide the high-level
8895
interface. Most notable of these is =org-notion-mode=, which is a
8996
minor-mode you can add as a hook to =org-mode=.
@@ -117,7 +124,11 @@ defauls are show below.
117124
- Prior Art
118125
- [[https://github.com/ahungry/org-jira][ahungry/org-jira]]
119126
- [[https://github.com/RadekMolenda/org-notion][RadekMolenda/org-notion]]
120-
127+
* Dev Log
128+
** [2023-07-12 Wed] project state
129+
I haven't done much with this project (sorry!) in the past several
130+
months. It's been a busy start to the year with a series of
131+
developments that have taken priority.
121132
* COMMENT notes
122133
** v2 roadmap
123134
*** user capabilities

0 commit comments

Comments
 (0)