@@ -902,11 +902,11 @@ are lists of values."
902
902
:documentation " The symbol used to maintain a hashtable
903
903
of org-notion instances. The instance hashtable
904
904
is treated as a variable, with new instanaces
905
- added to it." )
905
+ added to it." ))
906
906
:documentation " Mixin used to cache object instances based on
907
907
`eieio-instance-tracker' . Inheritors must override
908
908
`cache' which is a variable used to cache instances."
909
- :abstract t ))
909
+ :abstract t )
910
910
911
911
(cl-defmethod cache-instance ((this org-notion-cache) &rest _slots)
912
912
" Make sure OBJ is in our cache. Optional argument SLOTS are the
@@ -1156,13 +1156,13 @@ a bot. Identified by the `:id' slot.")
1156
1156
(created_time
1157
1157
:initarg :created_time
1158
1158
:documentation " Datetime when this block was created." )
1159
- (last_edited_by
1159
+ (updated_by
1160
1160
:initform nil
1161
- :initarg :last_edited_by
1161
+ :initarg :updated_by
1162
1162
:type (or org-notion-user null )
1163
1163
:documentation " Last user to edit this block." )
1164
- (last_edited_time
1165
- :initarg :last_edited_time
1164
+ (updated_time
1165
+ :initarg :updated_time
1166
1166
:documentation " Datetime when this block was last edited." )
1167
1167
(icon
1168
1168
:initform nil
@@ -1211,8 +1211,8 @@ a bot. Identified by the `:id' slot.")
1211
1211
(alist-get 'title json))))) ; this is a vector
1212
1212
:created_by (alist-get 'created_by json)
1213
1213
: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)
1216
1216
:icon (alist-get 'icon json)
1217
1217
:cover (alist-get 'cover json)
1218
1218
:properties (alist-get 'properties json)
@@ -1233,16 +1233,16 @@ a bot. Identified by the `:id' slot.")
1233
1233
1234
1234
(cl-defmethod org-notion-to-org ((obj org-notion-database) &optional type)
1235
1235
" 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
1237
1237
; ; TODO 2023-01-07: we can do better here
1238
1238
(let ((props
1239
- (when (or id icon cover created updated url)
1239
+ (when (or id icon cover created_time updated_time url)
1240
1240
(org-notion--property-drawer
1241
1241
`((id . , id )
1242
1242
(icon . , icon )
1243
1243
(cover . , cover )
1244
- (created . , created )
1245
- (updated . , updated )
1244
+ (created . , created_time )
1245
+ (updated . , updated_time )
1246
1246
(url . , url ))))))
1247
1247
(pcase type
1248
1248
((or 'nil 'heading )
@@ -1259,7 +1259,7 @@ a bot. Identified by the `:id' slot.")
1259
1259
1260
1260
(cl-defmethod org-notion-from-org ((obj org-notion-database) &optional str)
1261
1261
" 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
1263
1263
(with-temp-buffer
1264
1264
(insert str)
1265
1265
(let* ((elt (caddr (org-element-parse-buffer)))
@@ -1655,13 +1655,13 @@ enabled."
1655
1655
)))))))
1656
1656
1657
1657
;;;### autoload
1658
- (defun org-notion-get-user (id )
1658
+ (defun org-notion-get-user (&optional id )
1659
1659
" Get user with given ID from workspace."
1660
1660
(interactive )
1661
1661
(org-notion-dispatch
1662
1662
(org-notion-request
1663
1663
:method 'user
1664
- :data id
1664
+ :data ( or id ( oref org-notion-current-user :id ))
1665
1665
:callback (org-notion-with-callback
1666
1666
(when (equal (cdar json-data) " user" )
1667
1667
(org-notion-from-json (org-notion-user) json-data))))))
0 commit comments