Skip to content

Commit 3f35dee

Browse files
committed
👽️ Update the code due to API updates
1 parent 1f129a2 commit 3f35dee

4 files changed

Lines changed: 34 additions & 21 deletions

File tree

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def read_requirements():
2424

2525
setup(
2626
name="solar-network-sdk",
27-
version="1.0.1",
27+
version="1.0.2",
2828
author="liang-work",
2929
author_email="admin@thsl.dpdns.org",
3030
description="A Python SDK for interacting with the Solar Network API(Not official)",
@@ -63,7 +63,7 @@ def read_requirements():
6363
"solar_network_sdk": ["py.typed"],
6464
},
6565
zip_safe=False,
66-
keywords="solar network api sdk authentication",
66+
keywords="solar-network api sdk authentication",
6767
project_urls={
6868
"Bug Reports": "https://github.com/liang-work/SolarNetworkSDKForPython/issues",
6969
"Source": "https://github.com/liang-work/SolarNetworkSDKForPython",

solar_network_sdk/__init__.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
Account, AccountProfile, AccountStatus, AccountBadge, ContactMethod,
1313
Notification, VerificationMark, AuthDevice, AuthDeviceWithSession,
1414
ExperienceRecord, SocialCreditRecord, FriendOverviewItem,
15+
AccountStatusType, ProfileLink, UsernameColor,
1516

1617
# Auth models
1718
AuthChallenge, AuthSession, AppToken, GeoIpLocation, AuthFactor,
1819
AccountConnection,
1920

2021
# Activity models
2122
NotableDay, TimelineEvent, CheckInResult, FortuneTip, EventCalendarEntry,
22-
PresenceActivity,
23+
PresenceActivity, AccountTimelineItem,
2324

2425
# ActivityPub models
2526
ActivityPubInstance, ActivityPubUser, ActivityPubActor,
@@ -43,15 +44,17 @@
4344
PostEmbedView, PostEmbedViewRenderer, PostAward, PostReaction,
4445
PostFeaturedRecord, PostWithStats, PollWithStats, Poll, PollQuestion,
4546
PollOption, SnPollQuestionType, PollAnswer, PostTag, CategorySubscription,
46-
PostCategory, ScrappedLink, Heatmap, HeatmapItem,
47+
PostCategory, ScrappedLink, Heatmap, HeatmapItem, REACTION_TEMPLATES,
4748

4849
# Realm models
49-
Realm, RealmMember,
50+
Realm, RealmMember, RealmLabel,
5051

5152
# Wallet models
5253
Wallet, WalletStats, WalletPocket, Transaction, WalletSubscription,
5354
WalletSubscriptionRef, WalletOrder, WalletGift, WalletFund,
5455
WalletFundRecipient, LotteryTicket, LotteryRecord,
56+
SubscriptionCatalog, SubscriptionGroupCatalog, ActiveSubscription,
57+
SubscriptionGroup, SubscriptionDisplayConfig, ProductProviderMappings,
5558
)
5659

5760
__version__ = "1.0.1"
@@ -67,15 +70,15 @@
6770
'Account', 'AccountProfile', 'AccountStatus', 'AccountBadge',
6871
'ContactMethod', 'Notification', 'VerificationMark', 'AuthDevice',
6972
'AuthDeviceWithSession', 'ExperienceRecord', 'SocialCreditRecord',
70-
'FriendOverviewItem',
73+
'FriendOverviewItem', 'AccountStatusType', 'ProfileLink', 'UsernameColor',
7174

7275
# Auth models
7376
'AuthChallenge', 'AuthSession', 'AppToken', 'GeoIpLocation',
7477
'AuthFactor', 'AccountConnection',
7578

7679
# Activity models
7780
'NotableDay', 'TimelineEvent', 'CheckInResult', 'FortuneTip',
78-
'EventCalendarEntry', 'PresenceActivity',
81+
'EventCalendarEntry', 'PresenceActivity', 'AccountTimelineItem',
7982

