Skip to content

Commit bc7a468

Browse files
committed
ran black on Mastodon file addition
1 parent 64d59f6 commit bc7a468

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

examples/requests_api_mastodon.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ def time_calc(input_time):
5454

5555
# Publicly available data no header required
5656
MAST_SOURCE = (
57-
"https://mastodon.cloud/api/v1/accounts/"
58-
+ Mastodon_UserID
59-
+ "/statuses?limit=1"
57+
"https://mastodon.cloud/api/v1/accounts/" + Mastodon_UserID + "/statuses?limit=1"
6058
)
6159

6260
# Connect to Wi-Fi
@@ -91,16 +89,16 @@ def time_calc(input_time):
9189
if debug_mastodon_full_response:
9290
print("Full API GET URL: ", MAST_SOURCE)
9391
print(mastodon_json)
94-
mastodon_userid = mastodon_json['account']['id']
92+
mastodon_userid = mastodon_json["account"]["id"]
9593
print("User ID: ", mastodon_userid)
96-
97-
mastodon_username = mastodon_json['account']['display_name']
94+
95+
mastodon_username = mastodon_json["account"]["display_name"]
9896
print("Name: ", mastodon_username)
99-
mastodon_join_date = mastodon_json['account']['created_at']
97+
mastodon_join_date = mastodon_json["account"]["created_at"]
10098
print("Member Since: ", mastodon_join_date)
101-
mastodon_toot_count = mastodon_json['account']['statuses_count']
99+
mastodon_toot_count = mastodon_json["account"]["statuses_count"]
102100
print("Toots: ", mastodon_toot_count)
103-
mastodon_follower_count = mastodon_json['account']['followers_count']
101+
mastodon_follower_count = mastodon_json["account"]["followers_count"]
104102
print("Followers: ", mastodon_follower_count)
105103
print("Monotonic: ", time.monotonic())
106104

0 commit comments

Comments
 (0)