Metadata-Version: 2.4
Name: swagsocial-py
Version: 1.1.3
Summary: Swagsocial.py is a library to interact with the swagsocial API.
Project-URL: Homepage, https://git.nomaakip.xyz/swagorg/swagsocial.py
Project-URL: Issues, https://git.nomaakip.xyz/swagorg/swagsocial.py/issues
Author: maxie
Author-email: Squirrel <squirrelhomebrew@gmail.com>, Wish <wishyt@proton.me>
License-Expression: GPL-3.0-only
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Swagsocial.py

Now on PyPI: https://pypi.org/project/swagsocial-py/

Python module to interact with swagsocial.

Created by Wish <wishyt@proton.me>, Squirrel <squirrelhomebrew@gmail.com>, and maxie!

# Getting your API key

Log into your desired swagsocial account and go to Settings --> API, or [click this link](https://swag.nomaakip.xyz/settings/api)

If you would like to grant manage post permissions, which includes making posts and replies. It also allows deleting posts and replies, so be careful!

# v1

SwagClient(api_key): apikey is the account's API key. You must assign this to a variable

SwagClient.users: You may get total amount of users.

SwagClient.posts: You may get total amount of posts.

SwagClient.me: You may get information about your API key user.

SwagClient.create_post(content, media): You may create a post. With media, you may attach pictures or videos. Media takes a string in the form of a file name. Content takes a string. Requires "Manage posts" permission

SwagClient.reply(post_id, content, media): You may reply to a post. post_id accepts an integer. Works the same as create_post but with reply support.

SwagClient.delete_post(post_id): You may delete a post you have created. post_id takes an integer. Requires "Manage posts" permission

SwagClient.get_post(post_id): You may get post details as Post class. post_id takes an integer.

SwagClient.get_post_stream(post_id): You may get a post's replies as Post classes, in real time, as a stream (SSE[^1]). post_id takes an integer.

SwagClient.get_tagged_posts(): You may get a list of posts as PostsList class.

SwagClient.get_tagged_posts_stream(): You may get posts your API key user is mentioned in, in real time, as a stream (SSE[^1]).

SwagClient.get_user(username): You may get a user's information as User class. username takes a string.

SwagClient.get_user_posts(username): You may get user's posts as PostsList class. username takes a string.

SwagClient.now_playing(username): You may get a user's lastfm now playing details as NowPlayingLastFM class. username takes a string.

[^1]: SSE stands for Server Side Events, allows to send data to the client in real time
