Get a source unit's age thanks to the REST API #7371
Unanswered
benjaminchazelle
asked this question in
Ideas
Replies: 1 comment 4 replies
-
Yes, it should be added as a read-only field. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I would like to make a script able to remove unused translation keys in my code, older than a certain date.
For that, I would need to get the creation date of a unit. According to the
/weblate/trans/models/unit.py
file, this corresponds to thetimestamp = models.DateTimeField(auto_now_add=True)
field in theclass Unit
.This information is available in the Web UI, however, in the REST API, on the
GET /api/units/(int: id)/
endpoint, this information is not exposed.From what I understand from the codebase, it would be "enough" to add the timestamp field in the
class UnitSerializer
fields in the file/weblate/api/serializers.py
Could you expose this information? It would be very great :)
Thank you in advance !
Beta Was this translation helpful? Give feedback.
All reactions