1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

API can now properly show ranges

This commit is contained in:
Krateng
2019-05-08 17:42:56 +02:00
parent 5c076dfe25
commit 341af94fa9
3 changed files with 18 additions and 0 deletions

View File

@@ -78,6 +78,15 @@ class MRangeDescriptor:
"description":self.desc()
}
def __json__(self):
return {
"fromstring":self.fromstr(),
"tostr":self.tostr(),
"fromstamp":self.first_stamp(),
"tostamp":self.last_stamp(),
"description":self.desc()
}
def uri(self):
return "&".join(k + "=" + self.urikeys[k] for k in self.urikeys)