Skip to content

Commit 7ba59bd

Browse files
committed
Add new classes
1 parent 48f38d7 commit 7ba59bd

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/vws/reports.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
Classes for representing Vuforia reports.
33
"""
44

5+
import datetime
56
from dataclasses import dataclass
7+
from enum import Enum
68

79

810
@dataclass
@@ -26,3 +28,36 @@ class DatabaseSummaryReport:
2628
request_usage: int
2729
target_quota: int
2830
total_recos: int
31+
32+
33+
class TargetStatuses(Enum):
34+
"""
35+
Constants representing VWS target statuses.
36+
See the 'status' field in
37+
https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API.html#How-To-Retrieve-a-Target-Record
38+
"""
39+
40+
PROCESSING = 'processing'
41+
SUCCESS = 'success'
42+
FAILED = 'failed'
43+
44+
45+
@dataclass
46+
class TargetSummaryReport:
47+
"""
48+
A target summary report.
49+
50+
See
51+
https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Retrieve-a-Target-Summary-Report.
52+
"""
53+
54+
target_status: TargetStatuses
55+
total_recos: int
56+
database_name: str
57+
target_name: str
58+
upload_date: datetime.date
59+
active_flag: bool
60+
tracking_rating: int
61+
total_recos: int
62+
current_month_recos: int
63+
previous_month_recos: int

0 commit comments

Comments
 (0)