Skip to main content

Python to Scratch API Bridge

Project description

HOW TO DOWNLOAD

+++++++++++++++++++++++++++
Run this command in your Project's Shell
 pip install Scapii
 Copy the code from the import section below and paste it into your main python file.
+++++++++++++++++++++++++++

Import:

import ScAPI as scratch, os
from ScAPI import ScAPI
sAPI = ScAPI('username', 'password')

USER:

+++++++++++++++++++++++++++
user.exists() # Checks if the user exists, output gives true/false

user.getMessagesCount() # Gets the users MessageCount (Broken because of scratch)

user.getMessages() # Gets the users messages and returns it as a .json file


user.getStatus() # Gets the About Me Section of the users profile


user.getBio() # Gets the What I'm Working On Section of the users profile


user.getProjects() # Gets the Project IDs of the users published projects
+++++++++++++++++++++++++++

USER SESSION:

+++++++++++++++++++++++++++
studio.inviteCurator('person') # Invites the member to the selected studio

studio.addStudioProject('pid') # Adds a project to the selected studio

studio.postComment('Text', 'parentid', 'commentee_id') # Posts a comment in the selected studio

studio.getComments() # Gets the comments of the selected studio

studio.follow() # follows the selected studio

studio.unfollow() # unfollows the selected studio
+++++++++++++++++++++++++++

PROJECT:

+++++++++++++++++++++++++++
project.getStats('loves/faves/remixes/views') # Gets the statistics of the selected project

project.getComments() # Gets the comments of the selected project

project.getInfo() Gets the project info of the selected project

project.fetchAssets(type='img') # Gets the thumbnail of the selected project
+++++++++++++++++++++++++++

PROJECT SESSION:

+++++++++++++++++++++++++++
project.share() # Shares the project

project.unshare() # Unshares the project

project.favorite() # Favorites the project

project.unfavorite() # Unfavorites the project

project.love() # Loves the project

project.unlove() # Unloves the project
+++++++++++++++++++++++++++

CLOUD SESSION:

+++++++++++++++++++++++++++
cloudproject.setCloudVar('CloudVar', 'Value') # Sets the variable of the project

cloudproject.readCloudVar('variable name', 'Limit(optional)') # Fetchs the variable of the project
+++++++++++++++++++++++++++

TURBOWARP SESSION:

+++++++++++++++++++++++++++
turbowarp.setCloudVar('CloudVar', 'Value') # Sets the variable of the project (On TurboWarp)

turbowarp.readTurbowarpVar('variable name') # Fetchs the variable of the project (On TurboWarp)
+++++++++++++++++++++++++++

CLOUD DATABASE:

+++++++++++++++++++++++++++
db = sAPI.cloudDatabase('Project id') # Input the project ID to store data to

db.startLoop() # Detects messages from chatting servers on the selected project
+++++++++++++++++++++++++++

ENCODE/DECODE:

(THE SCRATCH ENCODER/DECODER SCRIPTS ARE LOCATED @ https://scratch.mit.edu/projects/607983101/editor/)

+++++++++++++++++++++++++++
sAPI.encode('value') # Encodes the given value

sAPI.decode('value') # Decodes the given value
+++++++++++++++++++++++++++

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Scappi-1.0.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Scappi-1.0.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file Scappi-1.0.0.tar.gz.

File metadata

  • Download URL: Scappi-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for Scappi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a120ce786028946bd0827e2bbf4cad3559fcc96e8a64b46b112e5a6d8fca3aab
MD5 5391b97d1cf655bc042c7c8d8525598e
BLAKE2b-256 34bb5919ed26b94a2a0ac2bda5b013ef2c3c622744800fb162f9ae4e4abe1ea4

See more details on using hashes here.

File details

Details for the file Scappi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: Scappi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for Scappi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7beede6820b86b5c3b349b4aebad4935fa224f773d0ceb377b540f46414dc00
MD5 83bfe073e15eb7d997de835317a85b60
BLAKE2b-256 7c0aca79e68f038e7b1730e52c27bea01167769c4b34c5ffbeee4be8c7d3853e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page