Skip to content

Commit

Permalink
1.4.7 Fixed get_cloud_logs function
Browse files Browse the repository at this point in the history
  • Loading branch information
TimMcCool committed Sep 9, 2023
1 parent 44a1f19 commit be33599
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.4.7

- Fixed `scratchattach.get_cloud_logs` function (has been broken since v1.4.0)

# 1.4.6

- Fixed `project.studios()` function
Expand Down
2 changes: 1 addition & 1 deletion scratchattach/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def get_cloud_logs(project_id, *, filter_by_var_named =None, limit=25, offset=0)
log_url (str): If you want to get the clouddata from a cloud log API different to Scratch's normal cloud log API, set this argument to the URL of the API. Only set this argument if you know what you are doing. If you want to get the clouddata from the normal API, don't put this argument.
"""
try:
response = json.loads(requests.get(f"{log_url}?projectid={project_id}&limit={limit}&offset={offset}").text)
response = json.loads(requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={project_id}&limit={limit}&offset={offset}").text)
if filter_by_var_named is None: return response
else:
return list(filter(lambda k: k["name"] == "☁ "+filter_by_var_named, response))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import codecs
import os

VERSION = '1.4.5'
VERSION = '1.4.7'
DESCRIPTION = 'An Scratch API Wrapper for scratch.mit.edu'
LONG_DESCRIPTION = DESCRIPTION

Expand Down

0 comments on commit be33599

Please sign in to comment.