dscjobs.py

On 11.01.2022, the first programmatic Implementation of the API was released:

DscJobs.py by ZeroTwo36 is an async Python Implementation of the API.

Using DscJobs.py

Installation

By this point, the Library is not available on PyPI, but can be installed using any of these methods:

Via PiP

This is propably the easiest way you can do it:

  • If you’re on MacOS or Linux, paste this command:
    pip3 install git+https://github.com/ZeroTwo36/dscjobs.py.git
  • Or, for Windows
    pip install git+https://github.com/ZeroTwo36/dscjobs.py.git

Via GIT

Git is a little more complicated but still no Problem:

  • Linux/MacOS:
git clone https://github.com/ZeroTwo36/dscjobs.py.git
cd dscjobs.py
python3 setup.py install
  • Windows:
git clone https://github.com/ZeroTwo36/dscjobs.py.git
cd dscjobs.py
py setup.py install

Via WGet

If both of the above Methods fail, feel free to use the more complicated but failsafe method: On Linux/MacOS:

wget https://dl.zerotwo36.repl.co/pack/dscjobs.py.txz
cd dscjobs.py
python3 setup.py install

On Windows:

powershell
wget https://dl.zerotwo36.repl.co/pack/dscjobs.py.txz
::Use a Zip Tool (Like 7zip) to unpack the archive
cd dscjobs.py
py setup.py install

Getting started

Okay, you installed dscjobs! Now it’s time to get to coding:
from dscjobs.v2 import fetchUser, fetchReviews, fetchReview

v2 Functions

function fetchUser Retrieves a User’s Stats from DscJobs API
:param userID: A User ID. User must be registered on DscJobs
:returns v2.User: A User with specified Stats

function fetchReviews Retrieves a List of all Reviews the User has
:param userID: A User ID. User must be registered on DscJobs
:returns list[v2.Review]: Iterable of v2.Review’s

function fetchReview Retrieves a Review filtered by ID
:param rev_id: The Review ID
:returns v2.Review: v2.Review Instance, with the Review’s Stats

v2 ABCs

cls User
A User Object, generated by ~.fetchUser()
:param id: Used to Set the id of the user.
:param banned: Used to Determine if the user is banned or not.
:param staff: Used to Indicate whether the user is a moderator or not.
:param premium: Used to Determine if the user is premium or not.
:param lifetime: Used to Determine whether the user is a lifetime member or not.
:param created_at: Used to Set the date when the user was created.

cls Review
A Review Object, generated by ~.fetchReview()
:param user: A ~.User Object.
:param content: The review’s Content.
:param likes: Review Like Count
:param dislikes: Review Dislike Count
:param reports: Review Reports.
:param replies: Review repolies.
:param date: A datetime object, telling when the Review was made
:param rate: Review Rate
:param pending: Is the review accepted yet?
:param flagged: Is the review flagged?
:param allowed: Is the review allowed?

v1 support dropped - now use .v2, please!

Since v1 is deprecated, you are recommended to use ~.v2.
However, since I’m sure some People can use the old code somehow,
It now rests in dscjobs.v1. R.I.P., v1