utpd-models-api 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- utpd_models_api/__init__.py +2 -0
- utpd_models_api/py.typed +0 -0
- utpd_models_api/user_beers.py +169 -0
- utpd_models_api/user_friends.py +93 -0
- utpd_models_api/user_info.py +138 -0
- utpd_models_api-0.1.2.dist-info/METADATA +23 -0
- utpd_models_api-0.1.2.dist-info/RECORD +8 -0
- utpd_models_api-0.1.2.dist-info/WHEEL +4 -0
utpd_models_api/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"""Return structure from Untappd API."""
|
|
2
|
+
# generated by datamodel-codegen:
|
|
3
|
+
# filename: had.json
|
|
4
|
+
# timestamp: 2025-04-25T12:03:51+00:00
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from functools import total_ordering
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ResponseTime(BaseModel):
|
|
14
|
+
model_config = ConfigDict(frozen=True)
|
|
15
|
+
time: float
|
|
16
|
+
measure: str
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class InitTime(BaseModel):
|
|
20
|
+
model_config = ConfigDict(frozen=True)
|
|
21
|
+
time: int
|
|
22
|
+
measure: str
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Meta(BaseModel):
|
|
26
|
+
model_config = ConfigDict(frozen=True)
|
|
27
|
+
code: int
|
|
28
|
+
response_time: ResponseTime
|
|
29
|
+
init_time: InitTime
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class UnreadCount(BaseModel):
|
|
33
|
+
model_config = ConfigDict(frozen=True)
|
|
34
|
+
comments: int
|
|
35
|
+
toasts: int
|
|
36
|
+
friends: int
|
|
37
|
+
messages: int
|
|
38
|
+
venues: int
|
|
39
|
+
veunes: int
|
|
40
|
+
others: int
|
|
41
|
+
news: int
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Notifications(BaseModel):
|
|
45
|
+
model_config = ConfigDict(frozen=True)
|
|
46
|
+
type: str
|
|
47
|
+
unread_count: UnreadCount
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class Dates(BaseModel):
|
|
51
|
+
model_config = ConfigDict(frozen=True)
|
|
52
|
+
first_checkin_date: str
|
|
53
|
+
start_date: bool | str
|
|
54
|
+
end_date: bool | str
|
|
55
|
+
tz_offset: str = Field(..., alias="tzOffset")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@total_ordering
|
|
59
|
+
class Beer(BaseModel):
|
|
60
|
+
model_config = ConfigDict(frozen=True)
|
|
61
|
+
bid: int
|
|
62
|
+
beer_name: str
|
|
63
|
+
beer_label: str
|
|
64
|
+
beer_abv: float
|
|
65
|
+
beer_ibu: int
|
|
66
|
+
beer_slug: str
|
|
67
|
+
beer_style: str
|
|
68
|
+
beer_description: str
|
|
69
|
+
created_at: str
|
|
70
|
+
rating_score: float
|
|
71
|
+
rating_count: int
|
|
72
|
+
|
|
73
|
+
def __eq__(self, other: object) -> bool:
|
|
74
|
+
"""Beer ID is unique, so we can use it."""
|
|
75
|
+
return self.bid == other.bid if isinstance(other, Beer) else NotImplemented
|
|
76
|
+
|
|
77
|
+
def __lt__(self, other: object) -> bool:
|
|
78
|
+
"""Beer ID is unique, so we can use it for ordering."""
|
|
79
|
+
return self.bid < other.bid if isinstance(other, Beer) else NotImplemented
|
|
80
|
+
|
|
81
|
+
def __hash__(self) -> int:
|
|
82
|
+
"""Beer ID is unique, so we can use it as a hash."""
|
|
83
|
+
return hash(self.bid)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class Contact(BaseModel):
|
|
87
|
+
model_config = ConfigDict(frozen=True)
|
|
88
|
+
twitter: str
|
|
89
|
+
facebook: str
|
|
90
|
+
instagram: str
|
|
91
|
+
url: str
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class Location(BaseModel):
|
|
95
|
+
model_config = ConfigDict(frozen=True)
|
|
96
|
+
brewery_city: str
|
|
97
|
+
brewery_state: str
|
|
98
|
+
lat: float
|
|
99
|
+
lng: float
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class Brewery(BaseModel):
|
|
103
|
+
model_config = ConfigDict(frozen=True)
|
|
104
|
+
brewery_id: int
|
|
105
|
+
brewery_name: str
|
|
106
|
+
brewery_slug: str
|
|
107
|
+
brewery_page_url: str
|
|
108
|
+
brewery_type: str
|
|
109
|
+
brewery_label: str
|
|
110
|
+
country_name: str
|
|
111
|
+
contact: Contact
|
|
112
|
+
location: Location
|
|
113
|
+
brewery_active: int
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class Item(BaseModel):
|
|
117
|
+
model_config = ConfigDict(frozen=True)
|
|
118
|
+
first_checkin_id: int
|
|
119
|
+
first_created_at: str
|
|
120
|
+
recent_checkin_id: int
|
|
121
|
+
recent_created_at: str
|
|
122
|
+
recent_created_at_timezone: int
|
|
123
|
+
rating_score: float
|
|
124
|
+
user_auth_rating_score: float
|
|
125
|
+
first_had: str
|
|
126
|
+
count: int
|
|
127
|
+
beer: Beer
|
|
128
|
+
brewery: Brewery
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class Beers(BaseModel):
|
|
132
|
+
model_config = ConfigDict(frozen=True)
|
|
133
|
+
count: int
|
|
134
|
+
items: list[Item]
|
|
135
|
+
sort_english: str
|
|
136
|
+
sort_name: str
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class Pagination(BaseModel):
|
|
140
|
+
model_config = ConfigDict(frozen=True)
|
|
141
|
+
next_url: str
|
|
142
|
+
offset: int | None = None
|
|
143
|
+
max_id: bool | str
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class Response(BaseModel):
|
|
147
|
+
model_config = ConfigDict(frozen=True)
|
|
148
|
+
total_count: int
|
|
149
|
+
dates: Dates
|
|
150
|
+
is_search: bool
|
|
151
|
+
sort: bool
|
|
152
|
+
type_id: bool
|
|
153
|
+
country_id: bool
|
|
154
|
+
brewery_id: bool
|
|
155
|
+
rating_score: bool
|
|
156
|
+
region_id: bool
|
|
157
|
+
container_id: bool
|
|
158
|
+
is_multi_type: bool
|
|
159
|
+
beers: Beers
|
|
160
|
+
sort_key: str
|
|
161
|
+
sort_name: str
|
|
162
|
+
pagination: Pagination
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class UserBeers(BaseModel):
|
|
166
|
+
model_config = ConfigDict(frozen=True)
|
|
167
|
+
meta: Meta
|
|
168
|
+
notifications: Notifications
|
|
169
|
+
response: Response
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: friends.json
|
|
3
|
+
# timestamp: 2025-04-26T01:53:39+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ResponseTime(BaseModel):
|
|
11
|
+
model_config = ConfigDict(frozen=True)
|
|
12
|
+
time: float
|
|
13
|
+
measure: str
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class InitTime(BaseModel):
|
|
17
|
+
model_config = ConfigDict(frozen=True)
|
|
18
|
+
time: int
|
|
19
|
+
measure: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Meta(BaseModel):
|
|
23
|
+
model_config = ConfigDict(frozen=True)
|
|
24
|
+
code: int
|
|
25
|
+
response_time: ResponseTime
|
|
26
|
+
init_time: InitTime
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class UnreadCount(BaseModel):
|
|
30
|
+
model_config = ConfigDict(frozen=True)
|
|
31
|
+
comments: int
|
|
32
|
+
toasts: int
|
|
33
|
+
friends: int
|
|
34
|
+
messages: int
|
|
35
|
+
venues: int
|
|
36
|
+
veunes: int
|
|
37
|
+
others: int
|
|
38
|
+
news: int
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Notifications(BaseModel):
|
|
42
|
+
model_config = ConfigDict(frozen=True)
|
|
43
|
+
type: str
|
|
44
|
+
unread_count: UnreadCount
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class MutualFriends(BaseModel):
|
|
48
|
+
model_config = ConfigDict(frozen=True)
|
|
49
|
+
count: int
|
|
50
|
+
items: list
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class User(BaseModel):
|
|
54
|
+
model_config = ConfigDict(frozen=True)
|
|
55
|
+
uid: int
|
|
56
|
+
user_name: str
|
|
57
|
+
location: str
|
|
58
|
+
bio: str
|
|
59
|
+
is_supporter: int
|
|
60
|
+
first_name: str
|
|
61
|
+
last_name: str
|
|
62
|
+
relationship: str
|
|
63
|
+
user_avatar: str
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class Item(BaseModel):
|
|
67
|
+
model_config = ConfigDict(frozen=True)
|
|
68
|
+
friendship_hash: str
|
|
69
|
+
created_at: str
|
|
70
|
+
mutual_friends: MutualFriends
|
|
71
|
+
user: User
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class Pagination(BaseModel):
|
|
75
|
+
model_config = ConfigDict(frozen=True)
|
|
76
|
+
next_url: str
|
|
77
|
+
offset: int | None = None
|
|
78
|
+
max_id: bool | str
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class Response(BaseModel):
|
|
82
|
+
model_config = ConfigDict(frozen=True)
|
|
83
|
+
found: int
|
|
84
|
+
count: int
|
|
85
|
+
items: list[Item]
|
|
86
|
+
pagination: Pagination
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class UserFriends(BaseModel):
|
|
90
|
+
model_config = ConfigDict(frozen=True)
|
|
91
|
+
meta: Meta
|
|
92
|
+
notifications: Notifications
|
|
93
|
+
response: Response
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: user.json
|
|
3
|
+
# timestamp: 2025-04-25T11:38:14+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from pydantic import BaseModel, ConfigDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ResponseTime(BaseModel):
|
|
13
|
+
model_config = ConfigDict(frozen=True)
|
|
14
|
+
time: float
|
|
15
|
+
measure: str
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class InitTime(BaseModel):
|
|
19
|
+
model_config = ConfigDict(frozen=True)
|
|
20
|
+
time: int
|
|
21
|
+
measure: str
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Meta(BaseModel):
|
|
25
|
+
model_config = ConfigDict(frozen=True)
|
|
26
|
+
code: int
|
|
27
|
+
response_time: ResponseTime
|
|
28
|
+
init_time: InitTime
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class UnreadCount(BaseModel):
|
|
32
|
+
model_config = ConfigDict(frozen=True)
|
|
33
|
+
comments: int
|
|
34
|
+
toasts: int
|
|
35
|
+
friends: int
|
|
36
|
+
messages: int
|
|
37
|
+
venues: int
|
|
38
|
+
veunes: int
|
|
39
|
+
others: int
|
|
40
|
+
news: int
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Notifications(BaseModel):
|
|
44
|
+
model_config = ConfigDict(frozen=True)
|
|
45
|
+
type: str
|
|
46
|
+
unread_count: UnreadCount
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Stats(BaseModel):
|
|
50
|
+
model_config = ConfigDict(frozen=True)
|
|
51
|
+
total_badges: int
|
|
52
|
+
total_friends: int
|
|
53
|
+
total_checkins: int
|
|
54
|
+
total_beers: int
|
|
55
|
+
total_created_beers: int
|
|
56
|
+
total_followings: int
|
|
57
|
+
total_photos: int
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class Contact(BaseModel):
|
|
61
|
+
model_config = ConfigDict(frozen=True)
|
|
62
|
+
foursquare: str
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class Badge(BaseModel):
|
|
66
|
+
model_config = ConfigDict(frozen=True)
|
|
67
|
+
badges_to_facebook: int
|
|
68
|
+
badges_to_twitter: int
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class Checkin(BaseModel):
|
|
72
|
+
model_config = ConfigDict(frozen=True)
|
|
73
|
+
checkin_to_facebook: int
|
|
74
|
+
checkin_to_twitter: int
|
|
75
|
+
checkin_to_foursquare: int
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class Navigation(BaseModel):
|
|
79
|
+
model_config = ConfigDict(frozen=True)
|
|
80
|
+
default_to_checkin: int
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class Settings(BaseModel):
|
|
84
|
+
model_config = ConfigDict(frozen=True)
|
|
85
|
+
badge: Badge
|
|
86
|
+
checkin: Checkin
|
|
87
|
+
navigation: Navigation
|
|
88
|
+
email_address: str
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class Subscribe(BaseModel):
|
|
92
|
+
model_config = ConfigDict(frozen=True)
|
|
93
|
+
is_subscribed: int
|
|
94
|
+
subscribe_type: str
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class User(BaseModel):
|
|
98
|
+
model_config = ConfigDict(frozen=True)
|
|
99
|
+
uid: int
|
|
100
|
+
id: int
|
|
101
|
+
user_name: str
|
|
102
|
+
is_anonymous: int
|
|
103
|
+
first_name: str
|
|
104
|
+
last_name: str
|
|
105
|
+
user_avatar: str
|
|
106
|
+
user_avatar_hd: str
|
|
107
|
+
user_cover_photo: str
|
|
108
|
+
user_cover_photo_offset: int
|
|
109
|
+
is_private: int
|
|
110
|
+
rating_bump: int
|
|
111
|
+
location: str
|
|
112
|
+
url: str
|
|
113
|
+
bio: str
|
|
114
|
+
is_supporter: int
|
|
115
|
+
is_moderator: int
|
|
116
|
+
relationship: str
|
|
117
|
+
block_status: str
|
|
118
|
+
mute_status: str
|
|
119
|
+
untappd_url: str
|
|
120
|
+
account_type: str
|
|
121
|
+
stats: Stats
|
|
122
|
+
contact: Any # Contact
|
|
123
|
+
date_joined: str
|
|
124
|
+
settings: Any # Settings
|
|
125
|
+
wish_list_subscribe_status: bool | None = None
|
|
126
|
+
subscribe: Subscribe | None = None
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class Response(BaseModel):
|
|
130
|
+
model_config = ConfigDict(frozen=True)
|
|
131
|
+
user: User
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class UserInfo(BaseModel):
|
|
135
|
+
model_config = ConfigDict(frozen=True)
|
|
136
|
+
meta: Meta
|
|
137
|
+
notifications: Notifications
|
|
138
|
+
response: Response
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: utpd-models-api
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Untappd API returned structures
|
|
5
|
+
Author-email: Wardy <wardy3+gitlab@gmail.com>
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: Intended Audience :: Developers
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
13
|
+
Requires-Python: >=3.13
|
|
14
|
+
Requires-Dist: pydantic>=2.11.3
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# ut-models-api
|
|
18
|
+
|
|
19
|
+
This package provides data structures and models only.
|
|
20
|
+
|
|
21
|
+
It is designed to share data from the Untappd API and processed in various locations.
|
|
22
|
+
|
|
23
|
+
No scraping or processing logic is included—only the definitions for consistent data exchange.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
utpd_models_api/__init__.py,sha256=B-bz3d5rggWIiYge9acHZRR4TPogN99m5NH1PkfaQ8I,59
|
|
2
|
+
utpd_models_api/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
utpd_models_api/user_beers.py,sha256=hWT1l6MHeldO7gUr06vHOxjQbUljaSz2zGE2iQVpqQU,3674
|
|
4
|
+
utpd_models_api/user_friends.py,sha256=GCRL-Xu9j7aGRBt_tmQIRztt4pDurJ0eOlD6qfUZ_0I,1807
|
|
5
|
+
utpd_models_api/user_info.py,sha256=g-emcCKcfskjP6qVyGqcwgppLcM8gcPlRyG-wUClIpw,2803
|
|
6
|
+
utpd_models_api-0.1.2.dist-info/METADATA,sha256=GCkex5032OIY5-QY4iEZ_oW3IgCm9Hb-IpLRU20OdU4,857
|
|
7
|
+
utpd_models_api-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
8
|
+
utpd_models_api-0.1.2.dist-info/RECORD,,
|