Create GlossaryInfo from the given API JSON object.
(json)
| 623 | |
| 624 | @staticmethod |
| 625 | def from_json(json) -> "GlossaryInfo": |
| 626 | """Create GlossaryInfo from the given API JSON object.""" |
| 627 | return GlossaryInfo( |
| 628 | json["glossary_id"], |
| 629 | json["name"], |
| 630 | bool(json["ready"]), |
| 631 | str(json["source_lang"]).upper(), |
| 632 | str(json["target_lang"]).upper(), |
| 633 | parse_timestamp(json["creation_time"]), |
| 634 | int(json["entry_count"]), |
| 635 | ) |
| 636 | |
| 637 | @property |
| 638 | def glossary_id(self) -> str: |
no test coverage detected