-
Notifications
You must be signed in to change notification settings - Fork 0
Cloud API
Ankit_Anmol edited this page Dec 14, 2021
·
25 revisions
PAGE WIP
You can request Cloud data from Scratch API only.
from ScraGet import ScraGet #import the package
data = ScraGet.get_cloud_data() #create a class
data.updateScratch("431041540",limit="10",offset="0") #update data
print(data.cloud_data) #print required infodata.cloud_data #yes. That's it. ScratchDB doesn't support/return Cloud data.
This is a feature where the package continuously scans the cloud for changes. If any, it runs your code that you specified it. (It's in form of a python decorator). it might be a bit complex to use but is a great tool!
@cloud.scan(ID="612229554",delay=1,NewThread=False)
def hello(change):
print(change.var)Cloud.change_log #list of all changes
#all the below is related to the 1st item of change_log
Cloud.recent #1st item of the change
Cloud.user #person who changed the cloud most recently
Cloud.type #the action of cloud change (set,delete, etc...)
Cloud.var #variable name
Cloud.value #the cloud value
Cloud.time #time when the change happened
Cloud.thread #given when NewThread = True. This contains the thread object
Cloud.stop #this is used to check whether the scanner is running or stoppedAny API you know not covered by this library? Any mistake in this wiki? Create an issue!
Have questions? Ask in the Q/A section!