8083
# ActivityPub models
8184
'ActivityPubInstance', 'ActivityPubUser', 'ActivityPubActor',
@@ -100,14 +103,16 @@
100103
'PostReaction', 'PostFeaturedRecord', 'PostWithStats', 'PollWithStats',
101104
'Poll', 'PollQuestion', 'PollOption', 'SnPollQuestionType', 'PollAnswer',
102105
'PostTag', 'CategorySubscription', 'PostCategory', 'ScrappedLink',
103-
'Heatmap', 'HeatmapItem',
106+
'Heatmap', 'HeatmapItem', 'REACTION_TEMPLATES',
104107

105108
# Realm models
106-
'Realm', 'RealmMember',
109+
'Realm', 'RealmMember', 'RealmLabel',
107110

108111
# Wallet models
109112
'Wallet', 'WalletStats', 'WalletPocket', 'Transaction',
110113
'WalletSubscription', 'WalletSubscriptionRef', 'WalletOrder',
111114
'WalletGift', 'WalletFund', 'WalletFundRecipient', 'LotteryTicket',
112-
'LotteryRecord',
115+
'LotteryRecord', 'SubscriptionCatalog', 'SubscriptionGroupCatalog',
116+
'ActiveSubscription', 'SubscriptionGroup', 'SubscriptionDisplayConfig',
117+
'ProductProviderMappings',
113118
]

solar_network_sdk/client.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
Account, AccountProfile, AccountStatus, AccountBadge, ContactMethod,
1616
Notification, VerificationMark, AuthDevice, AuthDeviceWithSession,
1717
ExperienceRecord, SocialCreditRecord, FriendOverviewItem,
18+
AccountStatusType, ProfileLink, UsernameColor,
1819

1920
# Auth models
2021
AuthChallenge, AuthSession, AppToken, GeoIpLocation, AuthFactor,
2122
AccountConnection,
2223

2324
# Activity models
2425
NotableDay, TimelineEvent, CheckInResult, FortuneTip, EventCalendarEntry,
25-
PresenceActivity,
26+
PresenceActivity, AccountTimelineItem,
2627

2728
# ActivityPub models
2829
ActivityPubInstance, ActivityPubUser, ActivityPubActor,
@@ -46,15 +47,17 @@
4647
PostEmbedView, PostEmbedViewRenderer, PostAward, PostReaction,
4748
PostFeaturedRecord, PostWithStats, PollWithStats, Poll, PollQuestion,
4849
PollOption, SnPollQuestionType, PollAnswer, PostTag, CategorySubscription,
49-
PostCategory, ScrappedLink, Heatmap, HeatmapItem,
50+
PostCategory, ScrappedLink, Heatmap, HeatmapItem, REACTION_TEMPLATES,
5051

5152
# Realm models
52-
Realm, RealmMember,
53+
Realm, RealmMember, RealmLabel,
5354

5455
# Wallet models
5556
Wallet, WalletStats, WalletPocket, Transaction, WalletSubscription,
5657
WalletSubscriptionRef, WalletOrder, WalletGift, WalletFund,
5758
WalletFundRecipient, LotteryTicket, LotteryRecord,
59+
SubscriptionCatalog, SubscriptionGroupCatalog, ActiveSubscription,
60+
SubscriptionGroup, SubscriptionDisplayConfig, ProductProviderMappings,
5861
)
5962

6063

solar_network_sdk/models/__init__.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Account, AccountProfile, AccountStatus, AccountBadge, ContactMethod,
1010
Notification, VerificationMark, AuthDevice, AuthDeviceWithSession,
1111
ExperienceRecord, SocialCreditRecord, FriendOverviewItem,
12+
AccountStatusType, ProfileLink, UsernameColor,
1213
)
1314

