Skip to content

Commit

Permalink
Ensure IDs are strings everywhere, since they are not guaranteed to b…
Browse files Browse the repository at this point in the history
…e parseable as integers. Fixes #4
  • Loading branch information
Shinmera committed Feb 13, 2020
1 parent f2cd154 commit b4d0494
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 75 deletions.
8 changes: 6 additions & 2 deletions documentation.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,14 @@ See BOT
See SOURCE")

(function id
"Returns the numerical ID of the object.
"Returns the ID of the object as a string.
This ID is used in the API to query the object itself, or properties
related to it.
related to it. The ID may be an integer, or some other structure encoded
as a string, depending on the instance the object stems from.
About the only thing you can portably do with an ID is determine identity
via STRING=.
See ACCOUNT
See ATTACHMENT
Expand Down
2 changes: 1 addition & 1 deletion objects.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
(hashtags))

(define-entity status
(id :translate-with #'parse-integer)
(id)
(uri)
(url :nullable T)
(account :translate-with #'decode-account)
Expand Down

0 comments on commit b4d0494

Please sign in to comment.