Forum API - Quantum-Codes/ScraGet GitHub Wiki

Note: A topic is a post. A post can have both topic ID and post ID if the post is a topic (or #1 in the thread). Example: search for post 5162254 and topic 507551.

Post:

You can get User data from only ScratchDB

Scratch:

Scratch API doesnt support posts :/ (feels weird while writing this line lol) BTW Scratch does have Post API that only returns BBcode of post. ScraGet will soon have feature to request it(somebody, make a PR lol)

ScratchDB:

from ScraGet import ScraGet #import package
post = ScraGet.get_post() #create object
post.updateScratchDB(5162254) #update data
print(post.id) #print required info from data**

**Data:

post.id
post.username
post.deleted
post.editor
post.posted
post.last_edited
post.contentHTML
post.contentBB
post.topic_id
post.title
post.category
post.closed
post.deleted
post.topic_posts

⚠️WARNING⚠️

post.topic_posts that returns the post count of the topic, MAY OR MAY NOT BE SET.
This is because get_posts makes 2 requests. 1 for post and other for the topic.
So, if topic request fails, this is the only data you will not get. 
This is the ONLY BIT OF DATA that is not provided in the post API and hence is requested from topic API.

Topic:

You can get User data from ONLY ScratchDB

Scratch:

I think i clearly explained it above...

ScratchDB:

from ScraGet import ScraGet #import package
topic = ScraGet.get_topic() #create object
topic.updateScratchDB(507551) #update data
print(topic.id) #print required info from data**

**Data:

topic.id
topic.title
topic.category
topic.closed
topic.deleted
topic.post_count

Note: as you may have read the 1st paragraph of this page, You know that a topic is a post. But in topic API, the post data is NOT returned The topic information is only returned.