1415
# Auth models
@@ -20,7 +21,7 @@
2021
# Activity models
2122
from .activity import (
2223
NotableDay, TimelineEvent, CheckInResult, FortuneTip, EventCalendarEntry,
23-
PresenceActivity,
24+
PresenceActivity, AccountTimelineItem,
2425
)
2526

2627
# ActivityPub models
@@ -54,35 +55,37 @@
5455
PostEmbedView, PostEmbedViewRenderer, PostAward, PostReaction,
5556
PostFeaturedRecord, PostWithStats, PollWithStats, Poll, PollQuestion,
5657
PollOption, SnPollQuestionType, PollAnswer, PostTag, CategorySubscription,
57-
PostCategory, ScrappedLink, Heatmap, HeatmapItem,
58+
PostCategory, ScrappedLink, Heatmap, HeatmapItem, REACTION_TEMPLATES,
5859
)
5960

6061
# Realm models
6162
from .realms import (
62-
Realm, RealmMember,
63+
Realm, RealmMember, RealmLabel,
6364
)
6465

6566
# Wallet models
6667
from .wallets import (
6768
Wallet, WalletStats, WalletPocket, Transaction, WalletSubscription,
6869
WalletSubscriptionRef, WalletOrder, WalletGift, WalletFund,
6970
WalletFundRecipient, LotteryTicket, LotteryRecord,
71+
SubscriptionCatalog, SubscriptionGroupCatalog, ActiveSubscription,
72+
SubscriptionGroup, SubscriptionDisplayConfig, ProductProviderMappings,
7073
)
7174

7275
__all__ = [
7376
# Account models
7477
'Account', 'AccountProfile', 'AccountStatus', 'AccountBadge',
7578
'ContactMethod', 'Notification', 'VerificationMark', 'AuthDevice',
7679
'AuthDeviceWithSession', 'ExperienceRecord', 'SocialCreditRecord',
77-
'FriendOverviewItem',
80+
'FriendOverviewItem', 'AccountStatusType', 'ProfileLink', 'UsernameColor',
7881

7982
# Auth models
8083
'AuthChallenge', 'AuthSession', 'AppToken', 'GeoIpLocation',
8184
'AuthFactor', 'AccountConnection',
8285

8386
# Activity models
8487
'NotableDay', 'TimelineEvent', 'CheckInResult', 'FortuneTip',
85-
'EventCalendarEntry', 'PresenceActivity',
88+
'EventCalendarEntry', 'PresenceActivity', 'AccountTimelineItem',
8689

8790
# ActivityPub models
8891
'ActivityPubInstance', 'ActivityPubUser', 'ActivityPubActor',
@@ -107,14 +110,16 @@
107110
'PostReaction', 'PostFeaturedRecord', 'PostWithStats', 'PollWithStats',
108111
'Poll', 'PollQuestion', 'PollOption', 'SnPollQuestionType', 'PollAnswer',
109112
'PostTag', 'CategorySubscription', 'PostCategory', 'ScrappedLink',
110-
'Heatmap', 'HeatmapItem',
113+
'Heatmap', 'HeatmapItem', 'REACTION_TEMPLATES',
111114

112115
# Realm models
113-
'Realm', 'RealmMember',
116+
'Realm', 'RealmMember', 'RealmLabel',
114117

115118
# Wallet models
116119
'Wallet', 'WalletStats', 'WalletPocket', 'Transaction',
117120
'WalletSubscription', 'WalletSubscriptionRef', 'WalletOrder',
118121
'WalletGift', 'WalletFund', 'WalletFundRecipient', 'LotteryTicket',
119-
'LotteryRecord',
122+
'LotteryRecord', 'SubscriptionCatalog', 'SubscriptionGroupCatalog',
123+
'ActiveSubscription', 'SubscriptionGroup', 'SubscriptionDisplayConfig',
124+
'ProductProviderMappings',
120125
]

0 commit comments

Comments
 (0)