Metadata-Version: 2.1
Name: sws_wrapper
Version: 0.0.2
Summary: An API wrapper for So We Sign
License:             DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                            Version 2, December 2004
        
         Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
        
         Everyone is permitted to copy and distribute verbatim or modified
         copies of this license document, and changing it is allowed as long
         as the name is changed.
        
                    DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
           TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
        
          0. You just DO WHAT THE FUCK YOU WANT TO.
License-File: LICENSE.txt
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: user-agent
Description-Content-Type: text/markdown

# SWS

An API wrapper for the signing application SoWeSign.

It is not for malicious intent.

### The project is still in progress but most of it is functional.

This project is composed of 3 'modules', the basic api, and two classes for easier use.
In most cases you'll just use the `User` class in the `User` module.

## TLDR; Examples

#### Printing the 10 next courses of the given user.
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

for course in user.get_future_courses(number_of_courses=10):
    print(course.name, course.start.date())
```

#### Checking if `00000` is the correct code for the 1st course of the day (if it is unsigned).
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

course = user.get_todays_courses()[0]
code = '00000'

print(user.check_code(course, code))
```

#### Checking if the 1st course of the day is signed by the user.
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

course = user.get_todays_courses()[0]

print(user.is_course_signed(course))
```

#### Getting the url of a signed course
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

course = user.get_todays_courses()[0]

print(user.get_signature_of_course(course))
```
