diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..d219d21 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,22 @@ +version: 2 +jobs: + build: + working_directory: ~/Clever/clever-python + docker: + - image: circleci/python:2.7.15 + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + steps: + - run: + command: cd $HOME && git clone --depth 1 -v https://github.com/Clever/ci-scripts.git && cd ci-scripts && git show --oneline -s + name: Clone ci-scripts + - checkout + - setup_remote_docker + - run: + command: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS + name: Set up CircleCI artifacts directories + - run: sudo pip install -r test-requirements.txt + - run: sudo pip install -r requirements.txt + - run: make test + - run: $HOME/ci-scripts/circleci/report-card $RC_DOCKER_USER $RC_DOCKER_PASS "$RC_DOCKER_EMAIL" $RC_GITHUB_TOKEN diff --git a/.github/workflows/notify-ci-status.yml b/.github/workflows/notify-ci-status.yml new file mode 100644 index 0000000..416559e --- /dev/null +++ b/.github/workflows/notify-ci-status.yml @@ -0,0 +1,15 @@ +name: Notify CI status + +on: status + +jobs: + call-workflow: + if: >- + github.event.branches[0].name == 'master' && + (github.event.state == 'error' || github.event.state == 'failure') + uses: Clever/ci-scripts/.github/workflows/reusable-notify-ci-status.yml@master + secrets: + CIRCLE_CI_INTEGRATIONS_URL: ${{ secrets.CIRCLE_CI_INTEGRATIONS_URL }} + CIRCLE_CI_INTEGRATIONS_USERNAME: ${{ secrets.CIRCLE_CI_INTEGRATIONS_USERNAME }} + CIRCLE_CI_INTEGRATIONS_PASSWORD: ${{ secrets.CIRCLE_CI_INTEGRATIONS_PASSWORD }} + SLACK_BOT_TOKEN: ${{ secrets.DAPPLE_BOT_TOKEN }} diff --git a/.gitignore b/.gitignore index 7ab5e68..8225c42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,68 @@ -*~ -*.pyc -clever.egg-info -dist -build +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints + +.travis.yml +git_push.sh +.swagger-codegen/ diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..f76b65e --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,24 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md +.gitignore diff --git a/CHANGELOG.md b/CHANGELOG.md index 14381cc..a197739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## 3.0.2 (2018-07-16) +* Removes implicit relative imports which are not supported in Python 3 + +## 3.0.1 (2018-05-15) +* Change students home_language 'Telegu' to 'Telugu' + +## 3.0.0 (2018-01-02) + * Use API v2.0, generated by swagger-codegen. This is a major, breaking change for the library. + +## 2.4.0 (2017-09-18) + * Use API v1.2 + +## 2.3.2 (2017-08-22) + * Support unicode characters in API response + ## 2.3.1 (2017-02-06) * Changed support email address diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index c0a1f66..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include *.txt clever/VERSION clever/data/clever.com_ca_bundle.crt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..24cb415 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +.PHONY: all test override deps publish +SHELL := /bin/bash + +all: deps test + +deps: + pip install -r requirements.txt + +test: + python -m unittest discover test + +override: + ./override/override.sh + +publish: + ./publish.sh diff --git a/README.md b/README.md index d74c4f0..b2f1711 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,17 @@ -# Clever Python bindings +# Notice -## Maintenance +This repo is no longer maintained by Clever. We provide the Swagger definitions at https://github.com/Clever/swagger-api. -Clever is moving to a community supported model with our client libraries. We will still respond to and merge incoming PRs but are looking to turn over ownership of these libraries to the community. If you are interested, please contact our partner-engineering team at tech-support@clever.com. +# Clever - the Python library for the Clever API -## Installation +## API Documentation +View more detailed documentation [here](docs/README.md) + +## Requirements. + +Python 2.7 and 3.4+ +## Installation From PyPi: ```bash @@ -24,97 +30,70 @@ Or from source: $ python setup.py install ``` -## Usage - -Get started by importing the `clever` module and setting your authentication method: - +Then import the package: ```python - import clever - clever.set_token('YOUR_OAUTH_TOKEN') +import clever ``` -The `clever` module exposes classes corresponding to resources: - -* Contact -* District -* DistrictAdmin -* School -* SchoolAdmin -* Section -* Student -* Teacher -* Event +## Getting Started -Each exposes a class method `all` that returns a list of all data in that resource that you have access to. Keyword arguments correspond to the same query parameters supported in the HTTP API, except that `limit` and `page` are not supported (pagination is handled automatically). +Please follow the [installation procedure](#installation) and then run the following: ```python - schools = clever.School.all() # gets information about all schools you have access to - schools = clever.School.all(where=json.dumps({'name': 'Of Hard Knocks'})) - schools = clever.School.all(sort='state') -``` +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint -If you'd like more control over pagination, or to limit the number of resources returned, use the `iter` class method: +# Note: This is hard coded for demo purposes only. Keep your access tokens secret! +# https://dev.clever.com/docs/security#section-security-best-practices -```python - students = clever.Student.iter() - for i in range(0,2000): - print students.next() -``` - -You may also use the `starting_after` or `ending_before` parameters with the `iter` method: +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' -```python - students = clever.Student.iter(starting_after="530e5960049e75a9262cff1d") - for s in students: - print students.next() -``` +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) -The `retrieve` class method takes in a Clever ID and returns a specific resource. The object (or list of objects in the case of `all`) supports accessing properties using either dot notation or dictionary notation: +try: + api_response = api_instance.get_students() + for student in api_response.data: + pprint(student.data.id) +except ApiException as e: + print("Exception when calling DataApi->get_students: %s\n" % e) -```python - demo_school = clever.School.retrieve("4fee004cca2e43cf27000001") - assert demo_school.name == 'Clever Academy' - assert demo_school['name'] == 'Clever Academy' ``` -## CLI +## Updating the Library -The library comes with a basic command-line interface: +1. Git clone swagger-codegen (https://github.com/swagger-api/swagger-codegen) -```bash - $ export CLEVER_API_TOKEN=DEMO_TOKEN - $ clever districts all - Running the equivalent of: - -- - curl https://api.clever.com/v1.1/districts -H "Authorization: Bearer DEMO_TOKEN" - -- - Starting new HTTPS connection (1): api.clever.com - API request to https://api.clever.com/v1.1/districts returned (response code, response body) of (200, '{"data":[{"data":{"name":"Demo District","id":"4fd43cc56d11340000000005"},"uri":"/v1.1/districts/4fd43cc56d11340000000005"}],"links":[{"rel":"self","uri":"/v1.1/districts"}]}') - Result (HTTP status code 200): - -- - {"data":[{"data":{"name":"Demo District","id":"4fd43cc56d11340000000005"},"uri":"/v1.1/districts/4fd43cc56d11340000000005"}],"links":[{"rel":"self","uri":"/v1.1/districts"}]} - -- +2. Git clone Clever's swagger-api repo (https://github.com/Clever/swagger-api) + +3. Run this command in the swagger-codegen repo +``` +java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i $PATH_TO_SWAGGER_API_REPO/v2.1-client.yml -l python -o $PATH_TO_THIS_REPO --additional-properties packageVersion=$VERSION ``` -Run `clever -h` to see a full list of commands. +4. Run `make override` to copy over the override files -## Feedback +5. Update the CHANGELOG.md with the changes! -Questions, feature requests, or feedback of any kind is always welcome! We're available at [tech-support@clever.com](mailto:tech-support@clever.com). ## Development ### Dependencies - pip install -r requirements.txt + make deps ### Testing - python -m unittest discover test + make test ## Publishing -Update VERSION and CHANGELOG.md and run `publish.sh` to publish a new version of the library. +Run `make publish` to publish a new version of the library. In order to publish to PyPI you will need a `.pypirc` file in your `$HOME` directory with the following contents: ``` diff --git a/bin/clever b/bin/clever deleted file mode 100755 index 6555688..0000000 --- a/bin/clever +++ /dev/null @@ -1,236 +0,0 @@ -#!/usr/bin/env python -import logging -import optparse -import os -import re -import subprocess -import sys - -sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) -import clever - -logger = logging.getLogger('') -logger.addHandler(logging.StreamHandler(sys.stderr)) -logger.setLevel(logging.INFO) - -class APIResourceClient(object): - def __init__(self, id=None): - self.id = id - - def to_dict(self, params): - dict = {} - for k, v in params: - dict[k] = v - return dict - - def logged_curl(http://github.com/self,%20method,%20url,%20params): - dict_params = self.to_dict(params) - self.log_request(method, url, params, dict_params) - res, auth = clever.APIRequestor().request_raw(method, url, dict_params) - self.log_result(res['body'], res['code']) - return res['body'], res['code'] - - def log_request(self, method, url, ordered_params, dict_params): - if method.lower() == 'get': - requestor = clever.APIRequestor() - if dict_params: - url = '%s?%s' % (url, clever.APIRequestor().encode(dict_params)) - ordered_params = [] - elif not ordered_params: - ordered_params = ' -X %s' % (method.upper(), ) - - logger.info('Running the equivalent of:') - logger.info('--') - if len(ordered_params): - term = ' \\' - else: - term = '' - api_token = clever.get_token() - curl = ['curl %s%s -H "Authorization: Bearer %s"%s' % - (clever.api_base, url, api_token, term)] - if isinstance(ordered_params, list): - for i, (k, v) in enumerate(ordered_params): - if i == len(ordered_params) - 1: - term = '' - else: - term = ' \\' - curl.append(' -d %s=%s%s' % (k, v, term)) - else: - curl.append(ordered_params) - logger.info('\n'.join(curl)) - logger.info('--') - - def log_result(self, rbody, rcode): - logger.info('Result (HTTP status code %d):' % (rcode, )) - logger.info('--') - logger.info(rbody.rstrip()) - logger.info('--') - - def class_url(http://github.com/self): - return self.client_for.class_url() - - def instance_url(http://github.com/self): - if not self.id: - raise ValueError('ID required. (HINT: provide the script a -i ID)') - return self.client_for(self.id).instance_url() - - def retrieve(self, params): - url = self.instance_url() - self.logged_curl('http://github.com/get',%20url,%20[]) - -class ListableAPIResourceClient(APIResourceClient): - def all(self, params): - url = self.class_url() - self.logged_curl('http://github.com/get',%20url,%20params) - -class CreateableAPIResourceClient(APIResourceClient): - def create(self, params): - url = self.class_url() - self.logged_curl('http://github.com/post',%20url,%20params) - -class UpdateableAPIResourceClient(APIResourceClient): - def update(self, params): - url = self.instance_url() - self.logged_curl('http://github.com/patch',%20url,%20params) - -class DeletableAPIResourceClient(APIResourceClient): - def delete(self, params): - url = self.instance_url() - self.logged_curl('http://github.com/delete',%20url,%20params) - -# API objects -class DistrictClient(ListableAPIResourceClient): - client_for = clever.District - -class DistrictAdminClient(ListableAPIResourceClient): - client_for = clever.DistrictAdmin - -class SchoolClient(ListableAPIResourceClient): - client_for = clever.School - -class SchoolAdminClient(ListableAPIResourceClient): - client_for = clever.SchoolAdmin - -class SectionClient(ListableAPIResourceClient): - client_for = clever.Section - -class StudentClient(ListableAPIResourceClient): - client_for = clever.Student - -class TeacherClient(ListableAPIResourceClient): - client_for = clever.Teacher - -class EventClient(ListableAPIResourceClient): - client_for = clever.Event - -class ContactClient(ListableAPIResourceClient): - client_for = clever.Contact - -def main(): - klasses = { - 'district' : DistrictClient, - 'district_admin' : DistrictAdminClient, - 'school' : SchoolClient, - 'school_admin': SchoolAdminClient, - 'section' : SectionClient, - 'student' : StudentClient, - 'teacher' : TeacherClient, - 'event' : EventClient, - 'contact': ContactClient, - } - klasses_plural = { '{0}s'.format(key) : value for key, value in klasses.iteritems() } - klasses = dict(klasses.items() + klasses_plural.items()) - parser = optparse.OptionParser("""%prog [options] class method [key=value|key ...] - -Valid methods: - -district - all - retrieve - -district_admin - all - retrieve - -school - all - retrieve - -school_admin - all - retrieve - -section - all - retrieve - -student - all - retrieve - -teacher - all - retrieve - -event - all - retrieve - -contact - all - retrieve""") - parser.add_option('-v', '--verbosity', help='Verbosity of debugging output.', - dest='verbosity', action='http://github.com/count', default=0) - parser.add_option('-t', '--api-token', help="API token. Defaults to value of environment variable CLEVER_API_TOKEN", dest='api_token') - parser.add_option('-b', '--api-base', help='API base URL', dest='api_base') - parser.add_option('-i', '--id', help="Object ID", dest='id') - opts, args = parser.parse_args() - if opts.verbosity == 1: - logger.setLevel(logging.INFO) - elif opts.verbosity >= 2: - logger.setLevel(logging.DEBUG) - if len(args) < 2: - parser.print_help() - return 1 - - klass_name = args[0] - method_name = args[1] - api_token = opts.api_token or os.environ.get('CLEVER_API_TOKEN') - if not api_token: - parser.error('No API token provided (use -t option or set the CLEVER_API_TOKEN environment variable') - return 1 - clever.set_token(api_token) - - if opts.api_base: - clever.api_base = opts.api_base - - params = [] - for arg in args[2:]: - try: - key = arg[:arg.index('=')] - value = arg[arg.index('=') + 1:] - except ValueError: - key = arg - value = None - if not value: - value = raw_input('%s= ' % (key, )) - params.append([key, value]) - - try: - klass = klasses[klass_name] - except KeyError: - parser.error('Invalid class %s' % (klass_name, )) - return 1 - else: - dispatch = klass(opts.id) - - try: - method = getattr(dispatch, method_name) - except AttributeError: - parser.error('Invalid method %s of %s' % (method_name, klass_name)) - return 1 - - return method(params) - -if __name__ == '__main__': - sys.exit(main()) diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 441a8fa..0000000 --- a/circle.yml +++ /dev/null @@ -1,11 +0,0 @@ -machine: - post: - - cd $HOME && git clone --depth 1 -v git@github.com:clever/ci-scripts.git && cd ci-scripts && git show --oneline -s - services: - - docker -test: - override: - - pip install -r test/requirements.txt - - python setup.py develop && python setup.py test - post: - - $HOME/ci-scripts/circleci/report-card $RC_DOCKER_USER $RC_DOCKER_PASS "$RC_DOCKER_EMAIL" $RC_GITHUB_TOKEN diff --git a/clever/VERSION b/clever/VERSION index 2bf1c1c..b502146 100644 --- a/clever/VERSION +++ b/clever/VERSION @@ -1 +1 @@ -2.3.1 +3.0.2 diff --git a/clever/__init__.py b/clever/__init__.py index 7ad21ed..e206a95 100644 --- a/clever/__init__.py +++ b/clever/__init__.py @@ -1,802 +1,105 @@ -# Clever Python bindings -# API docs at https://clever.com/developers/docs -# Author: Rafael Garcia -# Borrows heavily from the Python bindings for the Stripe API - -# Imports -from __future__ import print_function -import logging -import os -import platform -import sys -import urllib -import textwrap -import time -import datetime -import types -import base64 -import pkg_resources -import six -# Use cStringIO if ita's available. Otherwise, StringIO is fine. -try: - import cStringIO as StringIO -except ImportError: - from six import StringIO - -# - Requests is the preferred HTTP library -# - Google App Engine has urlfetch -# - Use Pycurl if it's there (at least it verifies SSL certs) -# - Fall back to urllib2 with a warning if needed -_httplib = None - -try: - from google.appengine.api import urlfetch - _httplib = 'urlfetch' -except ImportError: - pass - -if not _httplib: - try: - import requests - _httplib = 'requests' - except ImportError: - pass - - try: - # Require version 0.8.8, but don't want to depend on distutils - version = requests.__version__ - major, minor, patch = [int(i) for i in version.split('.')] - except: - # Probably some new-fangled version, so it should support verify - pass - else: - if major == 0 and (minor < 8 or (minor == 8 and patch < 8)): - print('Warning: the Clever library requires that your Python "requests" library has a version no older than 0.8.8, but your "requests" library has version %s. Clever will fall back to an alternate HTTP library, so everything should work, though we recommend upgrading your "requests" library. (HINT: running "pip install -U requests" should upgrade your requests library to the latest version.)' % ( - version, ), file=sys.stderr) - _httplib = None - -if not _httplib: - try: - import pycurl - _httplib = 'pycurl' - except ImportError: - pass - -if not _httplib: - try: - import urllib2 - _httplib = 'urllib2' - print("Warning: the Clever library is falling back to urllib2 because pycurl isn't installed. urllib2's SSL implementation doesn't verify server certificates. For improved security, we suggest installing pycurl.", file=sys.stderr) - except ImportError: - pass - -if not _httplib: - raise ImportError( - "Clever requires one of pycurl, Google App Engine's urlfetch, or urllib2.") - -from .version import VERSION -from . import importer -json = importer.import_json() - -logger = logging.getLogger('clever') - -# Use certs chain bundle including in the package for SSL verification -CLEVER_CERTS = pkg_resources.resource_filename(__name__, 'data/clever.com_ca_bundle.crt') -API_VERSION = "v1.1" - -# Configuration variables - -global_auth = dict() -api_base = 'https://api.clever.com/' -verify_ssl_certs = True - - -def set_token(token): - global global_auth - global_auth = {'token': token} - - -def get_token(): - global global_auth - return global_auth.get('token', None) - -# Exceptions - - -class CleverError(Exception): - - def __init__(self, message=None, http_body=None, http_status=None, json_body=None): - super(CleverError, self).__init__(message) - self.http_body = http_body - self.http_status = http_status - self.json_body = json_body - - -class APIError(CleverError): - pass - - -class APIConnectionError(CleverError): - pass - - -class InvalidRequestError(CleverError): - - def __init__(self, message, http_body=None, http_status=None, json_body=None): - super(InvalidRequestError, self).__init__(message, http_body, http_status, json_body) - - -class AuthenticationError(CleverError): - pass - -class TooManyRequestsError(CleverError): - def __init__(self, message, res): - super(TooManyRequestsError, self).__init__(message, res['body'], res['code']) - self.http_headers = res['headers'] - - -def convert_to_clever_object(klass, resp, auth): - # TODO: to support includes we'll have to infer klass from resp['uri'] - if isinstance(resp, dict) and resp.get('data', None): - if isinstance(resp['data'], list): - return [convert_to_clever_object(klass, i, auth) for i in resp['data']] - elif isinstance(resp['data'], dict): - return klass.construct_from(resp['data'].copy(), auth) - elif isinstance(resp, six.string_types) or isinstance(resp, list) or isinstance(resp, dict) or isinstance(resp, bool): - return resp - else: - raise Exception('DONT KNOW WHAT TO DO WITH {0}'.format(resp)) - -# makes it easier to update a nested key in a dict - - -def put(d, keys, item): - if "." in keys: - key, rest = keys.split(".", 1) - if key not in d: - d[key] = {} - put(d[key], rest, item) - else: - d[keys] = item - -# Network transport - - -class APIRequestor(object): - - def __init__(self, auth=None): - self._auth = auth - - @classmethod - def api_url(http://github.com/cls,%20path=''): - return '%s%s' % (api_base, path) - - @classmethod - def _utf8(cls, value): - if isinstance(value, unicode): - return value.encode('utf-8') - else: - return value - - @classmethod - def _objects_to_ids(cls, d): - if isinstance(d, APIResource): - return d.id - elif isinstance(d, dict): - res = {} - for k, v in six.iteritems(d): - res[k] = cls._objects_to_ids(v) - return res - else: - return d - - @classmethod - def urlencode(cls, d): - """ - Internal: encode a dict for url representation - If we ever need fancy encoding of embedded objects do it here - """ - return six.moves.urllib.parse.urlencode(d) - - @classmethod - def jsonencode(cls, d): - """ - Internal: encode a dict for a post/patch body - """ - return json.dumps(d) - - def request(self, meth, url, params={}): - res, my_auth = self.request_raw(meth, url, params) - resp = self.interpret_response(res) - return resp, my_auth - - def handle_api_error(self, res, resp): - rbody, rheaders, rcode = res['body'], res['headers'], res['code'] - try: - error = resp['error'] - except (KeyError, TypeError): - raise APIError("Invalid response object from API: %r (HTTP response code was %d)" % - (rbody, rcode), rbody, rcode, resp) - - if rcode in [400]: - raise InvalidRequestError(error, rbody, rcode, resp) - elif rcode == 401: - raise AuthenticationError(error, rbody, rcode, resp) - elif rcode == 429: - raise TooManyRequestsError(error, res) - else: - raise APIError(error, rbody, rcode, resp) - - def request_raw(self, meth, url, params={}): - """ - Mechanism for issuing an API call - """ - my_auth = self._auth or global_auth - if my_auth is None: - raise AuthenticationError( - 'No authentication method provided. (HINT: "clever.api_key = " is deprecated. Set your API token using "clever.set_token()". You can generate API tokens from the Clever web interface. See https://clever.com/developers/docs for details.') - if my_auth.get('token') is None: - raise AuthenticationError('Must provide api token auth. {}'.format(my_auth)) - - abs_url = self.api_http://github.com/url(url) - params = params.copy() - self._objects_to_ids(params) - - ua = { - 'bindings_version': VERSION, - 'lang': 'python', - 'publisher': 'clever' - } - for attr, func in [['lang_version', platform.python_version], - ['platform', platform.platform], - ['uname', lambda: ' '.join(platform.uname())]]: - try: - val = func() - except Exception as e: - val = "!! %s" % e - ua[attr] = val - - headers = { - 'X-Clever-Client-User-Agent': json.dumps(ua), - 'User-Agent': 'Clever/%s PythonBindings/%s' % (API_VERSION, VERSION) - } - if my_auth.get('api_key', None) != None: - headers['Authorization'] = 'Basic {}'.format(base64.b64encode(my_auth['api_key'] + ':')) - elif my_auth.get('token', None) != None: - headers['Authorization'] = 'Bearer {}'.format(my_auth['token']) - make_request = { - 'requests': self.requests_request, - 'pycurl': self.pycurl_request, - 'urlfetch': self.urlfetch_request, - 'urllib2': self.urllib2_request - } - if _httplib in make_request: - res = make_request[_httplib](meth, abs_url, headers, params) - else: - raise CleverError( - "Clever Python library bug discovered: invalid httplib %s. Please report to tech-support@clever.com" % (_httplib, )) - logger.debug('API request to %s returned (response code, response body) of (%d, %r)' % - (abs_url, res['code'], res['body'])) - return res, my_auth - - def interpret_response(self, http_res): - rbody, rcode= http_res['body'], http_res['code'] - try: - resp = json.loads(rbody.decode()) if rcode != 429 else {'error': 'Too Many Requests'} - except Exception: - raise APIError("Invalid response body from API: %s (HTTP response code was %d)" % - (rbody, rcode), rbody, rcode) - if not (200 <= rcode < 300): - self.handle_api_error(http_res, resp) - return resp - - def requests_request(self, meth, abs_url, headers, params): - meth = meth.lower() - if meth == 'get' or meth == 'delete': - if params: - abs_url = '%s?%s' % (abs_url, self.urlencode(params)) - data = None - elif meth in ['post', 'patch']: - data = self.jsonencode(params) - headers['Content-Type'] = 'application/json' - else: - raise APIConnectionError( - 'Unrecognized HTTP method %r. This may indicate a bug in the Clever bindings. Please contact tech-support@clever.com for assistance.' % (meth, )) - - try: - try: - # Use a CA_BUNDLE containing the following chain: - # - TrustedRoot - # - DigiCert High Assurance EV - 1 - # - # This ensures that only this certificate chain is used to verify SSL certs. - # Certs dervived from other ca certs will be treated as invalid. - # eg. https://api.twitter.com and https://api.stripe.com FAIL - # https://api.clever.com and https://api.github.com PASS - result = requests.request(meth, abs_url, - headers=headers, data=data, timeout=80, - verify=CLEVER_CERTS) - except TypeError as e: - raise TypeError( - 'Warning: It looks like your installed version of the "requests" library is not compatible with Clever\'s usage thereof. (HINT: The most likely cause is that your "requests" library is out of date. You can fix that by running "pip install -U requests".) The underlying error was: %s' % (e, )) - - # This causes the content to actually be read, which could cause - # e.g. a socket timeout. TODO: The other fetch methods probably - # are succeptible to the same and should be updated. - content = result.content - status_code = result.status_code - headers = result.headers - except Exception as e: - # Would catch just requests.exceptions.RequestException, but can - # also raise ValueError, RuntimeError, etc. - self.handle_requests_error(e) - return {'body': content, 'headers': headers, 'code': status_code} - - def handle_requests_error(self, e): - if isinstance(e, requests.exceptions.RequestException): - msg = "Unexpected error communicating with Clever. If this problem persists, let us know at tech-support@clever.com." - err = "%s: %s" % (type(e).__name__, e.message) - else: - msg = "Unexpected error communicating with Clever. It looks like there's probably a configuration issue locally. If this problem persists, let us know at tech-support@clever.com." - err = "A %s was raised" % (type(e).__name__, ) - if e.message: - err += " with error message %s" % (e.message, ) - else: - err += " with no error message" - msg = textwrap.fill(msg) + "\n\n(Network error: " + err + ")" - raise APIConnectionError(msg) - - def pycurl_request(self, meth, abs_url, headers, params): - s = StringIO() - rheader = StringIO() - curl = pycurl.Curl() - - meth = meth.lower() - if meth == 'get': - curl.setopt(pycurl.HTTPGET, 1) - # TODO: maybe be a bit less manual here - if params: - abs_url = '%s?%s' % (abs_url, self.urlencode(params)) - elif meth in ['post', 'patch']: - curl.setopt(pycurl.POST, 1) - curl.setopt(pycurl.POSTFIELDS, self.jsonencode(params)) - headers['Content-Type'] = 'application/json' - elif meth == 'delete': - curl.setopt(pycurl.CUSTOMREQUEST, 'DELETE') - if params: - raise APIConnectionError("Did not expect params in DELETE request") - else: - raise APIConnectionError( - 'Unrecognized HTTP method %r. This may indicate a bug in the Clever bindings. Please contact tech-support@clever.com for assistance.' % (meth, )) - - # pycurl doesn't like unicode URLs - abs_url = self._utf8(abs_url) - curl.setopt(pycurl.URL, abs_url) - curl.setopt(pycurl.WRITEFUNCTION, s.write) - curl.setopt(pycurl.NOSIGNAL, 1) - curl.setopt(pycurl.CONNECTTIMEOUT, 30) - curl.setopt(pycurl.TIMEOUT, 80) - curl.setopt(pycurl.HTTPHEADER, ['%s: %s' % (k, v) for k, v in six.iteritems(headers)]) - curl.setopt(pycurl.HEADERFUNCTION, rheader.write) - if verify_ssl_certs: - curl.setopt(pycurl.CAINFO, CLEVER_CERTS) - else: - curl.setopt(pycurl.SSL_VERIFYHOST, False) - - try: - curl.perform() - except pycurl.error as e: - self.handle_pycurl_error(e) - return {'body': s.getvalue(), 'headers': rheader.getvalue(), 'code': curl.getinfo(pycurl.RESPONSE_CODE)} - - def handle_pycurl_error(self, e): - if e[0] in [pycurl.E_COULDNT_CONNECT, - pycurl.E_COULDNT_RESOLVE_HOST, - pycurl.E_OPERATION_TIMEOUTED]: - msg = "Could not connect to Clever (%s). Please check your internet connection and try again. If this problem persists, you should check Clever's service status at http://status.clever.com." % ( - api_base, ) - elif e[0] == pycurl.E_SSL_CACERT or e[0] == pycurl.E_SSL_PEER_CERTIFICATE: - msg = "Could not verify Clever's SSL certificate. Please make sure that your network is not intercepting certificates. (Try going to %s in your browser)." % ( - api_base, ) - else: - msg = "Unexpected error communicating with Clever. If this problem persists, let us know at tech-support@clever.com." - msg = textwrap.fill(msg) + "\n\n(Network error: " + e[1] + ")" - raise APIConnectionError(msg) - - def urlfetch_request(self, meth, abs_url, headers, params): - args = {} - if meth == 'get': - abs_url = '%s?%s' % (abs_url, self.urlencode(params)) - elif meth in ['post', 'patch']: - args['payload'] = self.jsonencode(params) - headers['Content-Type'] = 'application/json' - elif meth == 'delete': - if params: - raise APIConnectionError("Did not expect params in DELETE request") - else: - raise APIConnectionError( - 'Unrecognized HTTP method %r. This may indicate a bug in the Clever bindings. Please contact tech-support@clever.com for assistance.' % (meth, )) - args['url'] = abs_url - args['method'] = meth - args['headers'] = headers - # Google App Engine doesn't let us specify our own cert bundle. - # However, that's ok because the CA bundle they use recognizes - # api.clever.com. - args['validate_certificate'] = verify_ssl_certs - # GAE requests time out after 60 seconds, so make sure we leave - # some time for the application to handle a slow Clever - args['deadline'] = 55 - - try: - result = urlfetch.fetch(**args) - except urlfetch.Error as e: - self.handle_urlfetch_error(e, abs_url) - return {'body': result.content, 'headers': result.headers, 'code': result.status_code} - - def handle_urlfetch_error(self, e, abs_url): - if isinstance(e, urlfetch.InvalidURLError): - msg = "The Clever library attempted to fetch an invalid URL (%r). This is likely due to a bug in the Clever Python bindings. Please let us know at tech-support@clever.com." % ( - abs_url, ) - elif isinstance(e, urlfetch.DownloadError): - msg = "There were a problem retrieving data from Clever." - elif isinstance(e, urlfetch.ResponseTooLargeError): - msg = "There was a problem receiving all of your data from Clever. This is likely due to a bug in Clever. Please let us know at tech-support@clever.com." - else: - msg = "Unexpected error communicating with Clever. If this problem persists, let us know at tech-support@clever.com." - msg = textwrap.fill(msg) + "\n\n(Network error: " + str(e) + ")" - raise APIConnectionError(msg) - - def urllib2_request(self, meth, abs_url, headers, params): - args = {} - if meth == 'get': - abs_url = '%s?%s' % (abs_url, self.urlencode(params)) - req = urllib2.Request(abs_url, None, headers) - elif meth in ['post', 'patch']: - body = self.jsonencode(params) - headers['Content-Type'] = 'application/json' - req = urllib2.Request(abs_url, body, headers) - if meth == 'patch': - req.get_method = lambda: 'PATCH' - elif meth == 'delete': - req = urllib2.Request(abs_url, None, headers) - req.get_method = lambda: 'DELETE' - if params: - raise APIConnectionError("Did not expect params in DELETE request") - else: - raise APIConnectionError( - 'Unrecognized HTTP method %r. This may indicate a bug in the Clever bindings. Please contact tech-support@clever.com for assistance.' % (meth, )) - - try: - response = urllib2.urlopen(req) - rbody = response.read() - rheader = response.info() - rcode = response.code - except urllib2.HTTPError as e: - rcode = e.code - rheader = None - rbody = e.read() - except (urllib2.URLError, ValueError) as e: - self.handle_urllib2_error(e, abs_url) - return {'body': rbody, 'headers': rheader, 'code': rcode} - - def handle_urllib2_error(self, e, abs_url): - msg = "Unexpected error communicating with Clever. If this problem persists, let us know at tech-support@clever.com." - msg = textwrap.fill(msg) + "\n\n(Network error: " + str(e) + ")" - raise APIConnectionError(msg) - - -class CleverObject(object): - _permanent_attributes = set(['_auth']) - - # Adding these to enable pickling - # http://docs.python.org/2/library/pickle.html#pickling-and-unpickling-normal-class-instances - def __getstate__(self): - return self.__dict__ - - def __setstate__(self, d): - self.__dict__.update(d) - - def __init__(self, id=None, auth=None): - self.__dict__['_values'] = set() - self.__dict__['_unsaved_values'] = set() - self.__dict__['_transient_values'] = set() - self.__dict__['_auth'] = auth - - if id: - self.id = id - - def __setattr__(self, k, v): - # if in dot notation, insert into _unsaved_values the key in dot notation. this will cause it to be properly PATCHed. - # remove these values when resetting state in refresh_from() - # also make correct update to _values and __dict__ dicts so that state is correct - # the end effect is that we can PATCH things in dot notation for selective - # updating of a system object - if '.' in k: - put(self.__dict__, k, v) - self._values.add(k.split('.', 1)[0]) - self._unsaved_values.add(k) - else: - self.__dict__[k] = v - self._values.add(k) - if k not in self._permanent_attributes: - self._unsaved_values.add(k) - - def __getattr__(self, k, obj=None): - if obj == None: - obj = self.__dict__ - if '.' in k: - key, rest = k.split('.', 1) - return self.__getattr__(rest, obj[key]) - else: - try: - return obj[k] - except KeyError: - pass - if k in self._transient_values: - raise AttributeError("%r object has no attribute %r. HINT: The %r attribute was set in the past, however. It was then wiped when refreshing the object with the result returned by Clever's API, probably as a result of a save(). The attributes currently available on this object are: %s" % - (type(self).__name__, k, k, ', '.join(self._values))) - else: - raise AttributeError("%r object has no attribute %r" % (type(self).__name__, k)) - - def __getitem__(self, k): - if k in self._values: - return self.__dict__[k] - elif k in self._transient_values: - raise KeyError("%r. HINT: The %r attribute was set in the past, however. It was then wiped when refreshing the object with the result returned by Clever's API, probably as a result of a save(). The attributes currently available on this object are: %s" % ( - k, k, ', '.join(self._values))) - else: - raise KeyError(k) - - def get(self, k, default=None): - try: - return self[k] - except KeyError: - return default - - def setdefault(self, k, default=None): - try: - return self[k] - except KeyError: - self[k] = default - return default - - def __setitem__(self, k, v): - setattr(self, k, v) - - def keys(self): - return self._values - - def values(self): - return self._values - - @classmethod - def construct_from(cls, values, auth): - instance = cls(values.get('id'), auth) - instance.refresh_from(values, auth) - return instance - - def refresh_from(self, values, auth, partial=False): - self._auth = auth - - # Wipe old state before setting new. This is useful for e.g. updating a - # customer, where there is no persistent card parameter. Mark those values - # which don't persist as transient - if partial: - removed = set() - else: - removed = self._values - set(values) - - for k in list(self._unsaved_values): - if '.' in k: - self._unsaved_values.discard(k) - - for k in removed: - if k in self._permanent_attributes: - continue - del self.__dict__[k] - self._values.discard(k) - self._transient_values.add(k) - self._unsaved_values.discard(k) - - for k, v in six.iteritems(values): - if k in self._permanent_attributes: - continue - self.__dict__[k] = convert_to_clever_object(self, v, auth) - self._values.add(k) - self._transient_values.discard(k) - self._unsaved_values.discard(k) - - def __repr__(self): - id_string = '' - if isinstance(self.get('id'), six.string_types): - id_string = ' id=%s' % self.get('id').encode('utf8') - - return '<%s%s at %s> JSON: %s' % (type(self).__name__, id_string, hex(id(self)), json.dumps(self.to_dict(), sort_keys=True, indent=2, cls=CleverObjectEncoder)) - - def __str__(self): - return json.dumps(self.to_dict(), sort_keys=True, indent=2, cls=CleverObjectEncoder) - - def to_dict(self): - def _serialize(o): - if isinstance(o, CleverObject): - return o.to_dict() - if isinstance(o, list): - return [_serialize(i) for i in o] - return o - - d = dict() - for k in sorted(self._values): - if k in self._permanent_attributes: - continue - v = getattr(self, k) - v = _serialize(v) - d[k] = v - return d - - -class CleverObjectEncoder(json.JSONEncoder): - - def default(self, obj): - if isinstance(obj, CleverObject): - return obj.to_dict() - else: - return json.JSONEncoder.default(self, obj) - - -class APIResource(CleverObject): - - def _ident(self): - return [self.get('id')] - - @classmethod - def retrieve(cls, id, auth=None): - instance = cls(id, auth) - instance.refresh() - return instance - - def refresh(self): - requestor = APIRequestor(self._auth) - url = self.instance_url() - response, auth = requestor.request('get', url) - self.refresh_from(response['data'], auth) - return self - - @classmethod - def class_name(cls): - if cls == APIResource: - raise NotImplementedError( - 'APIResource is an abstract class. You should perform actions on its subclasses (Charge, Customer, etc.)') - return "%s" % six.moves.urllib.parse.quote_plus(cls.__name__.lower()) - - @classmethod - def class_url(http://github.com/cls): - cls_name = cls.class_name() - return "/%s/%ss" % (API_VERSION, cls_name) - - def instance_url(http://github.com/self): - id = self.get('id') - if not id: - raise InvalidRequestError( - 'Could not determine which URL to request: %s instance has invalid ID: %r' % (type(self).__name__, id), 'id') - id = APIRequestor._utf8(id) - base = self.class_url() - extn = six.moves.urllib.parse.quote_plus(id) - return "%s/%s" % (base, extn) - -# Classes of API operations - - -def get_link(response, rel): - links = response.get('links', None) - for link in links: - if link.get('rel', None) == rel: - return link.get('uri') - return None - -class ListableAPIResource(APIResource): - ITER_LIMIT = 1000 - - @classmethod - def all(cls, auth=None, **params): - return list(cls.iter(auth, **params)) - - @classmethod - def iter(cls, auth=None, **params): - for unsupported_param in ['limit', 'page']: - if unsupported_param in params: - raise CleverError("ListableAPIResource does not support '%s' parameter" % - (unsupported_param,)) - - requestor = APIRequestor(auth) - url = cls.class_url() - params['limit'] = cls.ITER_LIMIT - - while url: - response, auth = requestor.request('get', url, params) - # Generate nothing when there is no data. - if len(response['data']) == 0: - break - for datum in convert_to_clever_object(cls, response, auth): - yield datum - - url = get_link(response, 'prev' if 'ending_before' in params else 'next') - # params already included in url from get_link - params = {} - - -class CreatableAPIResource(APIResource): - - @classmethod - def create(cls, auth=None, **params): - requestor = APIRequestor(auth) - url = cls.class_url() - response, auth = requestor.request('post', url, params) - return convert_to_clever_object(cls, response, auth) - - -class UpdateableAPIResource(APIResource): - - def save(self): - if self._unsaved_values: - requestor = APIRequestor(self._auth) - params = {} - for k in self._unsaved_values: - params[k] = getattr(self, k) - url = self.instance_url() - response, auth = requestor.request('patch', url, params) - self.refresh_from(response['data'], auth) - else: - logger.debug("Trying to save already saved object %r" % (self, )) - return self - - -class DeletableAPIResource(APIResource): - - def delete(self, **params): - requestor = APIRequestor(self._auth) - url = self.instance_url() - response, auth = requestor.request('delete', url, params) - self.refresh_from(response['data'], auth) - return self - -# API objects - - -class Contact(ListableAPIResource): - pass - - -class District(ListableAPIResource): - pass - - -class DistrictAdmin(ListableAPIResource): - @classmethod - def class_url(http://github.com/cls): - return "/%s/district_admins" % API_VERSION - - -class School(ListableAPIResource): - pass - - -class SchoolAdmin(ListableAPIResource): - @classmethod - def class_url(http://github.com/cls): - return "/%s/school_admins" % API_VERSION - - -class Section(ListableAPIResource): - pass - - -class Student(ListableAPIResource): - pass - - -class Teacher(ListableAPIResource): - pass - - -class Event(ListableAPIResource): - pass +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into sdk package +from .models.bad_request import BadRequest +from .models.contact import Contact +from .models.contact_object import ContactObject +from .models.contact_response import ContactResponse +from .models.contacts_response import ContactsResponse +from .models.course import Course +from .models.course_object import CourseObject +from .models.course_response import CourseResponse +from .models.courses_response import CoursesResponse +from .models.credentials import Credentials +from .models.district import District +from .models.district_admin import DistrictAdmin +from .models.district_admin_object import DistrictAdminObject +from .models.district_admin_response import DistrictAdminResponse +from .models.district_admins_response import DistrictAdminsResponse +from .models.district_object import DistrictObject +from .models.district_response import DistrictResponse +from .models.districts_response import DistrictsResponse +from .models.event import Event +from .models.event_response import EventResponse +from .models.events_response import EventsResponse +from .models.internal_error import InternalError +from .models.location import Location +from .models.name import Name +from .models.not_found import NotFound +from .models.principal import Principal +from .models.school import School +from .models.school_admin import SchoolAdmin +from .models.school_admin_object import SchoolAdminObject +from .models.school_admin_response import SchoolAdminResponse +from .models.school_admins_response import SchoolAdminsResponse +from .models.school_object import SchoolObject +from .models.school_response import SchoolResponse +from .models.schools_response import SchoolsResponse +from .models.section import Section +from .models.section_object import SectionObject +from .models.section_response import SectionResponse +from .models.sections_response import SectionsResponse +from .models.student import Student +from .models.student_object import StudentObject +from .models.student_response import StudentResponse +from .models.students_response import StudentsResponse +from .models.teacher import Teacher +from .models.teacher_object import TeacherObject +from .models.teacher_response import TeacherResponse +from .models.teachers_response import TeachersResponse +from .models.term import Term +from .models.term_object import TermObject +from .models.term_response import TermResponse +from .models.terms_response import TermsResponse +from .models.contacts_created import ContactsCreated +from .models.contacts_deleted import ContactsDeleted +from .models.contacts_updated import ContactsUpdated +from .models.courses_created import CoursesCreated +from .models.courses_deleted import CoursesDeleted +from .models.courses_updated import CoursesUpdated +from .models.districtadmins_created import DistrictadminsCreated +from .models.districtadmins_deleted import DistrictadminsDeleted +from .models.districtadmins_updated import DistrictadminsUpdated +from .models.districts_created import DistrictsCreated +from .models.districts_deleted import DistrictsDeleted +from .models.districts_updated import DistrictsUpdated +from .models.schooladmins_created import SchooladminsCreated +from .models.schooladmins_deleted import SchooladminsDeleted +from .models.schooladmins_updated import SchooladminsUpdated +from .models.schools_created import SchoolsCreated +from .models.schools_deleted import SchoolsDeleted +from .models.schools_updated import SchoolsUpdated +from .models.sections_created import SectionsCreated +from .models.sections_deleted import SectionsDeleted +from .models.sections_updated import SectionsUpdated +from .models.students_created import StudentsCreated +from .models.students_deleted import StudentsDeleted +from .models.students_updated import StudentsUpdated +from .models.teachers_created import TeachersCreated +from .models.teachers_deleted import TeachersDeleted +from .models.teachers_updated import TeachersUpdated +from .models.terms_created import TermsCreated +from .models.terms_deleted import TermsDeleted +from .models.terms_updated import TermsUpdated + +# import apis into sdk package +from .apis.data_api import DataApi +from .apis.events_api import EventsApi + +# import ApiClient +from .api_client import ApiClient + +from .configuration import Configuration diff --git a/clever/api_client.py b/clever/api_client.py new file mode 100644 index 0000000..c3c560c --- /dev/null +++ b/clever/api_client.py @@ -0,0 +1,632 @@ +# coding: utf-8 +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import os +import re +import json +import mimetypes +import tempfile +from multiprocessing.pool import ThreadPool + +from datetime import date, datetime + +# python 2 and python 3 compatibility library +from six import PY3, integer_types, iteritems, text_type +from six.moves.urllib.parse import quote + +from . import models +from .configuration import Configuration +from .rest import ApiException, RESTClientObject + + +class ApiClient(object): + """ + Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param host: The base path for the server to call. + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to the API. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, text_type) + integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': date, + 'datetime': datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + self.pool = ThreadPool() + self.rest_client = RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/3.0.0/python' + + def __del__(self): + self.pool.close() + self.pool.join() + + @property + def user_agent(self): + """ + Gets user agent. + """ + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + """ + Sets user agent. + """ + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, _preload_content=True, + _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, quote(v.encode('utf-8'), safe=config.safe_chars_for_path_param)) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request(method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """ + Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime, date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """ + Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """ + Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match('list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in iteritems(data)} + + if klass == 'Event': + klass = eval('models.'+''.join(data['type'].title().split('.'))) + return self.__deserialize(data,klass) + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == date: + return self.__deserialize_date(data) + elif klass == datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async=None, + _return_http_data_only=None, collection_formats=None, _preload_content=True, + _request_timeout=None): + """ + Makes the HTTP request (synchronous) and return the deserialized data. + To make an async request, set the async parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async bool: execute request asynchronously + :param _return_http_data_only: response data without head status code and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without + reading/decoding response data. Default is True. + :param _request_timeout: timeout setting for this request. If one number provided, it will be total request + timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :return: + If async parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async is False or missing, + then the method will return the response directly. + """ + if not async: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, method, + path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, _request_timeout=None): + """ + Makes the HTTP request using RESTClient. + """ + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """ + Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in iteritems(params) if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """ + Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = mimetypes.\ + guess_type(filename)[0] or 'application/octet-stream' + params.append(tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """ + Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """ + Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """ + Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """ + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.\ + search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).\ + group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "w") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """ + Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return unicode(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """ + Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """ + Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise ApiException( + status=0, + reason="Failed to parse `{0}` into a date object".format(string) + ) + + def __deserialize_datatime(self, string): + """ + Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise ApiException( + status=0, + reason=( + "Failed to parse `{0}` into a datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """ + Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.swagger_types and not hasattr(klass, 'get_real_child_model'): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in iteritems(klass.swagger_types): + if data is not None \ + and klass.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/clever/apis/__init__.py b/clever/apis/__init__.py new file mode 100644 index 0000000..450079b --- /dev/null +++ b/clever/apis/__init__.py @@ -0,0 +1,5 @@ +from __future__ import absolute_import + +# import apis into api package +from .data_api import DataApi +from .events_api import EventsApi diff --git a/clever/apis/data_api.py b/clever/apis/data_api.py new file mode 100644 index 0000000..70ff24a --- /dev/null +++ b/clever/apis/data_api.py @@ -0,0 +1,4957 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import sys +import os +import re + +# python 2 and python 3 compatibility library +from six import iteritems + +from ..api_client import ApiClient + + +class DataApi(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_contact(self, id, **kwargs): + """ + Returns a specific student contact + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_contact(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: ContactResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_contact_with_http_info(id, **kwargs) + else: + (data) = self.get_contact_with_http_info(id, **kwargs) + return data + + def get_contact_with_http_info(self, id, **kwargs): + """ + Returns a specific student contact + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_contact_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: ContactResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_contact" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_contact`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/contacts/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContactResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_contacts(self, **kwargs): + """ + Returns a list of student contacts + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_contacts(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: ContactsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_contacts_with_http_info(**kwargs) + else: + (data) = self.get_contacts_with_http_info(**kwargs) + return data + + def get_contacts_with_http_info(self, **kwargs): + """ + Returns a list of student contacts + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_contacts_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: ContactsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_contacts" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/contacts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContactsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_contacts_for_student(self, id, **kwargs): + """ + Returns the contacts for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_contacts_for_student(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: ContactsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_contacts_for_student_with_http_info(id, **kwargs) + else: + (data) = self.get_contacts_for_student_with_http_info(id, **kwargs) + return data + + def get_contacts_for_student_with_http_info(self, id, **kwargs): + """ + Returns the contacts for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_contacts_for_student_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: ContactsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_contacts_for_student" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_contacts_for_student`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students/{id}/contacts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContactsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_course(self, id, **kwargs): + """ + Returns a specific course + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_course(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: CourseResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_course_with_http_info(id, **kwargs) + else: + (data) = self.get_course_with_http_info(id, **kwargs) + return data + + def get_course_with_http_info(self, id, **kwargs): + """ + Returns a specific course + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_course_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: CourseResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_course" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_course`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/courses/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CourseResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_course_for_section(self, id, **kwargs): + """ + Returns the course for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_course_for_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: CourseResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_course_for_section_with_http_info(id, **kwargs) + else: + (data) = self.get_course_for_section_with_http_info(id, **kwargs) + return data + + def get_course_for_section_with_http_info(self, id, **kwargs): + """ + Returns the course for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_course_for_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: CourseResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_course_for_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_course_for_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}/course', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CourseResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_courses(self, **kwargs): + """ + Returns a list of courses + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_courses(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: CoursesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_courses_with_http_info(**kwargs) + else: + (data) = self.get_courses_with_http_info(**kwargs) + return data + + def get_courses_with_http_info(self, **kwargs): + """ + Returns a list of courses + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_courses_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: CoursesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_courses" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/courses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CoursesResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district(self, id, **kwargs): + """ + Returns a specific district + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_with_http_info(id, **kwargs) + else: + (data) = self.get_district_with_http_info(id, **kwargs) + return data + + def get_district_with_http_info(self, id, **kwargs): + """ + Returns a specific district + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/districts/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_admin(self, id, **kwargs): + """ + Returns a specific district admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_admin(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictAdminResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_admin_with_http_info(id, **kwargs) + else: + (data) = self.get_district_admin_with_http_info(id, **kwargs) + return data + + def get_district_admin_with_http_info(self, id, **kwargs): + """ + Returns a specific district admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_admin_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictAdminResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_admin" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_admin`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/district_admins/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictAdminResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_admins(self, **kwargs): + """ + Returns a list of district admins + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_admins(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: DistrictAdminsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_admins_with_http_info(**kwargs) + else: + (data) = self.get_district_admins_with_http_info(**kwargs) + return data + + def get_district_admins_with_http_info(self, **kwargs): + """ + Returns a list of district admins + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_admins_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: DistrictAdminsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_admins" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/district_admins', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictAdminsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_contact(self, id, **kwargs): + """ + Returns the district for a student contact + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_contact(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_contact_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_contact_with_http_info(id, **kwargs) + return data + + def get_district_for_contact_with_http_info(self, id, **kwargs): + """ + Returns the district for a student contact + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_contact_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_contact" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_contact`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/contacts/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_course(self, id, **kwargs): + """ + Returns the district for a course + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_course(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_course_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_course_with_http_info(id, **kwargs) + return data + + def get_district_for_course_with_http_info(self, id, **kwargs): + """ + Returns the district for a course + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_course_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_course" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_course`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/courses/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_district_admin(self, id, **kwargs): + """ + Returns the district for a district admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_district_admin(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_district_admin_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_district_admin_with_http_info(id, **kwargs) + return data + + def get_district_for_district_admin_with_http_info(self, id, **kwargs): + """ + Returns the district for a district admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_district_admin_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_district_admin" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_district_admin`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/district_admins/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_school(self, id, **kwargs): + """ + Returns the district for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_school(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_school_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_school_with_http_info(id, **kwargs) + return data + + def get_district_for_school_with_http_info(self, id, **kwargs): + """ + Returns the district for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_school_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_school" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_school`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/schools/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_school_admin(self, id, **kwargs): + """ + Returns the district for a school admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_school_admin(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_school_admin_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_school_admin_with_http_info(id, **kwargs) + return data + + def get_district_for_school_admin_with_http_info(self, id, **kwargs): + """ + Returns the district for a school admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_school_admin_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_school_admin" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_school_admin`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/school_admins/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_section(self, id, **kwargs): + """ + Returns the district for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_section_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_section_with_http_info(id, **kwargs) + return data + + def get_district_for_section_with_http_info(self, id, **kwargs): + """ + Returns the district for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_student(self, id, **kwargs): + """ + Returns the district for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_student(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_student_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_student_with_http_info(id, **kwargs) + return data + + def get_district_for_student_with_http_info(self, id, **kwargs): + """ + Returns the district for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_student_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_student" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_student`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_teacher(self, id, **kwargs): + """ + Returns the district for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_teacher(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_teacher_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_teacher_with_http_info(id, **kwargs) + return data + + def get_district_for_teacher_with_http_info(self, id, **kwargs): + """ + Returns the district for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_teacher_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_teacher" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_teacher`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/teachers/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_district_for_term(self, id, **kwargs): + """ + Returns the district for a term + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_term(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_district_for_term_with_http_info(id, **kwargs) + else: + (data) = self.get_district_for_term_with_http_info(id, **kwargs) + return data + + def get_district_for_term_with_http_info(self, id, **kwargs): + """ + Returns the district for a term + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_district_for_term_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: DistrictResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_district_for_term" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_district_for_term`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/terms/{id}/district', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_districts(self, **kwargs): + """ + Returns a list of districts + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_districts(async=True) + >>> result = thread.get() + + :param async bool + :return: DistrictsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_districts_with_http_info(**kwargs) + else: + (data) = self.get_districts_with_http_info(**kwargs) + return data + + def get_districts_with_http_info(self, **kwargs): + """ + Returns a list of districts + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_districts_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :return: DistrictsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_districts" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/districts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DistrictsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_school(self, id, **kwargs): + """ + Returns a specific school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_school_with_http_info(id, **kwargs) + else: + (data) = self.get_school_with_http_info(id, **kwargs) + return data + + def get_school_with_http_info(self, id, **kwargs): + """ + Returns a specific school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_school" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_school`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/schools/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_school_admin(self, id, **kwargs): + """ + Returns a specific school admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_admin(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolAdminResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_school_admin_with_http_info(id, **kwargs) + else: + (data) = self.get_school_admin_with_http_info(id, **kwargs) + return data + + def get_school_admin_with_http_info(self, id, **kwargs): + """ + Returns a specific school admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_admin_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolAdminResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_school_admin" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_school_admin`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/school_admins/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolAdminResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_school_admins(self, **kwargs): + """ + Returns a list of school admins + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_admins(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolAdminsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_school_admins_with_http_info(**kwargs) + else: + (data) = self.get_school_admins_with_http_info(**kwargs) + return data + + def get_school_admins_with_http_info(self, **kwargs): + """ + Returns a list of school admins + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_admins_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolAdminsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_school_admins" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/school_admins', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolAdminsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_school_for_section(self, id, **kwargs): + """ + Returns the school for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_for_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_school_for_section_with_http_info(id, **kwargs) + else: + (data) = self.get_school_for_section_with_http_info(id, **kwargs) + return data + + def get_school_for_section_with_http_info(self, id, **kwargs): + """ + Returns the school for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_for_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_school_for_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_school_for_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}/school', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_school_for_student(self, id, **kwargs): + """ + Returns the primary school for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_for_student(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_school_for_student_with_http_info(id, **kwargs) + else: + (data) = self.get_school_for_student_with_http_info(id, **kwargs) + return data + + def get_school_for_student_with_http_info(self, id, **kwargs): + """ + Returns the primary school for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_for_student_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_school_for_student" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_school_for_student`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students/{id}/school', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_school_for_teacher(self, id, **kwargs): + """ + Retrieves school info for a teacher. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_for_teacher(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_school_for_teacher_with_http_info(id, **kwargs) + else: + (data) = self.get_school_for_teacher_with_http_info(id, **kwargs) + return data + + def get_school_for_teacher_with_http_info(self, id, **kwargs): + """ + Retrieves school info for a teacher. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_school_for_teacher_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SchoolResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_school_for_teacher" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_school_for_teacher`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/teachers/{id}/school', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_schools(self, **kwargs): + """ + Returns a list of schools + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_schools_with_http_info(**kwargs) + else: + (data) = self.get_schools_with_http_info(**kwargs) + return data + + def get_schools_with_http_info(self, **kwargs): + """ + Returns a list of schools + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_schools" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/schools', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_schools_for_school_admin(self, id, **kwargs): + """ + Returns the schools for a school admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools_for_school_admin(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_schools_for_school_admin_with_http_info(id, **kwargs) + else: + (data) = self.get_schools_for_school_admin_with_http_info(id, **kwargs) + return data + + def get_schools_for_school_admin_with_http_info(self, id, **kwargs): + """ + Returns the schools for a school admin + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools_for_school_admin_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_schools_for_school_admin" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_schools_for_school_admin`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/school_admins/{id}/schools', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_schools_for_student(self, id, **kwargs): + """ + Returns the schools for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools_for_student(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_schools_for_student_with_http_info(id, **kwargs) + else: + (data) = self.get_schools_for_student_with_http_info(id, **kwargs) + return data + + def get_schools_for_student_with_http_info(self, id, **kwargs): + """ + Returns the schools for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools_for_student_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_schools_for_student" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_schools_for_student`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students/{id}/schools', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_schools_for_teacher(self, id, **kwargs): + """ + Returns the schools for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools_for_teacher(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_schools_for_teacher_with_http_info(id, **kwargs) + else: + (data) = self.get_schools_for_teacher_with_http_info(id, **kwargs) + return data + + def get_schools_for_teacher_with_http_info(self, id, **kwargs): + """ + Returns the schools for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_schools_for_teacher_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SchoolsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_schools_for_teacher" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_schools_for_teacher`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/teachers/{id}/schools', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchoolsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_section(self, id, **kwargs): + """ + Returns a specific section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SectionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_section_with_http_info(id, **kwargs) + else: + (data) = self.get_section_with_http_info(id, **kwargs) + return data + + def get_section_with_http_info(self, id, **kwargs): + """ + Returns a specific section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: SectionResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SectionResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sections(self, **kwargs): + """ + Returns a list of sections + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_sections_with_http_info(**kwargs) + else: + (data) = self.get_sections_with_http_info(**kwargs) + return data + + def get_sections_with_http_info(self, **kwargs): + """ + Returns a list of sections + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sections" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SectionsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sections_for_course(self, id, **kwargs): + """ + Returns the sections for a Courses + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_course(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_sections_for_course_with_http_info(id, **kwargs) + else: + (data) = self.get_sections_for_course_with_http_info(id, **kwargs) + return data + + def get_sections_for_course_with_http_info(self, id, **kwargs): + """ + Returns the sections for a Courses + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_course_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sections_for_course" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_sections_for_course`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/courses/{id}/sections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SectionsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sections_for_school(self, id, **kwargs): + """ + Returns the sections for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_school(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_sections_for_school_with_http_info(id, **kwargs) + else: + (data) = self.get_sections_for_school_with_http_info(id, **kwargs) + return data + + def get_sections_for_school_with_http_info(self, id, **kwargs): + """ + Returns the sections for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_school_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sections_for_school" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_sections_for_school`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/schools/{id}/sections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SectionsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sections_for_student(self, id, **kwargs): + """ + Returns the sections for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_student(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_sections_for_student_with_http_info(id, **kwargs) + else: + (data) = self.get_sections_for_student_with_http_info(id, **kwargs) + return data + + def get_sections_for_student_with_http_info(self, id, **kwargs): + """ + Returns the sections for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_student_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sections_for_student" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_sections_for_student`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students/{id}/sections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SectionsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sections_for_teacher(self, id, **kwargs): + """ + Returns the sections for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_teacher(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_sections_for_teacher_with_http_info(id, **kwargs) + else: + (data) = self.get_sections_for_teacher_with_http_info(id, **kwargs) + return data + + def get_sections_for_teacher_with_http_info(self, id, **kwargs): + """ + Returns the sections for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_teacher_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sections_for_teacher" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_sections_for_teacher`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/teachers/{id}/sections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SectionsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sections_for_term(self, id, **kwargs): + """ + Returns the sections for a term + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_term(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_sections_for_term_with_http_info(id, **kwargs) + else: + (data) = self.get_sections_for_term_with_http_info(id, **kwargs) + return data + + def get_sections_for_term_with_http_info(self, id, **kwargs): + """ + Returns the sections for a term + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_sections_for_term_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: SectionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sections_for_term" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_sections_for_term`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/terms/{id}/sections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SectionsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_student(self, id, **kwargs): + """ + Returns a specific student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_student(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: StudentResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_student_with_http_info(id, **kwargs) + else: + (data) = self.get_student_with_http_info(id, **kwargs) + return data + + def get_student_with_http_info(self, id, **kwargs): + """ + Returns a specific student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_student_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: StudentResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_student" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_student`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StudentResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_students(self, **kwargs): + """ + Returns a list of students + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_students_with_http_info(**kwargs) + else: + (data) = self.get_students_with_http_info(**kwargs) + return data + + def get_students_with_http_info(self, **kwargs): + """ + Returns a list of students + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_students" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StudentsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_students_for_contact(self, id, **kwargs): + """ + Returns the students for a student contact + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_contact(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_students_for_contact_with_http_info(id, **kwargs) + else: + (data) = self.get_students_for_contact_with_http_info(id, **kwargs) + return data + + def get_students_for_contact_with_http_info(self, id, **kwargs): + """ + Returns the students for a student contact + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_contact_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_students_for_contact" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_students_for_contact`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/contacts/{id}/students', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StudentsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_students_for_school(self, id, **kwargs): + """ + Returns the students for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_school(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_students_for_school_with_http_info(id, **kwargs) + else: + (data) = self.get_students_for_school_with_http_info(id, **kwargs) + return data + + def get_students_for_school_with_http_info(self, id, **kwargs): + """ + Returns the students for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_school_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_students_for_school" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_students_for_school`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/schools/{id}/students', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StudentsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_students_for_section(self, id, **kwargs): + """ + Returns the students for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_students_for_section_with_http_info(id, **kwargs) + else: + (data) = self.get_students_for_section_with_http_info(id, **kwargs) + return data + + def get_students_for_section_with_http_info(self, id, **kwargs): + """ + Returns the students for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_students_for_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_students_for_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}/students', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StudentsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_students_for_teacher(self, id, **kwargs): + """ + Returns the students for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_teacher(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_students_for_teacher_with_http_info(id, **kwargs) + else: + (data) = self.get_students_for_teacher_with_http_info(id, **kwargs) + return data + + def get_students_for_teacher_with_http_info(self, id, **kwargs): + """ + Returns the students for a teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_students_for_teacher_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: StudentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_students_for_teacher" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_students_for_teacher`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/teachers/{id}/students', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StudentsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_teacher(self, id, **kwargs): + """ + Returns a specific teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teacher(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TeacherResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_teacher_with_http_info(id, **kwargs) + else: + (data) = self.get_teacher_with_http_info(id, **kwargs) + return data + + def get_teacher_with_http_info(self, id, **kwargs): + """ + Returns a specific teacher + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teacher_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TeacherResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_teacher" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_teacher`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/teachers/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TeacherResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_teacher_for_section(self, id, **kwargs): + """ + Returns the primary teacher for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teacher_for_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TeacherResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_teacher_for_section_with_http_info(id, **kwargs) + else: + (data) = self.get_teacher_for_section_with_http_info(id, **kwargs) + return data + + def get_teacher_for_section_with_http_info(self, id, **kwargs): + """ + Returns the primary teacher for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teacher_for_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TeacherResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_teacher_for_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_teacher_for_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}/teacher', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TeacherResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_teachers(self, **kwargs): + """ + Returns a list of teachers + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_teachers_with_http_info(**kwargs) + else: + (data) = self.get_teachers_with_http_info(**kwargs) + return data + + def get_teachers_with_http_info(self, **kwargs): + """ + Returns a list of teachers + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_teachers" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/teachers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TeachersResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_teachers_for_school(self, id, **kwargs): + """ + Returns the teachers for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers_for_school(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_teachers_for_school_with_http_info(id, **kwargs) + else: + (data) = self.get_teachers_for_school_with_http_info(id, **kwargs) + return data + + def get_teachers_for_school_with_http_info(self, id, **kwargs): + """ + Returns the teachers for a school + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers_for_school_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_teachers_for_school" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_teachers_for_school`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/schools/{id}/teachers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TeachersResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_teachers_for_section(self, id, **kwargs): + """ + Returns the teachers for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers_for_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_teachers_for_section_with_http_info(id, **kwargs) + else: + (data) = self.get_teachers_for_section_with_http_info(id, **kwargs) + return data + + def get_teachers_for_section_with_http_info(self, id, **kwargs): + """ + Returns the teachers for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers_for_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_teachers_for_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_teachers_for_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}/teachers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TeachersResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_teachers_for_student(self, id, **kwargs): + """ + Returns the teachers for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers_for_student(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_teachers_for_student_with_http_info(id, **kwargs) + else: + (data) = self.get_teachers_for_student_with_http_info(id, **kwargs) + return data + + def get_teachers_for_student_with_http_info(self, id, **kwargs): + """ + Returns the teachers for a student + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_teachers_for_student_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TeachersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_teachers_for_student" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_teachers_for_student`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/students/{id}/teachers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TeachersResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_term(self, id, **kwargs): + """ + Returns a specific term + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_term(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TermResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_term_with_http_info(id, **kwargs) + else: + (data) = self.get_term_with_http_info(id, **kwargs) + return data + + def get_term_with_http_info(self, id, **kwargs): + """ + Returns a specific term + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_term_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TermResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_term" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_term`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/terms/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TermResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_term_for_section(self, id, **kwargs): + """ + Returns the term for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_term_for_section(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TermResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_term_for_section_with_http_info(id, **kwargs) + else: + (data) = self.get_term_for_section_with_http_info(id, **kwargs) + return data + + def get_term_for_section_with_http_info(self, id, **kwargs): + """ + Returns the term for a section + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_term_for_section_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: TermResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_term_for_section" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_term_for_section`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/sections/{id}/term', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TermResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_terms(self, **kwargs): + """ + Returns a list of terms + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_terms(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TermsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_terms_with_http_info(**kwargs) + else: + (data) = self.get_terms_with_http_info(**kwargs) + return data + + def get_terms_with_http_info(self, **kwargs): + """ + Returns a list of terms + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_terms_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :return: TermsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_terms" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/terms', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TermsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/clever/apis/events_api.py b/clever/apis/events_api.py new file mode 100644 index 0000000..9b23c61 --- /dev/null +++ b/clever/apis/events_api.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import sys +import os +import re + +# python 2 and python 3 compatibility library +from six import iteritems + +from ..api_client import ApiClient + + +class EventsApi(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_event(self, id, **kwargs): + """ + Returns the specific event + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_event(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: EventResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_event_with_http_info(id, **kwargs) + else: + (data) = self.get_event_with_http_info(id, **kwargs) + return data + + def get_event_with_http_info(self, id, **kwargs): + """ + Returns the specific event + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_event_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param str id: (required) + :return: EventResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_event" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params) or (params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_event`") + + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/events/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EventResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_events(self, **kwargs): + """ + Returns a list of events + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_events(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :param str school: + :param list[str] record_type: + :return: EventsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_events_with_http_info(**kwargs) + else: + (data) = self.get_events_with_http_info(**kwargs) + return data + + def get_events_with_http_info(self, **kwargs): + """ + Returns a list of events + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_events_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int limit: + :param str starting_after: + :param str ending_before: + :param str school: + :param list[str] record_type: + :return: EventsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['limit', 'starting_after', 'ending_before', 'school', 'record_type'] + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_events" % key + ) + params[key] = val + del params['kwargs'] + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'starting_after' in params: + query_params.append(('starting_after', params['starting_after'])) + if 'ending_before' in params: + query_params.append(('ending_before', params['ending_before'])) + if 'school' in params: + query_params.append(('school', params['school'])) + if 'record_type' in params: + query_params.append(('record_type', params['record_type'])) + collection_formats['record_type'] = 'multi' + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # Authentication setting + auth_settings = ['oauth'] + + return self.api_client.call_api('/events', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EventsResponse', + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/clever/configuration.py b/clever/configuration.py new file mode 100644 index 0000000..0c9994c --- /dev/null +++ b/clever/configuration.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import urllib3 + +import copy +import logging +import multiprocessing +import sys + +from six import iteritems +from six import with_metaclass +from six.moves import http_client as httplib + +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default == None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(with_metaclass(TypeWithDefault, object)): + """ + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + def __init__(self): + """ + Constructor + """ + # Default Base url + self.host = "https://api.clever.com/v2.0" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # access token for OAuth + self.access_token = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("clever") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @property + def logger_file(self): + """ + Gets the logger_file. + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """ + Sets the logger_file. + + If the logger_file is None, then add stream handler and remove file handler. + Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """ + Gets the debug status. + """ + return self.__debug + + @debug.setter + def debug(self, value): + """ + Sets the debug status. + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """ + Gets the logger_format. + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """ + Sets the logger_format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """ + Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if self.api_key.get(identifier) and self.api_key_prefix.get(identifier): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """ + Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers(basic_auth=self.username + ':' + self.password)\ + .get('authorization') + + def auth_settings(self): + """ + Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + + 'oauth': + { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + }, + + } + + def to_debug_report(self): + """ + Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 2.0.0\n"\ + "SDK Package Version: 3.0.2".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/clever/models/__init__.py b/clever/models/__init__.py new file mode 100644 index 0000000..a911f26 --- /dev/null +++ b/clever/models/__init__.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from .bad_request import BadRequest +from .contact import Contact +from .contact_object import ContactObject +from .contact_response import ContactResponse +from .contacts_response import ContactsResponse +from .course import Course +from .course_object import CourseObject +from .course_response import CourseResponse +from .courses_response import CoursesResponse +from .credentials import Credentials +from .district import District +from .district_admin import DistrictAdmin +from .district_admin_object import DistrictAdminObject +from .district_admin_response import DistrictAdminResponse +from .district_admins_response import DistrictAdminsResponse +from .district_object import DistrictObject +from .district_response import DistrictResponse +from .districts_response import DistrictsResponse +from .event import Event +from .event_response import EventResponse +from .events_response import EventsResponse +from .internal_error import InternalError +from .location import Location +from .name import Name +from .not_found import NotFound +from .principal import Principal +from .school import School +from .school_admin import SchoolAdmin +from .school_admin_object import SchoolAdminObject +from .school_admin_response import SchoolAdminResponse +from .school_admins_response import SchoolAdminsResponse +from .school_object import SchoolObject +from .school_response import SchoolResponse +from .schools_response import SchoolsResponse +from .section import Section +from .section_object import SectionObject +from .section_response import SectionResponse +from .sections_response import SectionsResponse +from .student import Student +from .student_object import StudentObject +from .student_response import StudentResponse +from .students_response import StudentsResponse +from .teacher import Teacher +from .teacher_object import TeacherObject +from .teacher_response import TeacherResponse +from .teachers_response import TeachersResponse +from .term import Term +from .term_object import TermObject +from .term_response import TermResponse +from .terms_response import TermsResponse +from .contacts_created import ContactsCreated +from .contacts_deleted import ContactsDeleted +from .contacts_updated import ContactsUpdated +from .courses_created import CoursesCreated +from .courses_deleted import CoursesDeleted +from .courses_updated import CoursesUpdated +from .districtadmins_created import DistrictadminsCreated +from .districtadmins_deleted import DistrictadminsDeleted +from .districtadmins_updated import DistrictadminsUpdated +from .districts_created import DistrictsCreated +from .districts_deleted import DistrictsDeleted +from .districts_updated import DistrictsUpdated +from .schooladmins_created import SchooladminsCreated +from .schooladmins_deleted import SchooladminsDeleted +from .schooladmins_updated import SchooladminsUpdated +from .schools_created import SchoolsCreated +from .schools_deleted import SchoolsDeleted +from .schools_updated import SchoolsUpdated +from .sections_created import SectionsCreated +from .sections_deleted import SectionsDeleted +from .sections_updated import SectionsUpdated +from .students_created import StudentsCreated +from .students_deleted import StudentsDeleted +from .students_updated import StudentsUpdated +from .teachers_created import TeachersCreated +from .teachers_deleted import TeachersDeleted +from .teachers_updated import TeachersUpdated +from .terms_created import TermsCreated +from .terms_deleted import TermsDeleted +from .terms_updated import TermsUpdated diff --git a/clever/models/bad_request.py b/clever/models/bad_request.py new file mode 100644 index 0000000..8a45f0a --- /dev/null +++ b/clever/models/bad_request.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class BadRequest(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'message': 'str' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None): + """ + BadRequest - a model defined in Swagger + """ + + self._message = None + self.discriminator = None + + if message is not None: + self.message = message + + @property + def message(self): + """ + Gets the message of this BadRequest. + + :return: The message of this BadRequest. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this BadRequest. + + :param message: The message of this BadRequest. + :type: str + """ + + self._message = message + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, BadRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/contact.py b/clever/models/contact.py new file mode 100644 index 0000000..1e5d91e --- /dev/null +++ b/clever/models/contact.py @@ -0,0 +1,376 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Contact(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'district': 'str', + 'email': 'str', + 'id': 'str', + 'name': 'str', + 'phone': 'str', + 'phone_type': 'str', + 'relationship': 'str', + 'sis_id': 'str', + 'students': 'list[str]', + 'type': 'str' + } + + attribute_map = { + 'district': 'district', + 'email': 'email', + 'id': 'id', + 'name': 'name', + 'phone': 'phone', + 'phone_type': 'phone_type', + 'relationship': 'relationship', + 'sis_id': 'sis_id', + 'students': 'students', + 'type': 'type' + } + + def __init__(self, district=None, email=None, id=None, name=None, phone=None, phone_type=None, relationship=None, sis_id=None, students=None, type=None): + """ + Contact - a model defined in Swagger + """ + + self._district = None + self._email = None + self._id = None + self._name = None + self._phone = None + self._phone_type = None + self._relationship = None + self._sis_id = None + self._students = None + self._type = None + self.discriminator = None + + if district is not None: + self.district = district + if email is not None: + self.email = email + if id is not None: + self.id = id + if name is not None: + self.name = name + if phone is not None: + self.phone = phone + if phone_type is not None: + self.phone_type = phone_type + if relationship is not None: + self.relationship = relationship + if sis_id is not None: + self.sis_id = sis_id + if students is not None: + self.students = students + if type is not None: + self.type = type + + @property + def district(self): + """ + Gets the district of this Contact. + + :return: The district of this Contact. + :rtype: str + """ + return self._district + + @district.setter + def district(self, district): + """ + Sets the district of this Contact. + + :param district: The district of this Contact. + :type: str + """ + + self._district = district + + @property + def email(self): + """ + Gets the email of this Contact. + + :return: The email of this Contact. + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """ + Sets the email of this Contact. + + :param email: The email of this Contact. + :type: str + """ + + self._email = email + + @property + def id(self): + """ + Gets the id of this Contact. + + :return: The id of this Contact. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Contact. + + :param id: The id of this Contact. + :type: str + """ + + self._id = id + + @property + def name(self): + """ + Gets the name of this Contact. + + :return: The name of this Contact. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Contact. + + :param name: The name of this Contact. + :type: str + """ + + self._name = name + + @property + def phone(self): + """ + Gets the phone of this Contact. + + :return: The phone of this Contact. + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """ + Sets the phone of this Contact. + + :param phone: The phone of this Contact. + :type: str + """ + + self._phone = phone + + @property + def phone_type(self): + """ + Gets the phone_type of this Contact. + + :return: The phone_type of this Contact. + :rtype: str + """ + return self._phone_type + + @phone_type.setter + def phone_type(self, phone_type): + """ + Sets the phone_type of this Contact. + + :param phone_type: The phone_type of this Contact. + :type: str + """ + allowed_values = ["Cell", "Home", "Work", "Other", ""] + if phone_type not in allowed_values: + raise ValueError( + "Invalid value for `phone_type` ({0}), must be one of {1}" + .format(phone_type, allowed_values) + ) + + self._phone_type = phone_type + + @property + def relationship(self): + """ + Gets the relationship of this Contact. + + :return: The relationship of this Contact. + :rtype: str + """ + return self._relationship + + @relationship.setter + def relationship(self, relationship): + """ + Sets the relationship of this Contact. + + :param relationship: The relationship of this Contact. + :type: str + """ + allowed_values = ["Parent", "Grandparent", "Self", "Aunt/Uncle", "Sibling", "Other", ""] + if relationship not in allowed_values: + raise ValueError( + "Invalid value for `relationship` ({0}), must be one of {1}" + .format(relationship, allowed_values) + ) + + self._relationship = relationship + + @property + def sis_id(self): + """ + Gets the sis_id of this Contact. + + :return: The sis_id of this Contact. + :rtype: str + """ + return self._sis_id + + @sis_id.setter + def sis_id(self, sis_id): + """ + Sets the sis_id of this Contact. + + :param sis_id: The sis_id of this Contact. + :type: str + """ + + self._sis_id = sis_id + + @property + def students(self): + """ + Gets the students of this Contact. + + :return: The students of this Contact. + :rtype: list[str] + """ + return self._students + + @students.setter + def students(self, students): + """ + Sets the students of this Contact. + + :param students: The students of this Contact. + :type: list[str] + """ + + self._students = students + + @property + def type(self): + """ + Gets the type of this Contact. + + :return: The type of this Contact. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this Contact. + + :param type: The type of this Contact. + :type: str + """ + allowed_values = ["Parent/Guardian", "Emergency", "Primary", "Secondary", "Family", "Other", ""] + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" + .format(type, allowed_values) + ) + + self._type = type + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Contact): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/contact_object.py b/clever/models/contact_object.py new file mode 100644 index 0000000..c55486f --- /dev/null +++ b/clever/models/contact_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class ContactObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'Contact' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + ContactObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this ContactObject. + + :return: The object of this ContactObject. + :rtype: Contact + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this ContactObject. + + :param object: The object of this ContactObject. + :type: Contact + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/contact_response.py b/clever/models/contact_response.py new file mode 100644 index 0000000..6478f6c --- /dev/null +++ b/clever/models/contact_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class ContactResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'Contact' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactResponse. + + :return: The data of this ContactResponse. + :rtype: Contact + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactResponse. + + :param data: The data of this ContactResponse. + :type: Contact + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/contacts_created.py b/clever/models/contacts_created.py new file mode 100644 index 0000000..7ce361f --- /dev/null +++ b/clever/models/contacts_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class ContactsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ContactObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactsCreated. + + :return: The data of this ContactsCreated. + :rtype: ContactObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactsCreated. + + :param data: The data of this ContactsCreated. + :type: ContactObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/contacts_deleted.py b/clever/models/contacts_deleted.py new file mode 100644 index 0000000..c4ba020 --- /dev/null +++ b/clever/models/contacts_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class ContactsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ContactObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactsDeleted. + + :return: The data of this ContactsDeleted. + :rtype: ContactObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactsDeleted. + + :param data: The data of this ContactsDeleted. + :type: ContactObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/contacts_response.py b/clever/models/contacts_response.py new file mode 100644 index 0000000..fdc4acf --- /dev/null +++ b/clever/models/contacts_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class ContactsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[ContactResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactsResponse. + + :return: The data of this ContactsResponse. + :rtype: list[ContactResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactsResponse. + + :param data: The data of this ContactsResponse. + :type: list[ContactResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/contacts_updated.py b/clever/models/contacts_updated.py new file mode 100644 index 0000000..e4ec27d --- /dev/null +++ b/clever/models/contacts_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class ContactsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ContactObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactsUpdated. + + :return: The data of this ContactsUpdated. + :rtype: ContactObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactsUpdated. + + :param data: The data of this ContactsUpdated. + :type: ContactObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/course.py b/clever/models/course.py new file mode 100644 index 0000000..30b6794 --- /dev/null +++ b/clever/models/course.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Course(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'number': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'number': 'number' + } + + def __init__(self, id=None, name=None, number=None): + """ + Course - a model defined in Swagger + """ + + self._id = None + self._name = None + self._number = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if number is not None: + self.number = number + + @property + def id(self): + """ + Gets the id of this Course. + + :return: The id of this Course. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Course. + + :param id: The id of this Course. + :type: str + """ + + self._id = id + + @property + def name(self): + """ + Gets the name of this Course. + + :return: The name of this Course. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Course. + + :param name: The name of this Course. + :type: str + """ + + self._name = name + + @property + def number(self): + """ + Gets the number of this Course. + + :return: The number of this Course. + :rtype: str + """ + return self._number + + @number.setter + def number(self, number): + """ + Sets the number of this Course. + + :param number: The number of this Course. + :type: str + """ + + self._number = number + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Course): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/course_object.py b/clever/models/course_object.py new file mode 100644 index 0000000..d923aa1 --- /dev/null +++ b/clever/models/course_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class CourseObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'Course' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + CourseObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this CourseObject. + + :return: The object of this CourseObject. + :rtype: Course + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this CourseObject. + + :param object: The object of this CourseObject. + :type: Course + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CourseObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/course_response.py b/clever/models/course_response.py new file mode 100644 index 0000000..83af89b --- /dev/null +++ b/clever/models/course_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class CourseResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'Course' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CourseResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CourseResponse. + + :return: The data of this CourseResponse. + :rtype: Course + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CourseResponse. + + :param data: The data of this CourseResponse. + :type: Course + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CourseResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/courses_created.py b/clever/models/courses_created.py new file mode 100644 index 0000000..bfb1846 --- /dev/null +++ b/clever/models/courses_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class CoursesCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CourseObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CoursesCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CoursesCreated. + + :return: The data of this CoursesCreated. + :rtype: CourseObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CoursesCreated. + + :param data: The data of this CoursesCreated. + :type: CourseObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CoursesCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/courses_deleted.py b/clever/models/courses_deleted.py new file mode 100644 index 0000000..84eb363 --- /dev/null +++ b/clever/models/courses_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class CoursesDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CourseObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CoursesDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CoursesDeleted. + + :return: The data of this CoursesDeleted. + :rtype: CourseObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CoursesDeleted. + + :param data: The data of this CoursesDeleted. + :type: CourseObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CoursesDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/courses_response.py b/clever/models/courses_response.py new file mode 100644 index 0000000..c1a1562 --- /dev/null +++ b/clever/models/courses_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class CoursesResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[CourseResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CoursesResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CoursesResponse. + + :return: The data of this CoursesResponse. + :rtype: list[CourseResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CoursesResponse. + + :param data: The data of this CoursesResponse. + :type: list[CourseResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CoursesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/courses_updated.py b/clever/models/courses_updated.py new file mode 100644 index 0000000..a6960f7 --- /dev/null +++ b/clever/models/courses_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class CoursesUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CourseObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CoursesUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CoursesUpdated. + + :return: The data of this CoursesUpdated. + :rtype: CourseObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CoursesUpdated. + + :param data: The data of this CoursesUpdated. + :type: CourseObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CoursesUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/credentials.py b/clever/models/credentials.py new file mode 100644 index 0000000..5566354 --- /dev/null +++ b/clever/models/credentials.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Credentials(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'district_username': 'str' + } + + attribute_map = { + 'district_username': 'district_username' + } + + def __init__(self, district_username=None): + """ + Credentials - a model defined in Swagger + """ + + self._district_username = None + self.discriminator = None + + if district_username is not None: + self.district_username = district_username + + @property + def district_username(self): + """ + Gets the district_username of this Credentials. + + :return: The district_username of this Credentials. + :rtype: str + """ + return self._district_username + + @district_username.setter + def district_username(self, district_username): + """ + Sets the district_username of this Credentials. + + :param district_username: The district_username of this Credentials. + :type: str + """ + + self._district_username = district_username + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Credentials): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/district.py b/clever/models/district.py new file mode 100644 index 0000000..400760e --- /dev/null +++ b/clever/models/district.py @@ -0,0 +1,390 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class District(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'str', + 'id': 'str', + 'last_sync': 'str', + 'launch_date': 'str', + 'mdr_number': 'str', + 'name': 'str', + 'nces_id': 'str', + 'pause_end': 'str', + 'pause_start': 'str', + 'sis_type': 'str', + 'state': 'str' + } + + attribute_map = { + 'error': 'error', + 'id': 'id', + 'last_sync': 'last_sync', + 'launch_date': 'launch_date', + 'mdr_number': 'mdr_number', + 'name': 'name', + 'nces_id': 'nces_id', + 'pause_end': 'pause_end', + 'pause_start': 'pause_start', + 'sis_type': 'sis_type', + 'state': 'state' + } + + def __init__(self, error=None, id=None, last_sync=None, launch_date=None, mdr_number=None, name=None, nces_id=None, pause_end=None, pause_start=None, sis_type=None, state=None): + """ + District - a model defined in Swagger + """ + + self._error = None + self._id = None + self._last_sync = None + self._launch_date = None + self._mdr_number = None + self._name = None + self._nces_id = None + self._pause_end = None + self._pause_start = None + self._sis_type = None + self._state = None + self.discriminator = None + + if error is not None: + self.error = error + if id is not None: + self.id = id + if last_sync is not None: + self.last_sync = last_sync + if launch_date is not None: + self.launch_date = launch_date + if mdr_number is not None: + self.mdr_number = mdr_number + if name is not None: + self.name = name + if nces_id is not None: + self.nces_id = nces_id + if pause_end is not None: + self.pause_end = pause_end + if pause_start is not None: + self.pause_start = pause_start + if sis_type is not None: + self.sis_type = sis_type + if state is not None: + self.state = state + + @property + def error(self): + """ + Gets the error of this District. + + :return: The error of this District. + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """ + Sets the error of this District. + + :param error: The error of this District. + :type: str + """ + + self._error = error + + @property + def id(self): + """ + Gets the id of this District. + + :return: The id of this District. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this District. + + :param id: The id of this District. + :type: str + """ + + self._id = id + + @property + def last_sync(self): + """ + Gets the last_sync of this District. + + :return: The last_sync of this District. + :rtype: str + """ + return self._last_sync + + @last_sync.setter + def last_sync(self, last_sync): + """ + Sets the last_sync of this District. + + :param last_sync: The last_sync of this District. + :type: str + """ + + self._last_sync = last_sync + + @property + def launch_date(self): + """ + Gets the launch_date of this District. + + :return: The launch_date of this District. + :rtype: str + """ + return self._launch_date + + @launch_date.setter + def launch_date(self, launch_date): + """ + Sets the launch_date of this District. + + :param launch_date: The launch_date of this District. + :type: str + """ + + self._launch_date = launch_date + + @property + def mdr_number(self): + """ + Gets the mdr_number of this District. + + :return: The mdr_number of this District. + :rtype: str + """ + return self._mdr_number + + @mdr_number.setter + def mdr_number(self, mdr_number): + """ + Sets the mdr_number of this District. + + :param mdr_number: The mdr_number of this District. + :type: str + """ + + self._mdr_number = mdr_number + + @property + def name(self): + """ + Gets the name of this District. + + :return: The name of this District. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this District. + + :param name: The name of this District. + :type: str + """ + + self._name = name + + @property + def nces_id(self): + """ + Gets the nces_id of this District. + + :return: The nces_id of this District. + :rtype: str + """ + return self._nces_id + + @nces_id.setter + def nces_id(self, nces_id): + """ + Sets the nces_id of this District. + + :param nces_id: The nces_id of this District. + :type: str + """ + + self._nces_id = nces_id + + @property + def pause_end(self): + """ + Gets the pause_end of this District. + + :return: The pause_end of this District. + :rtype: str + """ + return self._pause_end + + @pause_end.setter + def pause_end(self, pause_end): + """ + Sets the pause_end of this District. + + :param pause_end: The pause_end of this District. + :type: str + """ + + self._pause_end = pause_end + + @property + def pause_start(self): + """ + Gets the pause_start of this District. + + :return: The pause_start of this District. + :rtype: str + """ + return self._pause_start + + @pause_start.setter + def pause_start(self, pause_start): + """ + Sets the pause_start of this District. + + :param pause_start: The pause_start of this District. + :type: str + """ + + self._pause_start = pause_start + + @property + def sis_type(self): + """ + Gets the sis_type of this District. + + :return: The sis_type of this District. + :rtype: str + """ + return self._sis_type + + @sis_type.setter + def sis_type(self, sis_type): + """ + Sets the sis_type of this District. + + :param sis_type: The sis_type of this District. + :type: str + """ + + self._sis_type = sis_type + + @property + def state(self): + """ + Gets the state of this District. + + :return: The state of this District. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """ + Sets the state of this District. + + :param state: The state of this District. + :type: str + """ + allowed_values = ["running", "pending", "error", "paused"] + if state not in allowed_values: + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" + .format(state, allowed_values) + ) + + self._state = state + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, District): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/district_admin.py b/clever/models/district_admin.py new file mode 100644 index 0000000..28d07e5 --- /dev/null +++ b/clever/models/district_admin.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DistrictAdmin(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'district': 'str', + 'email': 'str', + 'id': 'str', + 'name': 'Name', + 'title': 'str' + } + + attribute_map = { + 'district': 'district', + 'email': 'email', + 'id': 'id', + 'name': 'name', + 'title': 'title' + } + + def __init__(self, district=None, email=None, id=None, name=None, title=None): + """ + DistrictAdmin - a model defined in Swagger + """ + + self._district = None + self._email = None + self._id = None + self._name = None + self._title = None + self.discriminator = None + + if district is not None: + self.district = district + if email is not None: + self.email = email + if id is not None: + self.id = id + if name is not None: + self.name = name + if title is not None: + self.title = title + + @property + def district(self): + """ + Gets the district of this DistrictAdmin. + + :return: The district of this DistrictAdmin. + :rtype: str + """ + return self._district + + @district.setter + def district(self, district): + """ + Sets the district of this DistrictAdmin. + + :param district: The district of this DistrictAdmin. + :type: str + """ + + self._district = district + + @property + def email(self): + """ + Gets the email of this DistrictAdmin. + + :return: The email of this DistrictAdmin. + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """ + Sets the email of this DistrictAdmin. + + :param email: The email of this DistrictAdmin. + :type: str + """ + + self._email = email + + @property + def id(self): + """ + Gets the id of this DistrictAdmin. + + :return: The id of this DistrictAdmin. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this DistrictAdmin. + + :param id: The id of this DistrictAdmin. + :type: str + """ + + self._id = id + + @property + def name(self): + """ + Gets the name of this DistrictAdmin. + + :return: The name of this DistrictAdmin. + :rtype: Name + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this DistrictAdmin. + + :param name: The name of this DistrictAdmin. + :type: Name + """ + + self._name = name + + @property + def title(self): + """ + Gets the title of this DistrictAdmin. + + :return: The title of this DistrictAdmin. + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """ + Sets the title of this DistrictAdmin. + + :param title: The title of this DistrictAdmin. + :type: str + """ + + self._title = title + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictAdmin): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/district_admin_object.py b/clever/models/district_admin_object.py new file mode 100644 index 0000000..1d277c1 --- /dev/null +++ b/clever/models/district_admin_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DistrictAdminObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'DistrictAdmin' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + DistrictAdminObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this DistrictAdminObject. + + :return: The object of this DistrictAdminObject. + :rtype: DistrictAdmin + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this DistrictAdminObject. + + :param object: The object of this DistrictAdminObject. + :type: DistrictAdmin + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictAdminObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/district_admin_response.py b/clever/models/district_admin_response.py new file mode 100644 index 0000000..f355d62 --- /dev/null +++ b/clever/models/district_admin_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DistrictAdminResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictAdmin' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictAdminResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictAdminResponse. + + :return: The data of this DistrictAdminResponse. + :rtype: DistrictAdmin + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictAdminResponse. + + :param data: The data of this DistrictAdminResponse. + :type: DistrictAdmin + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictAdminResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/district_admins_response.py b/clever/models/district_admins_response.py new file mode 100644 index 0000000..5b2e12b --- /dev/null +++ b/clever/models/district_admins_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DistrictAdminsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[DistrictAdminResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictAdminsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictAdminsResponse. + + :return: The data of this DistrictAdminsResponse. + :rtype: list[DistrictAdminResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictAdminsResponse. + + :param data: The data of this DistrictAdminsResponse. + :type: list[DistrictAdminResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictAdminsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/district_object.py b/clever/models/district_object.py new file mode 100644 index 0000000..5f021da --- /dev/null +++ b/clever/models/district_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DistrictObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'District' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + DistrictObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this DistrictObject. + + :return: The object of this DistrictObject. + :rtype: District + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this DistrictObject. + + :param object: The object of this DistrictObject. + :type: District + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/district_response.py b/clever/models/district_response.py new file mode 100644 index 0000000..8503634 --- /dev/null +++ b/clever/models/district_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DistrictResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'District' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictResponse. + + :return: The data of this DistrictResponse. + :rtype: District + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictResponse. + + :param data: The data of this DistrictResponse. + :type: District + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/districtadmins_created.py b/clever/models/districtadmins_created.py new file mode 100644 index 0000000..7c2226a --- /dev/null +++ b/clever/models/districtadmins_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictadminsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictadminsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictadminsCreated. + + :return: The data of this DistrictadminsCreated. + :rtype: DistrictAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictadminsCreated. + + :param data: The data of this DistrictadminsCreated. + :type: DistrictAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictadminsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/districtadmins_deleted.py b/clever/models/districtadmins_deleted.py new file mode 100644 index 0000000..56a9419 --- /dev/null +++ b/clever/models/districtadmins_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictadminsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictadminsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictadminsDeleted. + + :return: The data of this DistrictadminsDeleted. + :rtype: DistrictAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictadminsDeleted. + + :param data: The data of this DistrictadminsDeleted. + :type: DistrictAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictadminsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/districtadmins_updated.py b/clever/models/districtadmins_updated.py new file mode 100644 index 0000000..bd3e765 --- /dev/null +++ b/clever/models/districtadmins_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictadminsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictadminsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictadminsUpdated. + + :return: The data of this DistrictadminsUpdated. + :rtype: DistrictAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictadminsUpdated. + + :param data: The data of this DistrictadminsUpdated. + :type: DistrictAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictadminsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/districts_created.py b/clever/models/districts_created.py new file mode 100644 index 0000000..6215970 --- /dev/null +++ b/clever/models/districts_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictsCreated. + + :return: The data of this DistrictsCreated. + :rtype: DistrictObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictsCreated. + + :param data: The data of this DistrictsCreated. + :type: DistrictObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/districts_deleted.py b/clever/models/districts_deleted.py new file mode 100644 index 0000000..cd17f37 --- /dev/null +++ b/clever/models/districts_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictsDeleted. + + :return: The data of this DistrictsDeleted. + :rtype: DistrictObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictsDeleted. + + :param data: The data of this DistrictsDeleted. + :type: DistrictObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/districts_response.py b/clever/models/districts_response.py new file mode 100644 index 0000000..87bc697 --- /dev/null +++ b/clever/models/districts_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DistrictsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[DistrictResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictsResponse. + + :return: The data of this DistrictsResponse. + :rtype: list[DistrictResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictsResponse. + + :param data: The data of this DistrictsResponse. + :type: list[DistrictResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/districts_updated.py b/clever/models/districts_updated.py new file mode 100644 index 0000000..e4e3e57 --- /dev/null +++ b/clever/models/districts_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictsUpdated. + + :return: The data of this DistrictsUpdated. + :rtype: DistrictObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictsUpdated. + + :param data: The data of this DistrictsUpdated. + :type: DistrictObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/event.py b/clever/models/event.py new file mode 100644 index 0000000..897bfb8 --- /dev/null +++ b/clever/models/event.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Event(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'str', + 'id': 'str', + 'type': 'str' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'type': 'type' + } + + def __init__(self, created=None, id=None, type=None): + """ + Event - a model defined in Swagger + """ + + self._created = None + self._id = None + self._type = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + self.type = type + + @property + def created(self): + """ + Gets the created of this Event. + + :return: The created of this Event. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """ + Sets the created of this Event. + + :param created: The created of this Event. + :type: str + """ + + self._created = created + + @property + def id(self): + """ + Gets the id of this Event. + + :return: The id of this Event. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Event. + + :param id: The id of this Event. + :type: str + """ + + self._id = id + + @property + def type(self): + """ + Gets the type of this Event. + + :return: The type of this Event. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this Event. + + :param type: The type of this Event. + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") + + self._type = type + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Event): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/event_response.py b/clever/models/event_response.py new file mode 100644 index 0000000..921739d --- /dev/null +++ b/clever/models/event_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class EventResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'Event' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + EventResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this EventResponse. + + :return: The data of this EventResponse. + :rtype: Event + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this EventResponse. + + :param data: The data of this EventResponse. + :type: Event + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, EventResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/events_response.py b/clever/models/events_response.py new file mode 100644 index 0000000..08d1062 --- /dev/null +++ b/clever/models/events_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class EventsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[EventResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + EventsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this EventsResponse. + + :return: The data of this EventsResponse. + :rtype: list[EventResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this EventsResponse. + + :param data: The data of this EventsResponse. + :type: list[EventResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, EventsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/internal_error.py b/clever/models/internal_error.py new file mode 100644 index 0000000..bc33fe2 --- /dev/null +++ b/clever/models/internal_error.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class InternalError(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'message': 'str' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None): + """ + InternalError - a model defined in Swagger + """ + + self._message = None + self.discriminator = None + + if message is not None: + self.message = message + + @property + def message(self): + """ + Gets the message of this InternalError. + + :return: The message of this InternalError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this InternalError. + + :param message: The message of this InternalError. + :type: str + """ + + self._message = message + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, InternalError): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/location.py b/clever/models/location.py new file mode 100644 index 0000000..e96a61f --- /dev/null +++ b/clever/models/location.py @@ -0,0 +1,254 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Location(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'address': 'str', + 'city': 'str', + 'lat': 'str', + 'lon': 'str', + 'state': 'str', + 'zip': 'str' + } + + attribute_map = { + 'address': 'address', + 'city': 'city', + 'lat': 'lat', + 'lon': 'lon', + 'state': 'state', + 'zip': 'zip' + } + + def __init__(self, address=None, city=None, lat=None, lon=None, state=None, zip=None): + """ + Location - a model defined in Swagger + """ + + self._address = None + self._city = None + self._lat = None + self._lon = None + self._state = None + self._zip = None + self.discriminator = None + + if address is not None: + self.address = address + if city is not None: + self.city = city + if lat is not None: + self.lat = lat + if lon is not None: + self.lon = lon + if state is not None: + self.state = state + if zip is not None: + self.zip = zip + + @property + def address(self): + """ + Gets the address of this Location. + + :return: The address of this Location. + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """ + Sets the address of this Location. + + :param address: The address of this Location. + :type: str + """ + + self._address = address + + @property + def city(self): + """ + Gets the city of this Location. + + :return: The city of this Location. + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """ + Sets the city of this Location. + + :param city: The city of this Location. + :type: str + """ + + self._city = city + + @property + def lat(self): + """ + Gets the lat of this Location. + + :return: The lat of this Location. + :rtype: str + """ + return self._lat + + @lat.setter + def lat(self, lat): + """ + Sets the lat of this Location. + + :param lat: The lat of this Location. + :type: str + """ + + self._lat = lat + + @property + def lon(self): + """ + Gets the lon of this Location. + + :return: The lon of this Location. + :rtype: str + """ + return self._lon + + @lon.setter + def lon(self, lon): + """ + Sets the lon of this Location. + + :param lon: The lon of this Location. + :type: str + """ + + self._lon = lon + + @property + def state(self): + """ + Gets the state of this Location. + + :return: The state of this Location. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """ + Sets the state of this Location. + + :param state: The state of this Location. + :type: str + """ + + self._state = state + + @property + def zip(self): + """ + Gets the zip of this Location. + + :return: The zip of this Location. + :rtype: str + """ + return self._zip + + @zip.setter + def zip(self, zip): + """ + Sets the zip of this Location. + + :param zip: The zip of this Location. + :type: str + """ + + self._zip = zip + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Location): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/name.py b/clever/models/name.py new file mode 100644 index 0000000..a691791 --- /dev/null +++ b/clever/models/name.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Name(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'first': 'str', + 'last': 'str', + 'middle': 'str' + } + + attribute_map = { + 'first': 'first', + 'last': 'last', + 'middle': 'middle' + } + + def __init__(self, first=None, last=None, middle=None): + """ + Name - a model defined in Swagger + """ + + self._first = None + self._last = None + self._middle = None + self.discriminator = None + + if first is not None: + self.first = first + if last is not None: + self.last = last + if middle is not None: + self.middle = middle + + @property + def first(self): + """ + Gets the first of this Name. + + :return: The first of this Name. + :rtype: str + """ + return self._first + + @first.setter + def first(self, first): + """ + Sets the first of this Name. + + :param first: The first of this Name. + :type: str + """ + + self._first = first + + @property + def last(self): + """ + Gets the last of this Name. + + :return: The last of this Name. + :rtype: str + """ + return self._last + + @last.setter + def last(self, last): + """ + Sets the last of this Name. + + :param last: The last of this Name. + :type: str + """ + + self._last = last + + @property + def middle(self): + """ + Gets the middle of this Name. + + :return: The middle of this Name. + :rtype: str + """ + return self._middle + + @middle.setter + def middle(self, middle): + """ + Sets the middle of this Name. + + :param middle: The middle of this Name. + :type: str + """ + + self._middle = middle + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Name): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/not_found.py b/clever/models/not_found.py new file mode 100644 index 0000000..5b4df50 --- /dev/null +++ b/clever/models/not_found.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class NotFound(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'message': 'str' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None): + """ + NotFound - a model defined in Swagger + """ + + self._message = None + self.discriminator = None + + if message is not None: + self.message = message + + @property + def message(self): + """ + Gets the message of this NotFound. + + :return: The message of this NotFound. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this NotFound. + + :param message: The message of this NotFound. + :type: str + """ + + self._message = message + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, NotFound): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/principal.py b/clever/models/principal.py new file mode 100644 index 0000000..c09c8d7 --- /dev/null +++ b/clever/models/principal.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Principal(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'name': 'str' + } + + attribute_map = { + 'email': 'email', + 'name': 'name' + } + + def __init__(self, email=None, name=None): + """ + Principal - a model defined in Swagger + """ + + self._email = None + self._name = None + self.discriminator = None + + if email is not None: + self.email = email + if name is not None: + self.name = name + + @property + def email(self): + """ + Gets the email of this Principal. + + :return: The email of this Principal. + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """ + Sets the email of this Principal. + + :param email: The email of this Principal. + :type: str + """ + + self._email = email + + @property + def name(self): + """ + Gets the name of this Principal. + + :return: The name of this Principal. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Principal. + + :param name: The name of this Principal. + :type: str + """ + + self._name = name + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Principal): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/school.py b/clever/models/school.py new file mode 100644 index 0000000..b373a0c --- /dev/null +++ b/clever/models/school.py @@ -0,0 +1,500 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class School(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'str', + 'district': 'str', + 'high_grade': 'str', + 'id': 'str', + 'last_modified': 'str', + 'location': 'Location', + 'low_grade': 'str', + 'mdr_number': 'str', + 'name': 'str', + 'nces_id': 'str', + 'phone': 'str', + 'principal': 'Principal', + 'school_number': 'str', + 'sis_id': 'str', + 'state_id': 'str' + } + + attribute_map = { + 'created': 'created', + 'district': 'district', + 'high_grade': 'high_grade', + 'id': 'id', + 'last_modified': 'last_modified', + 'location': 'location', + 'low_grade': 'low_grade', + 'mdr_number': 'mdr_number', + 'name': 'name', + 'nces_id': 'nces_id', + 'phone': 'phone', + 'principal': 'principal', + 'school_number': 'school_number', + 'sis_id': 'sis_id', + 'state_id': 'state_id' + } + + def __init__(self, created=None, district=None, high_grade=None, id=None, last_modified=None, location=None, low_grade=None, mdr_number=None, name=None, nces_id=None, phone=None, principal=None, school_number=None, sis_id=None, state_id=None): + """ + School - a model defined in Swagger + """ + + self._created = None + self._district = None + self._high_grade = None + self._id = None + self._last_modified = None + self._location = None + self._low_grade = None + self._mdr_number = None + self._name = None + self._nces_id = None + self._phone = None + self._principal = None + self._school_number = None + self._sis_id = None + self._state_id = None + self.discriminator = None + + if created is not None: + self.created = created + if district is not None: + self.district = district + if high_grade is not None: + self.high_grade = high_grade + if id is not None: + self.id = id + if last_modified is not None: + self.last_modified = last_modified + if location is not None: + self.location = location + if low_grade is not None: + self.low_grade = low_grade + if mdr_number is not None: + self.mdr_number = mdr_number + if name is not None: + self.name = name + if nces_id is not None: + self.nces_id = nces_id + if phone is not None: + self.phone = phone + if principal is not None: + self.principal = principal + if school_number is not None: + self.school_number = school_number + if sis_id is not None: + self.sis_id = sis_id + if state_id is not None: + self.state_id = state_id + + @property + def created(self): + """ + Gets the created of this School. + + :return: The created of this School. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """ + Sets the created of this School. + + :param created: The created of this School. + :type: str + """ + + self._created = created + + @property + def district(self): + """ + Gets the district of this School. + + :return: The district of this School. + :rtype: str + """ + return self._district + + @district.setter + def district(self, district): + """ + Sets the district of this School. + + :param district: The district of this School. + :type: str + """ + + self._district = district + + @property + def high_grade(self): + """ + Gets the high_grade of this School. + + :return: The high_grade of this School. + :rtype: str + """ + return self._high_grade + + @high_grade.setter + def high_grade(self, high_grade): + """ + Sets the high_grade of this School. + + :param high_grade: The high_grade of this School. + :type: str + """ + allowed_values = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"] + if high_grade not in allowed_values: + raise ValueError( + "Invalid value for `high_grade` ({0}), must be one of {1}" + .format(high_grade, allowed_values) + ) + + self._high_grade = high_grade + + @property + def id(self): + """ + Gets the id of this School. + + :return: The id of this School. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this School. + + :param id: The id of this School. + :type: str + """ + + self._id = id + + @property + def last_modified(self): + """ + Gets the last_modified of this School. + + :return: The last_modified of this School. + :rtype: str + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """ + Sets the last_modified of this School. + + :param last_modified: The last_modified of this School. + :type: str + """ + + self._last_modified = last_modified + + @property + def location(self): + """ + Gets the location of this School. + + :return: The location of this School. + :rtype: Location + """ + return self._location + + @location.setter + def location(self, location): + """ + Sets the location of this School. + + :param location: The location of this School. + :type: Location + """ + + self._location = location + + @property + def low_grade(self): + """ + Gets the low_grade of this School. + + :return: The low_grade of this School. + :rtype: str + """ + return self._low_grade + + @low_grade.setter + def low_grade(self, low_grade): + """ + Sets the low_grade of this School. + + :param low_grade: The low_grade of this School. + :type: str + """ + allowed_values = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"] + if low_grade not in allowed_values: + raise ValueError( + "Invalid value for `low_grade` ({0}), must be one of {1}" + .format(low_grade, allowed_values) + ) + + self._low_grade = low_grade + + @property + def mdr_number(self): + """ + Gets the mdr_number of this School. + + :return: The mdr_number of this School. + :rtype: str + """ + return self._mdr_number + + @mdr_number.setter + def mdr_number(self, mdr_number): + """ + Sets the mdr_number of this School. + + :param mdr_number: The mdr_number of this School. + :type: str + """ + + self._mdr_number = mdr_number + + @property + def name(self): + """ + Gets the name of this School. + + :return: The name of this School. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this School. + + :param name: The name of this School. + :type: str + """ + + self._name = name + + @property + def nces_id(self): + """ + Gets the nces_id of this School. + + :return: The nces_id of this School. + :rtype: str + """ + return self._nces_id + + @nces_id.setter + def nces_id(self, nces_id): + """ + Sets the nces_id of this School. + + :param nces_id: The nces_id of this School. + :type: str + """ + + self._nces_id = nces_id + + @property + def phone(self): + """ + Gets the phone of this School. + + :return: The phone of this School. + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """ + Sets the phone of this School. + + :param phone: The phone of this School. + :type: str + """ + + self._phone = phone + + @property + def principal(self): + """ + Gets the principal of this School. + + :return: The principal of this School. + :rtype: Principal + """ + return self._principal + + @principal.setter + def principal(self, principal): + """ + Sets the principal of this School. + + :param principal: The principal of this School. + :type: Principal + """ + + self._principal = principal + + @property + def school_number(self): + """ + Gets the school_number of this School. + + :return: The school_number of this School. + :rtype: str + """ + return self._school_number + + @school_number.setter + def school_number(self, school_number): + """ + Sets the school_number of this School. + + :param school_number: The school_number of this School. + :type: str + """ + + self._school_number = school_number + + @property + def sis_id(self): + """ + Gets the sis_id of this School. + + :return: The sis_id of this School. + :rtype: str + """ + return self._sis_id + + @sis_id.setter + def sis_id(self, sis_id): + """ + Sets the sis_id of this School. + + :param sis_id: The sis_id of this School. + :type: str + """ + + self._sis_id = sis_id + + @property + def state_id(self): + """ + Gets the state_id of this School. + + :return: The state_id of this School. + :rtype: str + """ + return self._state_id + + @state_id.setter + def state_id(self, state_id): + """ + Sets the state_id of this School. + + :param state_id: The state_id of this School. + :type: str + """ + + self._state_id = state_id + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, School): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/school_admin.py b/clever/models/school_admin.py new file mode 100644 index 0000000..1a6a48f --- /dev/null +++ b/clever/models/school_admin.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SchoolAdmin(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'credentials': 'Credentials', + 'district': 'str', + 'email': 'str', + 'id': 'str', + 'name': 'Name', + 'schools': 'list[str]', + 'staff_id': 'str', + 'title': 'str' + } + + attribute_map = { + 'credentials': 'credentials', + 'district': 'district', + 'email': 'email', + 'id': 'id', + 'name': 'name', + 'schools': 'schools', + 'staff_id': 'staff_id', + 'title': 'title' + } + + def __init__(self, credentials=None, district=None, email=None, id=None, name=None, schools=None, staff_id=None, title=None): + """ + SchoolAdmin - a model defined in Swagger + """ + + self._credentials = None + self._district = None + self._email = None + self._id = None + self._name = None + self._schools = None + self._staff_id = None + self._title = None + self.discriminator = None + + if credentials is not None: + self.credentials = credentials + if district is not None: + self.district = district + if email is not None: + self.email = email + if id is not None: + self.id = id + if name is not None: + self.name = name + if schools is not None: + self.schools = schools + if staff_id is not None: + self.staff_id = staff_id + if title is not None: + self.title = title + + @property + def credentials(self): + """ + Gets the credentials of this SchoolAdmin. + + :return: The credentials of this SchoolAdmin. + :rtype: Credentials + """ + return self._credentials + + @credentials.setter + def credentials(self, credentials): + """ + Sets the credentials of this SchoolAdmin. + + :param credentials: The credentials of this SchoolAdmin. + :type: Credentials + """ + + self._credentials = credentials + + @property + def district(self): + """ + Gets the district of this SchoolAdmin. + + :return: The district of this SchoolAdmin. + :rtype: str + """ + return self._district + + @district.setter + def district(self, district): + """ + Sets the district of this SchoolAdmin. + + :param district: The district of this SchoolAdmin. + :type: str + """ + + self._district = district + + @property + def email(self): + """ + Gets the email of this SchoolAdmin. + + :return: The email of this SchoolAdmin. + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """ + Sets the email of this SchoolAdmin. + + :param email: The email of this SchoolAdmin. + :type: str + """ + + self._email = email + + @property + def id(self): + """ + Gets the id of this SchoolAdmin. + + :return: The id of this SchoolAdmin. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SchoolAdmin. + + :param id: The id of this SchoolAdmin. + :type: str + """ + + self._id = id + + @property + def name(self): + """ + Gets the name of this SchoolAdmin. + + :return: The name of this SchoolAdmin. + :rtype: Name + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this SchoolAdmin. + + :param name: The name of this SchoolAdmin. + :type: Name + """ + + self._name = name + + @property + def schools(self): + """ + Gets the schools of this SchoolAdmin. + + :return: The schools of this SchoolAdmin. + :rtype: list[str] + """ + return self._schools + + @schools.setter + def schools(self, schools): + """ + Sets the schools of this SchoolAdmin. + + :param schools: The schools of this SchoolAdmin. + :type: list[str] + """ + + self._schools = schools + + @property + def staff_id(self): + """ + Gets the staff_id of this SchoolAdmin. + + :return: The staff_id of this SchoolAdmin. + :rtype: str + """ + return self._staff_id + + @staff_id.setter + def staff_id(self, staff_id): + """ + Sets the staff_id of this SchoolAdmin. + + :param staff_id: The staff_id of this SchoolAdmin. + :type: str + """ + + self._staff_id = staff_id + + @property + def title(self): + """ + Gets the title of this SchoolAdmin. + + :return: The title of this SchoolAdmin. + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """ + Sets the title of this SchoolAdmin. + + :param title: The title of this SchoolAdmin. + :type: str + """ + + self._title = title + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolAdmin): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/school_admin_object.py b/clever/models/school_admin_object.py new file mode 100644 index 0000000..c20690d --- /dev/null +++ b/clever/models/school_admin_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SchoolAdminObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'SchoolAdmin' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + SchoolAdminObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this SchoolAdminObject. + + :return: The object of this SchoolAdminObject. + :rtype: SchoolAdmin + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this SchoolAdminObject. + + :param object: The object of this SchoolAdminObject. + :type: SchoolAdmin + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolAdminObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/school_admin_response.py b/clever/models/school_admin_response.py new file mode 100644 index 0000000..201b256 --- /dev/null +++ b/clever/models/school_admin_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SchoolAdminResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolAdmin' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolAdminResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolAdminResponse. + + :return: The data of this SchoolAdminResponse. + :rtype: SchoolAdmin + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolAdminResponse. + + :param data: The data of this SchoolAdminResponse. + :type: SchoolAdmin + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolAdminResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/school_admins_response.py b/clever/models/school_admins_response.py new file mode 100644 index 0000000..f510dab --- /dev/null +++ b/clever/models/school_admins_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SchoolAdminsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[SchoolAdminResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolAdminsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolAdminsResponse. + + :return: The data of this SchoolAdminsResponse. + :rtype: list[SchoolAdminResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolAdminsResponse. + + :param data: The data of this SchoolAdminsResponse. + :type: list[SchoolAdminResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolAdminsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/school_object.py b/clever/models/school_object.py new file mode 100644 index 0000000..8ef8696 --- /dev/null +++ b/clever/models/school_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SchoolObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'School' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + SchoolObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this SchoolObject. + + :return: The object of this SchoolObject. + :rtype: School + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this SchoolObject. + + :param object: The object of this SchoolObject. + :type: School + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/school_response.py b/clever/models/school_response.py new file mode 100644 index 0000000..ab154d5 --- /dev/null +++ b/clever/models/school_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SchoolResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'School' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolResponse. + + :return: The data of this SchoolResponse. + :rtype: School + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolResponse. + + :param data: The data of this SchoolResponse. + :type: School + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/schooladmins_created.py b/clever/models/schooladmins_created.py new file mode 100644 index 0000000..2f567a9 --- /dev/null +++ b/clever/models/schooladmins_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchooladminsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchooladminsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchooladminsCreated. + + :return: The data of this SchooladminsCreated. + :rtype: SchoolAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchooladminsCreated. + + :param data: The data of this SchooladminsCreated. + :type: SchoolAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchooladminsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/schooladmins_deleted.py b/clever/models/schooladmins_deleted.py new file mode 100644 index 0000000..31f3fe4 --- /dev/null +++ b/clever/models/schooladmins_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchooladminsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchooladminsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchooladminsDeleted. + + :return: The data of this SchooladminsDeleted. + :rtype: SchoolAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchooladminsDeleted. + + :param data: The data of this SchooladminsDeleted. + :type: SchoolAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchooladminsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/schooladmins_updated.py b/clever/models/schooladmins_updated.py new file mode 100644 index 0000000..de89a4f --- /dev/null +++ b/clever/models/schooladmins_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchooladminsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchooladminsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchooladminsUpdated. + + :return: The data of this SchooladminsUpdated. + :rtype: SchoolAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchooladminsUpdated. + + :param data: The data of this SchooladminsUpdated. + :type: SchoolAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchooladminsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/schools_created.py b/clever/models/schools_created.py new file mode 100644 index 0000000..0bdffd1 --- /dev/null +++ b/clever/models/schools_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchoolsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolsCreated. + + :return: The data of this SchoolsCreated. + :rtype: SchoolObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolsCreated. + + :param data: The data of this SchoolsCreated. + :type: SchoolObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/schools_deleted.py b/clever/models/schools_deleted.py new file mode 100644 index 0000000..99a7123 --- /dev/null +++ b/clever/models/schools_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchoolsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolsDeleted. + + :return: The data of this SchoolsDeleted. + :rtype: SchoolObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolsDeleted. + + :param data: The data of this SchoolsDeleted. + :type: SchoolObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/schools_response.py b/clever/models/schools_response.py new file mode 100644 index 0000000..3f0a1e0 --- /dev/null +++ b/clever/models/schools_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SchoolsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[SchoolResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolsResponse. + + :return: The data of this SchoolsResponse. + :rtype: list[SchoolResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolsResponse. + + :param data: The data of this SchoolsResponse. + :type: list[SchoolResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/schools_updated.py b/clever/models/schools_updated.py new file mode 100644 index 0000000..46ce732 --- /dev/null +++ b/clever/models/schools_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchoolsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolsUpdated. + + :return: The data of this SchoolsUpdated. + :rtype: SchoolObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolsUpdated. + + :param data: The data of this SchoolsUpdated. + :type: SchoolObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/section.py b/clever/models/section.py new file mode 100644 index 0000000..53ec25e --- /dev/null +++ b/clever/models/section.py @@ -0,0 +1,526 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Section(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'course': 'str', + 'created': 'str', + 'district': 'str', + 'grade': 'str', + 'id': 'str', + 'last_modified': 'str', + 'name': 'str', + 'period': 'str', + 'school': 'str', + 'section_number': 'str', + 'sis_id': 'str', + 'students': 'list[str]', + 'subject': 'str', + 'teacher': 'str', + 'teachers': 'list[str]', + 'term_id': 'str' + } + + attribute_map = { + 'course': 'course', + 'created': 'created', + 'district': 'district', + 'grade': 'grade', + 'id': 'id', + 'last_modified': 'last_modified', + 'name': 'name', + 'period': 'period', + 'school': 'school', + 'section_number': 'section_number', + 'sis_id': 'sis_id', + 'students': 'students', + 'subject': 'subject', + 'teacher': 'teacher', + 'teachers': 'teachers', + 'term_id': 'term_id' + } + + def __init__(self, course=None, created=None, district=None, grade=None, id=None, last_modified=None, name=None, period=None, school=None, section_number=None, sis_id=None, students=None, subject=None, teacher=None, teachers=None, term_id=None): + """ + Section - a model defined in Swagger + """ + + self._course = None + self._created = None + self._district = None + self._grade = None + self._id = None + self._last_modified = None + self._name = None + self._period = None + self._school = None + self._section_number = None + self._sis_id = None + self._students = None + self._subject = None + self._teacher = None + self._teachers = None + self._term_id = None + self.discriminator = None + + if course is not None: + self.course = course + if created is not None: + self.created = created + if district is not None: + self.district = district + if grade is not None: + self.grade = grade + if id is not None: + self.id = id + if last_modified is not None: + self.last_modified = last_modified + if name is not None: + self.name = name + if period is not None: + self.period = period + if school is not None: + self.school = school + if section_number is not None: + self.section_number = section_number + if sis_id is not None: + self.sis_id = sis_id + if students is not None: + self.students = students + if subject is not None: + self.subject = subject + if teacher is not None: + self.teacher = teacher + if teachers is not None: + self.teachers = teachers + if term_id is not None: + self.term_id = term_id + + @property + def course(self): + """ + Gets the course of this Section. + + :return: The course of this Section. + :rtype: str + """ + return self._course + + @course.setter + def course(self, course): + """ + Sets the course of this Section. + + :param course: The course of this Section. + :type: str + """ + + self._course = course + + @property + def created(self): + """ + Gets the created of this Section. + + :return: The created of this Section. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """ + Sets the created of this Section. + + :param created: The created of this Section. + :type: str + """ + + self._created = created + + @property + def district(self): + """ + Gets the district of this Section. + + :return: The district of this Section. + :rtype: str + """ + return self._district + + @district.setter + def district(self, district): + """ + Sets the district of this Section. + + :param district: The district of this Section. + :type: str + """ + + self._district = district + + @property + def grade(self): + """ + Gets the grade of this Section. + + :return: The grade of this Section. + :rtype: str + """ + return self._grade + + @grade.setter + def grade(self, grade): + """ + Sets the grade of this Section. + + :param grade: The grade of this Section. + :type: str + """ + allowed_values = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"] + if grade not in allowed_values: + raise ValueError( + "Invalid value for `grade` ({0}), must be one of {1}" + .format(grade, allowed_values) + ) + + self._grade = grade + + @property + def id(self): + """ + Gets the id of this Section. + + :return: The id of this Section. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Section. + + :param id: The id of this Section. + :type: str + """ + + self._id = id + + @property + def last_modified(self): + """ + Gets the last_modified of this Section. + + :return: The last_modified of this Section. + :rtype: str + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """ + Sets the last_modified of this Section. + + :param last_modified: The last_modified of this Section. + :type: str + """ + + self._last_modified = last_modified + + @property + def name(self): + """ + Gets the name of this Section. + + :return: The name of this Section. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Section. + + :param name: The name of this Section. + :type: str + """ + + self._name = name + + @property + def period(self): + """ + Gets the period of this Section. + + :return: The period of this Section. + :rtype: str + """ + return self._period + + @period.setter + def period(self, period): + """ + Sets the period of this Section. + + :param period: The period of this Section. + :type: str + """ + + self._period = period + + @property + def school(self): + """ + Gets the school of this Section. + + :return: The school of this Section. + :rtype: str + """ + return self._school + + @school.setter + def school(self, school): + """ + Sets the school of this Section. + + :param school: The school of this Section. + :type: str + """ + + self._school = school + + @property + def section_number(self): + """ + Gets the section_number of this Section. + + :return: The section_number of this Section. + :rtype: str + """ + return self._section_number + + @section_number.setter + def section_number(self, section_number): + """ + Sets the section_number of this Section. + + :param section_number: The section_number of this Section. + :type: str + """ + + self._section_number = section_number + + @property + def sis_id(self): + """ + Gets the sis_id of this Section. + + :return: The sis_id of this Section. + :rtype: str + """ + return self._sis_id + + @sis_id.setter + def sis_id(self, sis_id): + """ + Sets the sis_id of this Section. + + :param sis_id: The sis_id of this Section. + :type: str + """ + + self._sis_id = sis_id + + @property + def students(self): + """ + Gets the students of this Section. + + :return: The students of this Section. + :rtype: list[str] + """ + return self._students + + @students.setter + def students(self, students): + """ + Sets the students of this Section. + + :param students: The students of this Section. + :type: list[str] + """ + + self._students = students + + @property + def subject(self): + """ + Gets the subject of this Section. + + :return: The subject of this Section. + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this Section. + + :param subject: The subject of this Section. + :type: str + """ + allowed_values = ["english/language arts", "math", "science", "social studies", "language", "homeroom/advisory", "interventions/online learning", "technology and engineering", "PE and health", "arts and music", "other"] + if subject not in allowed_values: + raise ValueError( + "Invalid value for `subject` ({0}), must be one of {1}" + .format(subject, allowed_values) + ) + + self._subject = subject + + @property + def teacher(self): + """ + Gets the teacher of this Section. + + :return: The teacher of this Section. + :rtype: str + """ + return self._teacher + + @teacher.setter + def teacher(self, teacher): + """ + Sets the teacher of this Section. + + :param teacher: The teacher of this Section. + :type: str + """ + + self._teacher = teacher + + @property + def teachers(self): + """ + Gets the teachers of this Section. + + :return: The teachers of this Section. + :rtype: list[str] + """ + return self._teachers + + @teachers.setter + def teachers(self, teachers): + """ + Sets the teachers of this Section. + + :param teachers: The teachers of this Section. + :type: list[str] + """ + + self._teachers = teachers + + @property + def term_id(self): + """ + Gets the term_id of this Section. + + :return: The term_id of this Section. + :rtype: str + """ + return self._term_id + + @term_id.setter + def term_id(self, term_id): + """ + Sets the term_id of this Section. + + :param term_id: The term_id of this Section. + :type: str + """ + + self._term_id = term_id + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Section): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/section_object.py b/clever/models/section_object.py new file mode 100644 index 0000000..cb0999d --- /dev/null +++ b/clever/models/section_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SectionObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'Section' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + SectionObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this SectionObject. + + :return: The object of this SectionObject. + :rtype: Section + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this SectionObject. + + :param object: The object of this SectionObject. + :type: Section + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/section_response.py b/clever/models/section_response.py new file mode 100644 index 0000000..2be7a34 --- /dev/null +++ b/clever/models/section_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SectionResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'Section' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionResponse. + + :return: The data of this SectionResponse. + :rtype: Section + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionResponse. + + :param data: The data of this SectionResponse. + :type: Section + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/sections_created.py b/clever/models/sections_created.py new file mode 100644 index 0000000..a7d4356 --- /dev/null +++ b/clever/models/sections_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SectionsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SectionObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionsCreated. + + :return: The data of this SectionsCreated. + :rtype: SectionObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionsCreated. + + :param data: The data of this SectionsCreated. + :type: SectionObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/sections_deleted.py b/clever/models/sections_deleted.py new file mode 100644 index 0000000..343b1ca --- /dev/null +++ b/clever/models/sections_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SectionsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SectionObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionsDeleted. + + :return: The data of this SectionsDeleted. + :rtype: SectionObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionsDeleted. + + :param data: The data of this SectionsDeleted. + :type: SectionObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/sections_response.py b/clever/models/sections_response.py new file mode 100644 index 0000000..e7a4647 --- /dev/null +++ b/clever/models/sections_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SectionsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[SectionResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionsResponse. + + :return: The data of this SectionsResponse. + :rtype: list[SectionResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionsResponse. + + :param data: The data of this SectionsResponse. + :type: list[SectionResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/sections_updated.py b/clever/models/sections_updated.py new file mode 100644 index 0000000..dfbca8b --- /dev/null +++ b/clever/models/sections_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SectionsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SectionObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionsUpdated. + + :return: The data of this SectionsUpdated. + :rtype: SectionObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionsUpdated. + + :param data: The data of this SectionsUpdated. + :type: SectionObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/student.py b/clever/models/student.py new file mode 100644 index 0000000..cd04ec7 --- /dev/null +++ b/clever/models/student.py @@ -0,0 +1,758 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Student(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'str', + 'credentials': 'Credentials', + 'district': 'str', + 'dob': 'str', + 'ell_status': 'str', + 'email': 'str', + 'gender': 'str', + 'grade': 'str', + 'graduation_year': 'str', + 'hispanic_ethnicity': 'str', + 'home_language': 'str', + 'id': 'str', + 'iep_status': 'str', + 'last_modified': 'str', + 'location': 'Location', + 'name': 'Name', + 'race': 'str', + 'school': 'str', + 'schools': 'list[str]', + 'sis_id': 'str', + 'state_id': 'str', + 'student_number': 'str', + 'unweighted_gpa': 'str', + 'weighted_gpa': 'str' + } + + attribute_map = { + 'created': 'created', + 'credentials': 'credentials', + 'district': 'district', + 'dob': 'dob', + 'ell_status': 'ell_status', + 'email': 'email', + 'gender': 'gender', + 'grade': 'grade', + 'graduation_year': 'graduation_year', + 'hispanic_ethnicity': 'hispanic_ethnicity', + 'home_language': 'home_language', + 'id': 'id', + 'iep_status': 'iep_status', + 'last_modified': 'last_modified', + 'location': 'location', + 'name': 'name', + 'race': 'race', + 'school': 'school', + 'schools': 'schools', + 'sis_id': 'sis_id', + 'state_id': 'state_id', + 'student_number': 'student_number', + 'unweighted_gpa': 'unweighted_gpa', + 'weighted_gpa': 'weighted_gpa' + } + + def __init__(self, created=None, credentials=None, district=None, dob=None, ell_status=None, email=None, gender=None, grade=None, graduation_year=None, hispanic_ethnicity=None, home_language=None, id=None, iep_status=None, last_modified=None, location=None, name=None, race=None, school=None, schools=None, sis_id=None, state_id=None, student_number=None, unweighted_gpa=None, weighted_gpa=None): + """ + Student - a model defined in Swagger + """ + + self._created = None + self._credentials = None + self._district = None + self._dob = None + self._ell_status = None + self._email = None + self._gender = None + self._grade = None + self._graduation_year = None + self._hispanic_ethnicity = None + self._home_language = None + self._id = None + self._iep_status = None + self._last_modified = None + self._location = None + self._name = None + self._race = None + self._school = None + self._schools = None + self._sis_id = None + self._state_id = None + self._student_number = None + self._unweighted_gpa = None + self._weighted_gpa = None + self.discriminator = None + + if created is not None: + self.created = created + if credentials is not None: + self.credentials = credentials + if district is not None: + self.district = district + if dob is not None: + self.dob = dob + if ell_status is not None: + self.ell_status = ell_status + if email is not None: + self.email = email + if gender is not None: + self.gender = gender + if grade is not None: + self.grade = grade + if graduation_year is not None: + self.graduation_year = graduation_year + if hispanic_ethnicity is not None: + self.hispanic_ethnicity = hispanic_ethnicity + if home_language is not None: + self.home_language = home_language + if id is not None: + self.id = id + if iep_status is not None: + self.iep_status = iep_status + if last_modified is not None: + self.last_modified = last_modified + if location is not None: + self.location = location + if name is not None: + self.name = name + if race is not None: + self.race = race + if school is not None: + self.school = school + if schools is not None: + self.schools = schools + if sis_id is not None: + self.sis_id = sis_id + if state_id is not None: + self.state_id = state_id + if student_number is not None: + self.student_number = student_number + if unweighted_gpa is not None: + self.unweighted_gpa = unweighted_gpa + if weighted_gpa is not None: + self.weighted_gpa = weighted_gpa + + @property + def created(self): + """ + Gets the created of this Student. + + :return: The created of this Student. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """ + Sets the created of this Student. + + :param created: The created of this Student. + :type: str + """ + + self._created = created + + @property + def credentials(self): + """ + Gets the credentials of this Student. + + :return: The credentials of this Student. + :rtype: Credentials + """ + return self._credentials + + @credentials.setter + def credentials(self, credentials): + """ + Sets the credentials of this Student. + + :param credentials: The credentials of this Student. + :type: Credentials + """ + + self._credentials = credentials + + @property + def district(self): + """ + Gets the district of this Student. + + :return: The district of this Student. + :rtype: str + """ + return self._district + + @district.setter + def district(self, district): + """ + Sets the district of this Student. + + :param district: The district of this Student. + :type: str + """ + + self._district = district + + @property + def dob(self): + """ + Gets the dob of this Student. + + :return: The dob of this Student. + :rtype: str + """ + return self._dob + + @dob.setter + def dob(self, dob): + """ + Sets the dob of this Student. + + :param dob: The dob of this Student. + :type: str + """ + + self._dob = dob + + @property + def ell_status(self): + """ + Gets the ell_status of this Student. + + :return: The ell_status of this Student. + :rtype: str + """ + return self._ell_status + + @ell_status.setter + def ell_status(self, ell_status): + """ + Sets the ell_status of this Student. + + :param ell_status: The ell_status of this Student. + :type: str + """ + allowed_values = ["Y", "N", ""] + if ell_status not in allowed_values: + raise ValueError( + "Invalid value for `ell_status` ({0}), must be one of {1}" + .format(ell_status, allowed_values) + ) + + self._ell_status = ell_status + + @property + def email(self): + """ + Gets the email of this Student. + + :return: The email of this Student. + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """ + Sets the email of this Student. + + :param email: The email of this Student. + :type: str + """ + + self._email = email + + @property + def gender(self): + """ + Gets the gender of this Student. + + :return: The gender of this Student. + :rtype: str + """ + return self._gender + + @gender.setter + def gender(self, gender): + """ + Sets the gender of this Student. + + :param gender: The gender of this Student. + :type: str + """ + allowed_values = ["M", "F", ""] + if gender not in allowed_values: + raise ValueError( + "Invalid value for `gender` ({0}), must be one of {1}" + .format(gender, allowed_values) + ) + + self._gender = gender + + @property + def grade(self): + """ + Gets the grade of this Student. + + :return: The grade of this Student. + :rtype: str + """ + return self._grade + + @grade.setter + def grade(self, grade): + """ + Sets the grade of this Student. + + :param grade: The grade of this Student. + :type: str + """ + allowed_values = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"] + if grade not in allowed_values: + raise ValueError( + "Invalid value for `grade` ({0}), must be one of {1}" + .format(grade, allowed_values) + ) + + self._grade = grade + + @property + def graduation_year(self): + """ + Gets the graduation_year of this Student. + + :return: The graduation_year of this Student. + :rtype: str + """ + return self._graduation_year + + @graduation_year.setter + def graduation_year(self, graduation_year): + """ + Sets the graduation_year of this Student. + + :param graduation_year: The graduation_year of this Student. + :type: str + """ + + self._graduation_year = graduation_year + + @property + def hispanic_ethnicity(self): + """ + Gets the hispanic_ethnicity of this Student. + + :return: The hispanic_ethnicity of this Student. + :rtype: str + """ + return self._hispanic_ethnicity + + @hispanic_ethnicity.setter + def hispanic_ethnicity(self, hispanic_ethnicity): + """ + Sets the hispanic_ethnicity of this Student. + + :param hispanic_ethnicity: The hispanic_ethnicity of this Student. + :type: str + """ + allowed_values = ["Y", "N", ""] + if hispanic_ethnicity not in allowed_values: + raise ValueError( + "Invalid value for `hispanic_ethnicity` ({0}), must be one of {1}" + .format(hispanic_ethnicity, allowed_values) + ) + + self._hispanic_ethnicity = hispanic_ethnicity + + @property + def home_language(self): + """ + Gets the home_language of this Student. + + :return: The home_language of this Student. + :rtype: str + """ + return self._home_language + + @home_language.setter + def home_language(self, home_language): + """ + Sets the home_language of this Student. + + :param home_language: The home_language of this Student. + :type: str + """ + allowed_values = ["English", "Albanian", "Amharic", "Arabic", "Bengali", "Bosnian", "Burmese", "Cantonese", "Chinese", "Dutch", "Farsi", "French", "German", "Hebrew", "Hindi", "Hmong", "Ilocano", "Japanese", "Javanese", "Karen", "Khmer", "Korean", "Laotian", "Latvian", "Malay", "Mandarin", "Nepali", "Oromo", "Polish", "Portuguese", "Punjabi", "Romanian", "Russian", "Samoan", "Serbian", "Somali", "Spanish", "Swahili", "Tagalog", "Tamil", "Telugu", "Thai", "Tigrinya", "Turkish", "Ukrainian", "Urdu", "Vietnamese"] + if home_language not in allowed_values: + raise ValueError( + "Invalid value for `home_language` ({0}), must be one of {1}" + .format(home_language, allowed_values) + ) + + self._home_language = home_language + + @property + def id(self): + """ + Gets the id of this Student. + + :return: The id of this Student. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Student. + + :param id: The id of this Student. + :type: str + """ + + self._id = id + + @property + def iep_status(self): + """ + Gets the iep_status of this Student. + + :return: The iep_status of this Student. + :rtype: str + """ + return self._iep_status + + @iep_status.setter + def iep_status(self, iep_status): + """ + Sets the iep_status of this Student. + + :param iep_status: The iep_status of this Student. + :type: str + """ + + self._iep_status = iep_status + + @property + def last_modified(self): + """ + Gets the last_modified of this Student. + + :return: The last_modified of this Student. + :rtype: str + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """ + Sets the last_modified of this Student. + + :param last_modified: The last_modified of this Student. + :type: str + """ + + self._last_modified = last_modified + + @property + def location(self): + """ + Gets the location of this Student. + + :return: The location of this Student. + :rtype: Location + """ + return self._location + + @location.setter + def location(self, location): + """ + Sets the location of this Student. + + :param location: The location of this Student. + :type: Location + """ + + self._location = location + + @property + def name(self): + """ + Gets the name of this Student. + + :return: The name of this Student. + :rtype: Name + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Student. + + :param name: The name of this Student. + :type: Name + """ + + self._name = name + + @property + def race(self): + """ + Gets the race of this Student. + + :return: The race of this Student. + :rtype: str + """ + return self._race + + @race.setter + def race(self, race): + """ + Sets the race of this Student. + + :param race: The race of this Student. + :type: str + """ + allowed_values = ["Caucasian", "Asian", "Black or African American", "American Indian", "Hawaiian or Other Pacific Islander", "Two or More Races", "Unknown", ""] + if race not in allowed_values: + raise ValueError( + "Invalid value for `race` ({0}), must be one of {1}" + .format(race, allowed_values) + ) + + self._race = race + + @property + def school(self): + """ + Gets the school of this Student. + + :return: The school of this Student. + :rtype: str + """ + return self._school + + @school.setter + def school(self, school): + """ + Sets the school of this Student. + + :param school: The school of this Student. + :type: str + """ + + self._school = school + + @property + def schools(self): + """ + Gets the schools of this Student. + + :return: The schools of this Student. + :rtype: list[str] + """ + return self._schools + + @schools.setter + def schools(self, schools): + """ + Sets the schools of this Student. + + :param schools: The schools of this Student. + :type: list[str] + """ + + self._schools = schools + + @property + def sis_id(self): + """ + Gets the sis_id of this Student. + + :return: The sis_id of this Student. + :rtype: str + """ + return self._sis_id + + @sis_id.setter + def sis_id(self, sis_id): + """ + Sets the sis_id of this Student. + + :param sis_id: The sis_id of this Student. + :type: str + """ + + self._sis_id = sis_id + + @property + def state_id(self): + """ + Gets the state_id of this Student. + + :return: The state_id of this Student. + :rtype: str + """ + return self._state_id + + @state_id.setter + def state_id(self, state_id): + """ + Sets the state_id of this Student. + + :param state_id: The state_id of this Student. + :type: str + """ + + self._state_id = state_id + + @property + def student_number(self): + """ + Gets the student_number of this Student. + + :return: The student_number of this Student. + :rtype: str + """ + return self._student_number + + @student_number.setter + def student_number(self, student_number): + """ + Sets the student_number of this Student. + + :param student_number: The student_number of this Student. + :type: str + """ + + self._student_number = student_number + + @property + def unweighted_gpa(self): + """ + Gets the unweighted_gpa of this Student. + + :return: The unweighted_gpa of this Student. + :rtype: str + """ + return self._unweighted_gpa + + @unweighted_gpa.setter + def unweighted_gpa(self, unweighted_gpa): + """ + Sets the unweighted_gpa of this Student. + + :param unweighted_gpa: The unweighted_gpa of this Student. + :type: str + """ + + self._unweighted_gpa = unweighted_gpa + + @property + def weighted_gpa(self): + """ + Gets the weighted_gpa of this Student. + + :return: The weighted_gpa of this Student. + :rtype: str + """ + return self._weighted_gpa + + @weighted_gpa.setter + def weighted_gpa(self, weighted_gpa): + """ + Sets the weighted_gpa of this Student. + + :param weighted_gpa: The weighted_gpa of this Student. + :type: str + """ + + self._weighted_gpa = weighted_gpa + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Student): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/student_object.py b/clever/models/student_object.py new file mode 100644 index 0000000..f2971b9 --- /dev/null +++ b/clever/models/student_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class StudentObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'Student' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + StudentObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this StudentObject. + + :return: The object of this StudentObject. + :rtype: Student + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this StudentObject. + + :param object: The object of this StudentObject. + :type: Student + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/student_response.py b/clever/models/student_response.py new file mode 100644 index 0000000..b706431 --- /dev/null +++ b/clever/models/student_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class StudentResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'Student' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentResponse. + + :return: The data of this StudentResponse. + :rtype: Student + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentResponse. + + :param data: The data of this StudentResponse. + :type: Student + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/students_created.py b/clever/models/students_created.py new file mode 100644 index 0000000..536b798 --- /dev/null +++ b/clever/models/students_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class StudentsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'StudentObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentsCreated. + + :return: The data of this StudentsCreated. + :rtype: StudentObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentsCreated. + + :param data: The data of this StudentsCreated. + :type: StudentObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/students_deleted.py b/clever/models/students_deleted.py new file mode 100644 index 0000000..bfef358 --- /dev/null +++ b/clever/models/students_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class StudentsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'StudentObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentsDeleted. + + :return: The data of this StudentsDeleted. + :rtype: StudentObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentsDeleted. + + :param data: The data of this StudentsDeleted. + :type: StudentObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/students_response.py b/clever/models/students_response.py new file mode 100644 index 0000000..c06e4d5 --- /dev/null +++ b/clever/models/students_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class StudentsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[StudentResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentsResponse. + + :return: The data of this StudentsResponse. + :rtype: list[StudentResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentsResponse. + + :param data: The data of this StudentsResponse. + :type: list[StudentResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/students_updated.py b/clever/models/students_updated.py new file mode 100644 index 0000000..fdc80a3 --- /dev/null +++ b/clever/models/students_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class StudentsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'StudentObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentsUpdated. + + :return: The data of this StudentsUpdated. + :rtype: StudentObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentsUpdated. + + :param data: The data of this StudentsUpdated. + :type: StudentObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/teacher.py b/clever/models/teacher.py new file mode 100644 index 0000000..a93781a --- /dev/null +++ b/clever/models/teacher.py @@ -0,0 +1,436 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Teacher(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'str', + 'credentials': 'Credentials', + 'district': 'str', + 'email': 'str', + 'id': 'str', + 'last_modified': 'str', + 'name': 'Name', + 'school': 'str', + 'schools': 'list[str]', + 'sis_id': 'str', + 'state_id': 'str', + 'teacher_number': 'str', + 'title': 'str' + } + + attribute_map = { + 'created': 'created', + 'credentials': 'credentials', + 'district': 'district', + 'email': 'email', + 'id': 'id', + 'last_modified': 'last_modified', + 'name': 'name', + 'school': 'school', + 'schools': 'schools', + 'sis_id': 'sis_id', + 'state_id': 'state_id', + 'teacher_number': 'teacher_number', + 'title': 'title' + } + + def __init__(self, created=None, credentials=None, district=None, email=None, id=None, last_modified=None, name=None, school=None, schools=None, sis_id=None, state_id=None, teacher_number=None, title=None): + """ + Teacher - a model defined in Swagger + """ + + self._created = None + self._credentials = None + self._district = None + self._email = None + self._id = None + self._last_modified = None + self._name = None + self._school = None + self._schools = None + self._sis_id = None + self._state_id = None + self._teacher_number = None + self._title = None + self.discriminator = None + + if created is not None: + self.created = created + if credentials is not None: + self.credentials = credentials + if district is not None: + self.district = district + if email is not None: + self.email = email + if id is not None: + self.id = id + if last_modified is not None: + self.last_modified = last_modified + if name is not None: + self.name = name + if school is not None: + self.school = school + if schools is not None: + self.schools = schools + if sis_id is not None: + self.sis_id = sis_id + if state_id is not None: + self.state_id = state_id + if teacher_number is not None: + self.teacher_number = teacher_number + if title is not None: + self.title = title + + @property + def created(self): + """ + Gets the created of this Teacher. + + :return: The created of this Teacher. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """ + Sets the created of this Teacher. + + :param created: The created of this Teacher. + :type: str + """ + + self._created = created + + @property + def credentials(self): + """ + Gets the credentials of this Teacher. + + :return: The credentials of this Teacher. + :rtype: Credentials + """ + return self._credentials + + @credentials.setter + def credentials(self, credentials): + """ + Sets the credentials of this Teacher. + + :param credentials: The credentials of this Teacher. + :type: Credentials + """ + + self._credentials = credentials + + @property + def district(self): + """ + Gets the district of this Teacher. + + :return: The district of this Teacher. + :rtype: str + """ + return self._district + + @district.setter + def district(self, district): + """ + Sets the district of this Teacher. + + :param district: The district of this Teacher. + :type: str + """ + + self._district = district + + @property + def email(self): + """ + Gets the email of this Teacher. + + :return: The email of this Teacher. + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """ + Sets the email of this Teacher. + + :param email: The email of this Teacher. + :type: str + """ + + self._email = email + + @property + def id(self): + """ + Gets the id of this Teacher. + + :return: The id of this Teacher. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Teacher. + + :param id: The id of this Teacher. + :type: str + """ + + self._id = id + + @property + def last_modified(self): + """ + Gets the last_modified of this Teacher. + + :return: The last_modified of this Teacher. + :rtype: str + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """ + Sets the last_modified of this Teacher. + + :param last_modified: The last_modified of this Teacher. + :type: str + """ + + self._last_modified = last_modified + + @property + def name(self): + """ + Gets the name of this Teacher. + + :return: The name of this Teacher. + :rtype: Name + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Teacher. + + :param name: The name of this Teacher. + :type: Name + """ + + self._name = name + + @property + def school(self): + """ + Gets the school of this Teacher. + + :return: The school of this Teacher. + :rtype: str + """ + return self._school + + @school.setter + def school(self, school): + """ + Sets the school of this Teacher. + + :param school: The school of this Teacher. + :type: str + """ + + self._school = school + + @property + def schools(self): + """ + Gets the schools of this Teacher. + + :return: The schools of this Teacher. + :rtype: list[str] + """ + return self._schools + + @schools.setter + def schools(self, schools): + """ + Sets the schools of this Teacher. + + :param schools: The schools of this Teacher. + :type: list[str] + """ + + self._schools = schools + + @property + def sis_id(self): + """ + Gets the sis_id of this Teacher. + + :return: The sis_id of this Teacher. + :rtype: str + """ + return self._sis_id + + @sis_id.setter + def sis_id(self, sis_id): + """ + Sets the sis_id of this Teacher. + + :param sis_id: The sis_id of this Teacher. + :type: str + """ + + self._sis_id = sis_id + + @property + def state_id(self): + """ + Gets the state_id of this Teacher. + + :return: The state_id of this Teacher. + :rtype: str + """ + return self._state_id + + @state_id.setter + def state_id(self, state_id): + """ + Sets the state_id of this Teacher. + + :param state_id: The state_id of this Teacher. + :type: str + """ + + self._state_id = state_id + + @property + def teacher_number(self): + """ + Gets the teacher_number of this Teacher. + + :return: The teacher_number of this Teacher. + :rtype: str + """ + return self._teacher_number + + @teacher_number.setter + def teacher_number(self, teacher_number): + """ + Sets the teacher_number of this Teacher. + + :param teacher_number: The teacher_number of this Teacher. + :type: str + """ + + self._teacher_number = teacher_number + + @property + def title(self): + """ + Gets the title of this Teacher. + + :return: The title of this Teacher. + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """ + Sets the title of this Teacher. + + :param title: The title of this Teacher. + :type: str + """ + + self._title = title + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Teacher): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/teacher_object.py b/clever/models/teacher_object.py new file mode 100644 index 0000000..3edcd61 --- /dev/null +++ b/clever/models/teacher_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class TeacherObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'Teacher' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + TeacherObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this TeacherObject. + + :return: The object of this TeacherObject. + :rtype: Teacher + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this TeacherObject. + + :param object: The object of this TeacherObject. + :type: Teacher + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeacherObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/teacher_response.py b/clever/models/teacher_response.py new file mode 100644 index 0000000..59530a2 --- /dev/null +++ b/clever/models/teacher_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class TeacherResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'Teacher' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeacherResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeacherResponse. + + :return: The data of this TeacherResponse. + :rtype: Teacher + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeacherResponse. + + :param data: The data of this TeacherResponse. + :type: Teacher + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeacherResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/teachers_created.py b/clever/models/teachers_created.py new file mode 100644 index 0000000..729454b --- /dev/null +++ b/clever/models/teachers_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TeachersCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TeacherObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeachersCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeachersCreated. + + :return: The data of this TeachersCreated. + :rtype: TeacherObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeachersCreated. + + :param data: The data of this TeachersCreated. + :type: TeacherObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeachersCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/teachers_deleted.py b/clever/models/teachers_deleted.py new file mode 100644 index 0000000..1043ac0 --- /dev/null +++ b/clever/models/teachers_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TeachersDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TeacherObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeachersDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeachersDeleted. + + :return: The data of this TeachersDeleted. + :rtype: TeacherObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeachersDeleted. + + :param data: The data of this TeachersDeleted. + :type: TeacherObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeachersDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/teachers_response.py b/clever/models/teachers_response.py new file mode 100644 index 0000000..bcf98d4 --- /dev/null +++ b/clever/models/teachers_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class TeachersResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[TeacherResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeachersResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeachersResponse. + + :return: The data of this TeachersResponse. + :rtype: list[TeacherResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeachersResponse. + + :param data: The data of this TeachersResponse. + :type: list[TeacherResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeachersResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/teachers_updated.py b/clever/models/teachers_updated.py new file mode 100644 index 0000000..4ad0458 --- /dev/null +++ b/clever/models/teachers_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TeachersUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TeacherObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeachersUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeachersUpdated. + + :return: The data of this TeachersUpdated. + :rtype: TeacherObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeachersUpdated. + + :param data: The data of this TeachersUpdated. + :type: TeacherObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeachersUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/term.py b/clever/models/term.py new file mode 100644 index 0000000..b82c839 --- /dev/null +++ b/clever/models/term.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Term(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'end_date': 'str', + 'id': 'str', + 'name': 'str', + 'start_date': 'str' + } + + attribute_map = { + 'end_date': 'end_date', + 'id': 'id', + 'name': 'name', + 'start_date': 'start_date' + } + + def __init__(self, end_date=None, id=None, name=None, start_date=None): + """ + Term - a model defined in Swagger + """ + + self._end_date = None + self._id = None + self._name = None + self._start_date = None + self.discriminator = None + + if end_date is not None: + self.end_date = end_date + if id is not None: + self.id = id + if name is not None: + self.name = name + if start_date is not None: + self.start_date = start_date + + @property + def end_date(self): + """ + Gets the end_date of this Term. + + :return: The end_date of this Term. + :rtype: str + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this Term. + + :param end_date: The end_date of this Term. + :type: str + """ + + self._end_date = end_date + + @property + def id(self): + """ + Gets the id of this Term. + + :return: The id of this Term. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Term. + + :param id: The id of this Term. + :type: str + """ + + self._id = id + + @property + def name(self): + """ + Gets the name of this Term. + + :return: The name of this Term. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Term. + + :param name: The name of this Term. + :type: str + """ + + self._name = name + + @property + def start_date(self): + """ + Gets the start_date of this Term. + + :return: The start_date of this Term. + :rtype: str + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this Term. + + :param start_date: The start_date of this Term. + :type: str + """ + + self._start_date = start_date + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Term): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/term_object.py b/clever/models/term_object.py new file mode 100644 index 0000000..6db7319 --- /dev/null +++ b/clever/models/term_object.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class TermObject(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object': 'Term' + } + + attribute_map = { + 'object': 'object' + } + + def __init__(self, object=None): + """ + TermObject - a model defined in Swagger + """ + + self._object = None + self.discriminator = None + + if object is not None: + self.object = object + + @property + def object(self): + """ + Gets the object of this TermObject. + + :return: The object of this TermObject. + :rtype: Term + """ + return self._object + + @object.setter + def object(self, object): + """ + Sets the object of this TermObject. + + :param object: The object of this TermObject. + :type: Term + """ + + self._object = object + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermObject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/term_response.py b/clever/models/term_response.py new file mode 100644 index 0000000..3dbb27d --- /dev/null +++ b/clever/models/term_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class TermResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'Term' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermResponse. + + :return: The data of this TermResponse. + :rtype: Term + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermResponse. + + :param data: The data of this TermResponse. + :type: Term + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/terms_created.py b/clever/models/terms_created.py new file mode 100644 index 0000000..7dac9d1 --- /dev/null +++ b/clever/models/terms_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TermsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TermObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermsCreated. + + :return: The data of this TermsCreated. + :rtype: TermObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermsCreated. + + :param data: The data of this TermsCreated. + :type: TermObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/terms_deleted.py b/clever/models/terms_deleted.py new file mode 100644 index 0000000..7edd24d --- /dev/null +++ b/clever/models/terms_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TermsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TermObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermsDeleted. + + :return: The data of this TermsDeleted. + :rtype: TermObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermsDeleted. + + :param data: The data of this TermsDeleted. + :type: TermObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/terms_response.py b/clever/models/terms_response.py new file mode 100644 index 0000000..078053f --- /dev/null +++ b/clever/models/terms_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class TermsResponse(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[TermResponse]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermsResponse - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermsResponse. + + :return: The data of this TermsResponse. + :rtype: list[TermResponse] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermsResponse. + + :param data: The data of this TermsResponse. + :type: list[TermResponse] + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/models/terms_updated.py b/clever/models/terms_updated.py new file mode 100644 index 0000000..55dc58f --- /dev/null +++ b/clever/models/terms_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TermsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TermObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermsUpdated. + + :return: The data of this TermsUpdated. + :rtype: TermObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermsUpdated. + + :param data: The data of this TermsUpdated. + :type: TermObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/clever/rest.py b/clever/rest.py new file mode 100644 index 0000000..e84b148 --- /dev/null +++ b/clever/rest.py @@ -0,0 +1,311 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import ssl +import certifi +import logging +import re + +# python 2 and python 3 compatibility library +from six import PY3 +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """ + Returns a dictionary of the response headers. + """ + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """ + Returns a given response header. + """ + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 + # maxsize is the number of requests to host that are allowed in parallel + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, _request_timeout=None): + """ + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without + reading/decoding response data. Default is True. + :param _request_timeout: timeout setting for this request. If one number provided, it will be total request + timeout. It can also be a pair (tuple) of (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if PY3 else (int, long)): + timeout = urllib3.Timeout(total=_request_timeout) + elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: + timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request(method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': + r = self.pool_manager.request(method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct Content-Type + # which generated by urllib3 will be overwritten. + del headers['Content-Type'] + r = self.pool_manager.request(method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is provided + # in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request(method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided arguments. + Please check that your arguments match declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, + _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, + _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, + _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, + _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """ + Custom error messages for exception + """ + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format(self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/docs/BadRequest.md b/docs/BadRequest.md new file mode 100644 index 0000000..680c873 --- /dev/null +++ b/docs/BadRequest.md @@ -0,0 +1,10 @@ +# BadRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Contact.md b/docs/Contact.md new file mode 100644 index 0000000..2972e78 --- /dev/null +++ b/docs/Contact.md @@ -0,0 +1,19 @@ +# Contact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**district** | **str** | | [optional] +**email** | **str** | | [optional] +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**phone** | **str** | | [optional] +**phone_type** | **str** | | [optional] +**relationship** | **str** | | [optional] +**sis_id** | **str** | | [optional] +**students** | **list[str]** | | [optional] +**type** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/ContactObject.md b/docs/ContactObject.md new file mode 100644 index 0000000..37c70dc --- /dev/null +++ b/docs/ContactObject.md @@ -0,0 +1,10 @@ +# ContactObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**Contact**](Contact.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/ContactResponse.md b/docs/ContactResponse.md new file mode 100644 index 0000000..b173502 --- /dev/null +++ b/docs/ContactResponse.md @@ -0,0 +1,10 @@ +# ContactResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Contact**](Contact.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/ContactsCreated.md b/docs/ContactsCreated.md new file mode 100644 index 0000000..27cd0c7 --- /dev/null +++ b/docs/ContactsCreated.md @@ -0,0 +1,10 @@ +# ContactsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ContactObject**](ContactObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/ContactsDeleted.md b/docs/ContactsDeleted.md new file mode 100644 index 0000000..5e6166c --- /dev/null +++ b/docs/ContactsDeleted.md @@ -0,0 +1,10 @@ +# ContactsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ContactObject**](ContactObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/ContactsResponse.md b/docs/ContactsResponse.md new file mode 100644 index 0000000..049b308 --- /dev/null +++ b/docs/ContactsResponse.md @@ -0,0 +1,10 @@ +# ContactsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[ContactResponse]**](ContactResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/ContactsUpdated.md b/docs/ContactsUpdated.md new file mode 100644 index 0000000..09fa051 --- /dev/null +++ b/docs/ContactsUpdated.md @@ -0,0 +1,10 @@ +# ContactsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ContactObject**](ContactObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Course.md b/docs/Course.md new file mode 100644 index 0000000..ed054a6 --- /dev/null +++ b/docs/Course.md @@ -0,0 +1,12 @@ +# Course + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**number** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/CourseObject.md b/docs/CourseObject.md new file mode 100644 index 0000000..983b8d1 --- /dev/null +++ b/docs/CourseObject.md @@ -0,0 +1,10 @@ +# CourseObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**Course**](Course.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/CourseResponse.md b/docs/CourseResponse.md new file mode 100644 index 0000000..230fcfe --- /dev/null +++ b/docs/CourseResponse.md @@ -0,0 +1,10 @@ +# CourseResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Course**](Course.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/CoursesCreated.md b/docs/CoursesCreated.md new file mode 100644 index 0000000..dbaf9dc --- /dev/null +++ b/docs/CoursesCreated.md @@ -0,0 +1,10 @@ +# CoursesCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**CourseObject**](CourseObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/CoursesDeleted.md b/docs/CoursesDeleted.md new file mode 100644 index 0000000..9012ebd --- /dev/null +++ b/docs/CoursesDeleted.md @@ -0,0 +1,10 @@ +# CoursesDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**CourseObject**](CourseObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/CoursesResponse.md b/docs/CoursesResponse.md new file mode 100644 index 0000000..7342963 --- /dev/null +++ b/docs/CoursesResponse.md @@ -0,0 +1,10 @@ +# CoursesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[CourseResponse]**](CourseResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/CoursesUpdated.md b/docs/CoursesUpdated.md new file mode 100644 index 0000000..ff6b0ec --- /dev/null +++ b/docs/CoursesUpdated.md @@ -0,0 +1,10 @@ +# CoursesUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**CourseObject**](CourseObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Credentials.md b/docs/Credentials.md new file mode 100644 index 0000000..86ff927 --- /dev/null +++ b/docs/Credentials.md @@ -0,0 +1,10 @@ +# Credentials + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**district_username** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DataApi.md b/docs/DataApi.md new file mode 100644 index 0000000..e0f904d --- /dev/null +++ b/docs/DataApi.md @@ -0,0 +1,2788 @@ +# clever.DataApi + +All URIs are relative to *https://api.clever.com/v2.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_contact**](DataApi.md#get_contact) | **GET** /contacts/{id} | +[**get_contacts**](DataApi.md#get_contacts) | **GET** /contacts | +[**get_contacts_for_student**](DataApi.md#get_contacts_for_student) | **GET** /students/{id}/contacts | +[**get_course**](DataApi.md#get_course) | **GET** /courses/{id} | +[**get_course_for_section**](DataApi.md#get_course_for_section) | **GET** /sections/{id}/course | +[**get_courses**](DataApi.md#get_courses) | **GET** /courses | +[**get_district**](DataApi.md#get_district) | **GET** /districts/{id} | +[**get_district_admin**](DataApi.md#get_district_admin) | **GET** /district_admins/{id} | +[**get_district_admins**](DataApi.md#get_district_admins) | **GET** /district_admins | +[**get_district_for_contact**](DataApi.md#get_district_for_contact) | **GET** /contacts/{id}/district | +[**get_district_for_course**](DataApi.md#get_district_for_course) | **GET** /courses/{id}/district | +[**get_district_for_district_admin**](DataApi.md#get_district_for_district_admin) | **GET** /district_admins/{id}/district | +[**get_district_for_school**](DataApi.md#get_district_for_school) | **GET** /schools/{id}/district | +[**get_district_for_school_admin**](DataApi.md#get_district_for_school_admin) | **GET** /school_admins/{id}/district | +[**get_district_for_section**](DataApi.md#get_district_for_section) | **GET** /sections/{id}/district | +[**get_district_for_student**](DataApi.md#get_district_for_student) | **GET** /students/{id}/district | +[**get_district_for_teacher**](DataApi.md#get_district_for_teacher) | **GET** /teachers/{id}/district | +[**get_district_for_term**](DataApi.md#get_district_for_term) | **GET** /terms/{id}/district | +[**get_districts**](DataApi.md#get_districts) | **GET** /districts | +[**get_school**](DataApi.md#get_school) | **GET** /schools/{id} | +[**get_school_admin**](DataApi.md#get_school_admin) | **GET** /school_admins/{id} | +[**get_school_admins**](DataApi.md#get_school_admins) | **GET** /school_admins | +[**get_school_for_section**](DataApi.md#get_school_for_section) | **GET** /sections/{id}/school | +[**get_school_for_student**](DataApi.md#get_school_for_student) | **GET** /students/{id}/school | +[**get_school_for_teacher**](DataApi.md#get_school_for_teacher) | **GET** /teachers/{id}/school | +[**get_schools**](DataApi.md#get_schools) | **GET** /schools | +[**get_schools_for_school_admin**](DataApi.md#get_schools_for_school_admin) | **GET** /school_admins/{id}/schools | +[**get_schools_for_student**](DataApi.md#get_schools_for_student) | **GET** /students/{id}/schools | +[**get_schools_for_teacher**](DataApi.md#get_schools_for_teacher) | **GET** /teachers/{id}/schools | +[**get_section**](DataApi.md#get_section) | **GET** /sections/{id} | +[**get_sections**](DataApi.md#get_sections) | **GET** /sections | +[**get_sections_for_course**](DataApi.md#get_sections_for_course) | **GET** /courses/{id}/sections | +[**get_sections_for_school**](DataApi.md#get_sections_for_school) | **GET** /schools/{id}/sections | +[**get_sections_for_student**](DataApi.md#get_sections_for_student) | **GET** /students/{id}/sections | +[**get_sections_for_teacher**](DataApi.md#get_sections_for_teacher) | **GET** /teachers/{id}/sections | +[**get_sections_for_term**](DataApi.md#get_sections_for_term) | **GET** /terms/{id}/sections | +[**get_student**](DataApi.md#get_student) | **GET** /students/{id} | +[**get_students**](DataApi.md#get_students) | **GET** /students | +[**get_students_for_contact**](DataApi.md#get_students_for_contact) | **GET** /contacts/{id}/students | +[**get_students_for_school**](DataApi.md#get_students_for_school) | **GET** /schools/{id}/students | +[**get_students_for_section**](DataApi.md#get_students_for_section) | **GET** /sections/{id}/students | +[**get_students_for_teacher**](DataApi.md#get_students_for_teacher) | **GET** /teachers/{id}/students | +[**get_teacher**](DataApi.md#get_teacher) | **GET** /teachers/{id} | +[**get_teacher_for_section**](DataApi.md#get_teacher_for_section) | **GET** /sections/{id}/teacher | +[**get_teachers**](DataApi.md#get_teachers) | **GET** /teachers | +[**get_teachers_for_school**](DataApi.md#get_teachers_for_school) | **GET** /schools/{id}/teachers | +[**get_teachers_for_section**](DataApi.md#get_teachers_for_section) | **GET** /sections/{id}/teachers | +[**get_teachers_for_student**](DataApi.md#get_teachers_for_student) | **GET** /students/{id}/teachers | +[**get_term**](DataApi.md#get_term) | **GET** /terms/{id} | +[**get_term_for_section**](DataApi.md#get_term_for_section) | **GET** /sections/{id}/term | +[**get_terms**](DataApi.md#get_terms) | **GET** /terms | + + +# **get_contact** +> ContactResponse get_contact(id) + + + +Returns a specific student contact + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_contact(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_contact: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**ContactResponse**](ContactResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_contacts** +> ContactsResponse get_contacts(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of student contacts + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_contacts(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_contacts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**ContactsResponse**](ContactsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_contacts_for_student** +> ContactsResponse get_contacts_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the contacts for a student + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_contacts_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_contacts_for_student: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**ContactsResponse**](ContactsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_course** +> CourseResponse get_course(id) + + + +Returns a specific course + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_course(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_course: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**CourseResponse**](CourseResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_course_for_section** +> CourseResponse get_course_for_section(id) + + + +Returns the course for a section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_course_for_section(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_course_for_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**CourseResponse**](CourseResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_courses** +> CoursesResponse get_courses(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of courses + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_courses(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_courses: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**CoursesResponse**](CoursesResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district** +> DistrictResponse get_district(id) + + + +Returns a specific district + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_admin** +> DistrictAdminResponse get_district_admin(id) + + + +Returns a specific district admin + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_admin(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_admin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictAdminResponse**](DistrictAdminResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_admins** +> DistrictAdminsResponse get_district_admins(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of district admins + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_district_admins(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_admins: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**DistrictAdminsResponse**](DistrictAdminsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_contact** +> DistrictResponse get_district_for_contact(id) + + + +Returns the district for a student contact + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_contact(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_contact: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_course** +> DistrictResponse get_district_for_course(id) + + + +Returns the district for a course + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_course(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_course: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_district_admin** +> DistrictResponse get_district_for_district_admin(id) + + + +Returns the district for a district admin + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_district_admin(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_district_admin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_school** +> DistrictResponse get_district_for_school(id) + + + +Returns the district for a school + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_school(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_school: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_school_admin** +> DistrictResponse get_district_for_school_admin(id) + + + +Returns the district for a school admin + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_school_admin(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_school_admin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_section** +> DistrictResponse get_district_for_section(id) + + + +Returns the district for a section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_section(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_student** +> DistrictResponse get_district_for_student(id) + + + +Returns the district for a student + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_student(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_student: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_teacher** +> DistrictResponse get_district_for_teacher(id) + + + +Returns the district for a teacher + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_teacher(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_teacher: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_district_for_term** +> DistrictResponse get_district_for_term(id) + + + +Returns the district for a term + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_district_for_term(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_district_for_term: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DistrictResponse**](DistrictResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_districts** +> DistrictsResponse get_districts() + + + +Returns a list of districts + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) + +try: + api_response = api_instance.get_districts() + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_districts: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DistrictsResponse**](DistrictsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_school** +> SchoolResponse get_school(id) + + + +Returns a specific school + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_school(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_school: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**SchoolResponse**](SchoolResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_school_admin** +> SchoolAdminResponse get_school_admin(id) + + + +Returns a specific school admin + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_school_admin(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_school_admin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**SchoolAdminResponse**](SchoolAdminResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_school_admins** +> SchoolAdminsResponse get_school_admins(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of school admins + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_school_admins(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_school_admins: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SchoolAdminsResponse**](SchoolAdminsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_school_for_section** +> SchoolResponse get_school_for_section(id) + + + +Returns the school for a section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_school_for_section(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_school_for_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**SchoolResponse**](SchoolResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_school_for_student** +> SchoolResponse get_school_for_student(id) + + + +Returns the primary school for a student + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_school_for_student(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_school_for_student: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**SchoolResponse**](SchoolResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_school_for_teacher** +> SchoolResponse get_school_for_teacher(id) + + + +Retrieves school info for a teacher. + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_school_for_teacher(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_school_for_teacher: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**SchoolResponse**](SchoolResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_schools** +> SchoolsResponse get_schools(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of schools + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_schools(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_schools: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SchoolsResponse**](SchoolsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_schools_for_school_admin** +> SchoolsResponse get_schools_for_school_admin(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the schools for a school admin + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_schools_for_school_admin(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_schools_for_school_admin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SchoolsResponse**](SchoolsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_schools_for_student** +> SchoolsResponse get_schools_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the schools for a student + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_schools_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_schools_for_student: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SchoolsResponse**](SchoolsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_schools_for_teacher** +> SchoolsResponse get_schools_for_teacher(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the schools for a teacher + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_schools_for_teacher(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_schools_for_teacher: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SchoolsResponse**](SchoolsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_section** +> SectionResponse get_section(id) + + + +Returns a specific section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_section(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**SectionResponse**](SectionResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_sections** +> SectionsResponse get_sections(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of sections + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_sections(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_sections: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SectionsResponse**](SectionsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_sections_for_course** +> SectionsResponse get_sections_for_course(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the sections for a Courses + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_sections_for_course(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_sections_for_course: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SectionsResponse**](SectionsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_sections_for_school** +> SectionsResponse get_sections_for_school(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the sections for a school + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_sections_for_school(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_sections_for_school: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SectionsResponse**](SectionsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_sections_for_student** +> SectionsResponse get_sections_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the sections for a student + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_sections_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_sections_for_student: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SectionsResponse**](SectionsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_sections_for_teacher** +> SectionsResponse get_sections_for_teacher(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the sections for a teacher + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_sections_for_teacher(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_sections_for_teacher: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SectionsResponse**](SectionsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_sections_for_term** +> SectionsResponse get_sections_for_term(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the sections for a term + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_sections_for_term(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_sections_for_term: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**SectionsResponse**](SectionsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_student** +> StudentResponse get_student(id) + + + +Returns a specific student + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_student(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_student: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**StudentResponse**](StudentResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_students** +> StudentsResponse get_students(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of students + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_students(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_students: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**StudentsResponse**](StudentsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_students_for_contact** +> StudentsResponse get_students_for_contact(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the students for a student contact + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_students_for_contact(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_students_for_contact: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**StudentsResponse**](StudentsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_students_for_school** +> StudentsResponse get_students_for_school(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the students for a school + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_students_for_school(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_students_for_school: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**StudentsResponse**](StudentsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_students_for_section** +> StudentsResponse get_students_for_section(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the students for a section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_students_for_section(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_students_for_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**StudentsResponse**](StudentsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_students_for_teacher** +> StudentsResponse get_students_for_teacher(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the students for a teacher + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_students_for_teacher(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_students_for_teacher: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**StudentsResponse**](StudentsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_teacher** +> TeacherResponse get_teacher(id) + + + +Returns a specific teacher + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_teacher(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_teacher: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**TeacherResponse**](TeacherResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_teacher_for_section** +> TeacherResponse get_teacher_for_section(id) + + + +Returns the primary teacher for a section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_teacher_for_section(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_teacher_for_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**TeacherResponse**](TeacherResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_teachers** +> TeachersResponse get_teachers(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of teachers + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_teachers(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_teachers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**TeachersResponse**](TeachersResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_teachers_for_school** +> TeachersResponse get_teachers_for_school(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the teachers for a school + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_teachers_for_school(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_teachers_for_school: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**TeachersResponse**](TeachersResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_teachers_for_section** +> TeachersResponse get_teachers_for_section(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the teachers for a section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_teachers_for_section(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_teachers_for_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**TeachersResponse**](TeachersResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_teachers_for_student** +> TeachersResponse get_teachers_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns the teachers for a student + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_teachers_for_student(id, limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_teachers_for_student: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**TeachersResponse**](TeachersResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_term** +> TermResponse get_term(id) + + + +Returns a specific term + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_term(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_term: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**TermResponse**](TermResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_term_for_section** +> TermResponse get_term_for_section(id) + + + +Returns the term for a section + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_term_for_section(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_term_for_section: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**TermResponse**](TermResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_terms** +> TermsResponse get_terms(limit=limit, starting_after=starting_after, ending_before=ending_before) + + + +Returns a list of terms + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) + +try: + api_response = api_instance.get_terms(limit=limit, starting_after=starting_after, ending_before=ending_before) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->get_terms: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + +### Return type + +[**TermsResponse**](TermsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/docs/District.md b/docs/District.md new file mode 100644 index 0000000..44e0a70 --- /dev/null +++ b/docs/District.md @@ -0,0 +1,20 @@ +# District + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**id** | **str** | | [optional] +**last_sync** | **str** | | [optional] +**launch_date** | **str** | | [optional] +**mdr_number** | **str** | | [optional] +**name** | **str** | | [optional] +**nces_id** | **str** | | [optional] +**pause_end** | **str** | | [optional] +**pause_start** | **str** | | [optional] +**sis_type** | **str** | | [optional] +**state** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictAdmin.md b/docs/DistrictAdmin.md new file mode 100644 index 0000000..795a33c --- /dev/null +++ b/docs/DistrictAdmin.md @@ -0,0 +1,14 @@ +# DistrictAdmin + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**district** | **str** | | [optional] +**email** | **str** | | [optional] +**id** | **str** | | [optional] +**name** | [**Name**](Name.md) | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictAdminObject.md b/docs/DistrictAdminObject.md new file mode 100644 index 0000000..0cecb6c --- /dev/null +++ b/docs/DistrictAdminObject.md @@ -0,0 +1,10 @@ +# DistrictAdminObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**DistrictAdmin**](DistrictAdmin.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictAdminResponse.md b/docs/DistrictAdminResponse.md new file mode 100644 index 0000000..371a0c0 --- /dev/null +++ b/docs/DistrictAdminResponse.md @@ -0,0 +1,10 @@ +# DistrictAdminResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictAdmin**](DistrictAdmin.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictAdminsResponse.md b/docs/DistrictAdminsResponse.md new file mode 100644 index 0000000..d3e6b3a --- /dev/null +++ b/docs/DistrictAdminsResponse.md @@ -0,0 +1,10 @@ +# DistrictAdminsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[DistrictAdminResponse]**](DistrictAdminResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictObject.md b/docs/DistrictObject.md new file mode 100644 index 0000000..9c4bc46 --- /dev/null +++ b/docs/DistrictObject.md @@ -0,0 +1,10 @@ +# DistrictObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**District**](District.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictResponse.md b/docs/DistrictResponse.md new file mode 100644 index 0000000..dc06322 --- /dev/null +++ b/docs/DistrictResponse.md @@ -0,0 +1,10 @@ +# DistrictResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**District**](District.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictStatus.md b/docs/DistrictStatus.md new file mode 100644 index 0000000..f1ee1e3 --- /dev/null +++ b/docs/DistrictStatus.md @@ -0,0 +1,17 @@ +# DistrictStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**id** | **str** | | [optional] +**last_sync** | **str** | | [optional] +**launch_date** | **str** | | [optional] +**pause_end** | **str** | | [optional] +**pause_start** | **str** | | [optional] +**sis_type** | **str** | | [optional] +**state** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictStatusResponse.md b/docs/DistrictStatusResponse.md new file mode 100644 index 0000000..e61b44e --- /dev/null +++ b/docs/DistrictStatusResponse.md @@ -0,0 +1,10 @@ +# DistrictStatusResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictStatus**](DistrictStatus.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictStatusResponses.md b/docs/DistrictStatusResponses.md new file mode 100644 index 0000000..d29d488 --- /dev/null +++ b/docs/DistrictStatusResponses.md @@ -0,0 +1,10 @@ +# DistrictStatusResponses + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[DistrictStatusResponse]**](DistrictStatusResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictadminsCreated.md b/docs/DistrictadminsCreated.md new file mode 100644 index 0000000..1d9c34d --- /dev/null +++ b/docs/DistrictadminsCreated.md @@ -0,0 +1,10 @@ +# DistrictadminsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictAdminObject**](DistrictAdminObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictadminsDeleted.md b/docs/DistrictadminsDeleted.md new file mode 100644 index 0000000..42c3720 --- /dev/null +++ b/docs/DistrictadminsDeleted.md @@ -0,0 +1,10 @@ +# DistrictadminsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictAdminObject**](DistrictAdminObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictadminsUpdated.md b/docs/DistrictadminsUpdated.md new file mode 100644 index 0000000..892b7d0 --- /dev/null +++ b/docs/DistrictadminsUpdated.md @@ -0,0 +1,10 @@ +# DistrictadminsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictAdminObject**](DistrictAdminObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictsCreated.md b/docs/DistrictsCreated.md new file mode 100644 index 0000000..fe6213d --- /dev/null +++ b/docs/DistrictsCreated.md @@ -0,0 +1,10 @@ +# DistrictsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictObject**](DistrictObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictsDeleted.md b/docs/DistrictsDeleted.md new file mode 100644 index 0000000..cedd6ea --- /dev/null +++ b/docs/DistrictsDeleted.md @@ -0,0 +1,10 @@ +# DistrictsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictObject**](DistrictObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictsResponse.md b/docs/DistrictsResponse.md new file mode 100644 index 0000000..35a7908 --- /dev/null +++ b/docs/DistrictsResponse.md @@ -0,0 +1,10 @@ +# DistrictsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[DistrictResponse]**](DistrictResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/DistrictsUpdated.md b/docs/DistrictsUpdated.md new file mode 100644 index 0000000..ac30914 --- /dev/null +++ b/docs/DistrictsUpdated.md @@ -0,0 +1,10 @@ +# DistrictsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DistrictObject**](DistrictObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Event.md b/docs/Event.md new file mode 100644 index 0000000..1c375bb --- /dev/null +++ b/docs/Event.md @@ -0,0 +1,12 @@ +# Event + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **str** | | [optional] +**id** | **str** | | [optional] +**type** | **str** | | + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/EventResponse.md b/docs/EventResponse.md new file mode 100644 index 0000000..7e96303 --- /dev/null +++ b/docs/EventResponse.md @@ -0,0 +1,10 @@ +# EventResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Event**](Event.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/EventsApi.md b/docs/EventsApi.md new file mode 100644 index 0000000..49b2d89 --- /dev/null +++ b/docs/EventsApi.md @@ -0,0 +1,120 @@ +# clever.EventsApi + +All URIs are relative to *https://api.clever.com/v2.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_event**](EventsApi.md#get_event) | **GET** /events/{id} | +[**get_events**](EventsApi.md#get_events) | **GET** /events | + + +# **get_event** +> EventResponse get_event(id) + + + +Returns the specific event + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.EventsApi(clever.ApiClient(configuration)) +id = 'id_example' # str | + +try: + api_response = api_instance.get_event(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling EventsApi->get_event: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**EventResponse**](EventResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **get_events** +> EventsResponse get_events(limit=limit, starting_after=starting_after, ending_before=ending_before, school=school, record_type=record_type) + + + +Returns a list of events + +### Example +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.EventsApi(clever.ApiClient(configuration)) +limit = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +ending_before = 'ending_before_example' # str | (optional) +school = 'school_example' # str | (optional) +record_type = ['record_type_example'] # list[str] | (optional) + +try: + api_response = api_instance.get_events(limit=limit, starting_after=starting_after, ending_before=ending_before, school=school, record_type=record_type) + pprint(api_response) +except ApiException as e: + print("Exception when calling EventsApi->get_events: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **ending_before** | **str**| | [optional] + **school** | **str**| | [optional] + **record_type** | [**list[str]**](str.md)| | [optional] + +### Return type + +[**EventsResponse**](EventsResponse.md) + +### Authorization + +[oauth](README.md#oauth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/docs/EventsResponse.md b/docs/EventsResponse.md new file mode 100644 index 0000000..79c6e86 --- /dev/null +++ b/docs/EventsResponse.md @@ -0,0 +1,10 @@ +# EventsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[EventResponse]**](EventResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/GradeLevelsResponse.md b/docs/GradeLevelsResponse.md new file mode 100644 index 0000000..7dc94e7 --- /dev/null +++ b/docs/GradeLevelsResponse.md @@ -0,0 +1,10 @@ +# GradeLevelsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **list[str]** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/InternalError.md b/docs/InternalError.md new file mode 100644 index 0000000..2eedaa8 --- /dev/null +++ b/docs/InternalError.md @@ -0,0 +1,10 @@ +# InternalError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Location.md b/docs/Location.md new file mode 100644 index 0000000..172fc7d --- /dev/null +++ b/docs/Location.md @@ -0,0 +1,15 @@ +# Location + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | [optional] +**city** | **str** | | [optional] +**lat** | **str** | | [optional] +**lon** | **str** | | [optional] +**state** | **str** | | [optional] +**zip** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Name.md b/docs/Name.md new file mode 100644 index 0000000..5298378 --- /dev/null +++ b/docs/Name.md @@ -0,0 +1,12 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first** | **str** | | [optional] +**last** | **str** | | [optional] +**middle** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/NotFound.md b/docs/NotFound.md new file mode 100644 index 0000000..4610cc7 --- /dev/null +++ b/docs/NotFound.md @@ -0,0 +1,10 @@ +# NotFound + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Principal.md b/docs/Principal.md new file mode 100644 index 0000000..f4d2177 --- /dev/null +++ b/docs/Principal.md @@ -0,0 +1,11 @@ +# Principal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**name** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..35a8d21 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,168 @@ +# clever-python +The Clever API + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 2.0.0 +- Package version: 3.0.2 +- Build package: io.swagger.codegen.languages.PythonClientCodegen + +## Documentation for API Endpoints + +All URIs are relative to *https://api.clever.com/v2.0* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DataApi* | [**get_contact**](DataApi.md#get_contact) | **GET** /contacts/{id} | +*DataApi* | [**get_contacts**](DataApi.md#get_contacts) | **GET** /contacts | +*DataApi* | [**get_contacts_for_student**](DataApi.md#get_contacts_for_student) | **GET** /students/{id}/contacts | +*DataApi* | [**get_course**](DataApi.md#get_course) | **GET** /courses/{id} | +*DataApi* | [**get_course_for_section**](DataApi.md#get_course_for_section) | **GET** /sections/{id}/course | +*DataApi* | [**get_courses**](DataApi.md#get_courses) | **GET** /courses | +*DataApi* | [**get_district**](DataApi.md#get_district) | **GET** /districts/{id} | +*DataApi* | [**get_district_admin**](DataApi.md#get_district_admin) | **GET** /district_admins/{id} | +*DataApi* | [**get_district_admins**](DataApi.md#get_district_admins) | **GET** /district_admins | +*DataApi* | [**get_district_for_contact**](DataApi.md#get_district_for_contact) | **GET** /contacts/{id}/district | +*DataApi* | [**get_district_for_course**](DataApi.md#get_district_for_course) | **GET** /courses/{id}/district | +*DataApi* | [**get_district_for_district_admin**](DataApi.md#get_district_for_district_admin) | **GET** /district_admins/{id}/district | +*DataApi* | [**get_district_for_school**](DataApi.md#get_district_for_school) | **GET** /schools/{id}/district | +*DataApi* | [**get_district_for_school_admin**](DataApi.md#get_district_for_school_admin) | **GET** /school_admins/{id}/district | +*DataApi* | [**get_district_for_section**](DataApi.md#get_district_for_section) | **GET** /sections/{id}/district | +*DataApi* | [**get_district_for_student**](DataApi.md#get_district_for_student) | **GET** /students/{id}/district | +*DataApi* | [**get_district_for_teacher**](DataApi.md#get_district_for_teacher) | **GET** /teachers/{id}/district | +*DataApi* | [**get_district_for_term**](DataApi.md#get_district_for_term) | **GET** /terms/{id}/district | +*DataApi* | [**get_districts**](DataApi.md#get_districts) | **GET** /districts | +*DataApi* | [**get_school**](DataApi.md#get_school) | **GET** /schools/{id} | +*DataApi* | [**get_school_admin**](DataApi.md#get_school_admin) | **GET** /school_admins/{id} | +*DataApi* | [**get_school_admins**](DataApi.md#get_school_admins) | **GET** /school_admins | +*DataApi* | [**get_school_for_section**](DataApi.md#get_school_for_section) | **GET** /sections/{id}/school | +*DataApi* | [**get_school_for_student**](DataApi.md#get_school_for_student) | **GET** /students/{id}/school | +*DataApi* | [**get_school_for_teacher**](DataApi.md#get_school_for_teacher) | **GET** /teachers/{id}/school | +*DataApi* | [**get_schools**](DataApi.md#get_schools) | **GET** /schools | +*DataApi* | [**get_schools_for_school_admin**](DataApi.md#get_schools_for_school_admin) | **GET** /school_admins/{id}/schools | +*DataApi* | [**get_schools_for_student**](DataApi.md#get_schools_for_student) | **GET** /students/{id}/schools | +*DataApi* | [**get_schools_for_teacher**](DataApi.md#get_schools_for_teacher) | **GET** /teachers/{id}/schools | +*DataApi* | [**get_section**](DataApi.md#get_section) | **GET** /sections/{id} | +*DataApi* | [**get_sections**](DataApi.md#get_sections) | **GET** /sections | +*DataApi* | [**get_sections_for_course**](DataApi.md#get_sections_for_course) | **GET** /courses/{id}/sections | +*DataApi* | [**get_sections_for_school**](DataApi.md#get_sections_for_school) | **GET** /schools/{id}/sections | +*DataApi* | [**get_sections_for_student**](DataApi.md#get_sections_for_student) | **GET** /students/{id}/sections | +*DataApi* | [**get_sections_for_teacher**](DataApi.md#get_sections_for_teacher) | **GET** /teachers/{id}/sections | +*DataApi* | [**get_sections_for_term**](DataApi.md#get_sections_for_term) | **GET** /terms/{id}/sections | +*DataApi* | [**get_student**](DataApi.md#get_student) | **GET** /students/{id} | +*DataApi* | [**get_students**](DataApi.md#get_students) | **GET** /students | +*DataApi* | [**get_students_for_contact**](DataApi.md#get_students_for_contact) | **GET** /contacts/{id}/students | +*DataApi* | [**get_students_for_school**](DataApi.md#get_students_for_school) | **GET** /schools/{id}/students | +*DataApi* | [**get_students_for_section**](DataApi.md#get_students_for_section) | **GET** /sections/{id}/students | +*DataApi* | [**get_students_for_teacher**](DataApi.md#get_students_for_teacher) | **GET** /teachers/{id}/students | +*DataApi* | [**get_teacher**](DataApi.md#get_teacher) | **GET** /teachers/{id} | +*DataApi* | [**get_teacher_for_section**](DataApi.md#get_teacher_for_section) | **GET** /sections/{id}/teacher | +*DataApi* | [**get_teachers**](DataApi.md#get_teachers) | **GET** /teachers | +*DataApi* | [**get_teachers_for_school**](DataApi.md#get_teachers_for_school) | **GET** /schools/{id}/teachers | +*DataApi* | [**get_teachers_for_section**](DataApi.md#get_teachers_for_section) | **GET** /sections/{id}/teachers | +*DataApi* | [**get_teachers_for_student**](DataApi.md#get_teachers_for_student) | **GET** /students/{id}/teachers | +*DataApi* | [**get_term**](DataApi.md#get_term) | **GET** /terms/{id} | +*DataApi* | [**get_term_for_section**](DataApi.md#get_term_for_section) | **GET** /sections/{id}/term | +*DataApi* | [**get_terms**](DataApi.md#get_terms) | **GET** /terms | +*EventsApi* | [**get_event**](EventsApi.md#get_event) | **GET** /events/{id} | +*EventsApi* | [**get_events**](EventsApi.md#get_events) | **GET** /events | + + +## Documentation For Models + + - [BadRequest](BadRequest.md) + - [Contact](Contact.md) + - [ContactObject](ContactObject.md) + - [ContactResponse](ContactResponse.md) + - [ContactsResponse](ContactsResponse.md) + - [Course](Course.md) + - [CourseObject](CourseObject.md) + - [CourseResponse](CourseResponse.md) + - [CoursesResponse](CoursesResponse.md) + - [Credentials](Credentials.md) + - [District](District.md) + - [DistrictAdmin](DistrictAdmin.md) + - [DistrictAdminObject](DistrictAdminObject.md) + - [DistrictAdminResponse](DistrictAdminResponse.md) + - [DistrictAdminsResponse](DistrictAdminsResponse.md) + - [DistrictObject](DistrictObject.md) + - [DistrictResponse](DistrictResponse.md) + - [DistrictsResponse](DistrictsResponse.md) + - [Event](Event.md) + - [EventResponse](EventResponse.md) + - [EventsResponse](EventsResponse.md) + - [InternalError](InternalError.md) + - [Location](Location.md) + - [Name](Name.md) + - [NotFound](NotFound.md) + - [Principal](Principal.md) + - [School](School.md) + - [SchoolAdmin](SchoolAdmin.md) + - [SchoolAdminObject](SchoolAdminObject.md) + - [SchoolAdminResponse](SchoolAdminResponse.md) + - [SchoolAdminsResponse](SchoolAdminsResponse.md) + - [SchoolObject](SchoolObject.md) + - [SchoolResponse](SchoolResponse.md) + - [SchoolsResponse](SchoolsResponse.md) + - [Section](Section.md) + - [SectionObject](SectionObject.md) + - [SectionResponse](SectionResponse.md) + - [SectionsResponse](SectionsResponse.md) + - [Student](Student.md) + - [StudentObject](StudentObject.md) + - [StudentResponse](StudentResponse.md) + - [StudentsResponse](StudentsResponse.md) + - [Teacher](Teacher.md) + - [TeacherObject](TeacherObject.md) + - [TeacherResponse](TeacherResponse.md) + - [TeachersResponse](TeachersResponse.md) + - [Term](Term.md) + - [TermObject](TermObject.md) + - [TermResponse](TermResponse.md) + - [TermsResponse](TermsResponse.md) + - [ContactsCreated](ContactsCreated.md) + - [ContactsDeleted](ContactsDeleted.md) + - [ContactsUpdated](ContactsUpdated.md) + - [CoursesCreated](CoursesCreated.md) + - [CoursesDeleted](CoursesDeleted.md) + - [CoursesUpdated](CoursesUpdated.md) + - [DistrictadminsCreated](DistrictadminsCreated.md) + - [DistrictadminsDeleted](DistrictadminsDeleted.md) + - [DistrictadminsUpdated](DistrictadminsUpdated.md) + - [DistrictsCreated](DistrictsCreated.md) + - [DistrictsDeleted](DistrictsDeleted.md) + - [DistrictsUpdated](DistrictsUpdated.md) + - [SchooladminsCreated](SchooladminsCreated.md) + - [SchooladminsDeleted](SchooladminsDeleted.md) + - [SchooladminsUpdated](SchooladminsUpdated.md) + - [SchoolsCreated](SchoolsCreated.md) + - [SchoolsDeleted](SchoolsDeleted.md) + - [SchoolsUpdated](SchoolsUpdated.md) + - [SectionsCreated](SectionsCreated.md) + - [SectionsDeleted](SectionsDeleted.md) + - [SectionsUpdated](SectionsUpdated.md) + - [StudentsCreated](StudentsCreated.md) + - [StudentsDeleted](StudentsDeleted.md) + - [StudentsUpdated](StudentsUpdated.md) + - [TeachersCreated](TeachersCreated.md) + - [TeachersDeleted](TeachersDeleted.md) + - [TeachersUpdated](TeachersUpdated.md) + - [TermsCreated](TermsCreated.md) + - [TermsDeleted](TermsDeleted.md) + - [TermsUpdated](TermsUpdated.md) + + +## Documentation For Authorization + + +## oauth + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: https://clever.com/oauth/authorize +- **Scopes**: N/A + + + + + diff --git a/docs/School.md b/docs/School.md new file mode 100644 index 0000000..5e648d7 --- /dev/null +++ b/docs/School.md @@ -0,0 +1,24 @@ +# School + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **str** | | [optional] +**district** | **str** | | [optional] +**high_grade** | **str** | | [optional] +**id** | **str** | | [optional] +**last_modified** | **str** | | [optional] +**location** | [**Location**](Location.md) | | [optional] +**low_grade** | **str** | | [optional] +**mdr_number** | **str** | | [optional] +**name** | **str** | | [optional] +**nces_id** | **str** | | [optional] +**phone** | **str** | | [optional] +**principal** | [**Principal**](Principal.md) | | [optional] +**school_number** | **str** | | [optional] +**sis_id** | **str** | | [optional] +**state_id** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolAdmin.md b/docs/SchoolAdmin.md new file mode 100644 index 0000000..834d378 --- /dev/null +++ b/docs/SchoolAdmin.md @@ -0,0 +1,17 @@ +# SchoolAdmin + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credentials** | [**Credentials**](Credentials.md) | | [optional] +**district** | **str** | | [optional] +**email** | **str** | | [optional] +**id** | **str** | | [optional] +**name** | [**Name**](Name.md) | | [optional] +**schools** | **list[str]** | | [optional] +**staff_id** | **str** | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolAdminObject.md b/docs/SchoolAdminObject.md new file mode 100644 index 0000000..b64de43 --- /dev/null +++ b/docs/SchoolAdminObject.md @@ -0,0 +1,10 @@ +# SchoolAdminObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**SchoolAdmin**](SchoolAdmin.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolAdminResponse.md b/docs/SchoolAdminResponse.md new file mode 100644 index 0000000..16e099d --- /dev/null +++ b/docs/SchoolAdminResponse.md @@ -0,0 +1,10 @@ +# SchoolAdminResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SchoolAdmin**](SchoolAdmin.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolAdminsResponse.md b/docs/SchoolAdminsResponse.md new file mode 100644 index 0000000..c8bc719 --- /dev/null +++ b/docs/SchoolAdminsResponse.md @@ -0,0 +1,10 @@ +# SchoolAdminsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[SchoolAdminResponse]**](SchoolAdminResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolObject.md b/docs/SchoolObject.md new file mode 100644 index 0000000..e201586 --- /dev/null +++ b/docs/SchoolObject.md @@ -0,0 +1,10 @@ +# SchoolObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**School**](School.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolResponse.md b/docs/SchoolResponse.md new file mode 100644 index 0000000..11af862 --- /dev/null +++ b/docs/SchoolResponse.md @@ -0,0 +1,10 @@ +# SchoolResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**School**](School.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchooladminsCreated.md b/docs/SchooladminsCreated.md new file mode 100644 index 0000000..6fa55db --- /dev/null +++ b/docs/SchooladminsCreated.md @@ -0,0 +1,10 @@ +# SchooladminsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SchoolAdminObject**](SchoolAdminObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchooladminsDeleted.md b/docs/SchooladminsDeleted.md new file mode 100644 index 0000000..bc8b06e --- /dev/null +++ b/docs/SchooladminsDeleted.md @@ -0,0 +1,10 @@ +# SchooladminsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SchoolAdminObject**](SchoolAdminObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchooladminsUpdated.md b/docs/SchooladminsUpdated.md new file mode 100644 index 0000000..98e80b8 --- /dev/null +++ b/docs/SchooladminsUpdated.md @@ -0,0 +1,10 @@ +# SchooladminsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SchoolAdminObject**](SchoolAdminObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolsCreated.md b/docs/SchoolsCreated.md new file mode 100644 index 0000000..29ceb8c --- /dev/null +++ b/docs/SchoolsCreated.md @@ -0,0 +1,10 @@ +# SchoolsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SchoolObject**](SchoolObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolsDeleted.md b/docs/SchoolsDeleted.md new file mode 100644 index 0000000..0d3556b --- /dev/null +++ b/docs/SchoolsDeleted.md @@ -0,0 +1,10 @@ +# SchoolsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SchoolObject**](SchoolObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolsResponse.md b/docs/SchoolsResponse.md new file mode 100644 index 0000000..babd987 --- /dev/null +++ b/docs/SchoolsResponse.md @@ -0,0 +1,10 @@ +# SchoolsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[SchoolResponse]**](SchoolResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SchoolsUpdated.md b/docs/SchoolsUpdated.md new file mode 100644 index 0000000..c679c48 --- /dev/null +++ b/docs/SchoolsUpdated.md @@ -0,0 +1,10 @@ +# SchoolsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SchoolObject**](SchoolObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Section.md b/docs/Section.md new file mode 100644 index 0000000..2d4f990 --- /dev/null +++ b/docs/Section.md @@ -0,0 +1,25 @@ +# Section + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**course** | **str** | | [optional] +**created** | **str** | | [optional] +**district** | **str** | | [optional] +**grade** | **str** | | [optional] +**id** | **str** | | [optional] +**last_modified** | **str** | | [optional] +**name** | **str** | | [optional] +**period** | **str** | | [optional] +**school** | **str** | | [optional] +**section_number** | **str** | | [optional] +**sis_id** | **str** | | [optional] +**students** | **list[str]** | | [optional] +**subject** | **str** | | [optional] +**teacher** | **str** | | [optional] +**teachers** | **list[str]** | | [optional] +**term_id** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SectionObject.md b/docs/SectionObject.md new file mode 100644 index 0000000..563f2a5 --- /dev/null +++ b/docs/SectionObject.md @@ -0,0 +1,10 @@ +# SectionObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**Section**](Section.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SectionResponse.md b/docs/SectionResponse.md new file mode 100644 index 0000000..8bc5ee6 --- /dev/null +++ b/docs/SectionResponse.md @@ -0,0 +1,10 @@ +# SectionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Section**](Section.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SectionsCreated.md b/docs/SectionsCreated.md new file mode 100644 index 0000000..a14cf32 --- /dev/null +++ b/docs/SectionsCreated.md @@ -0,0 +1,10 @@ +# SectionsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SectionObject**](SectionObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SectionsDeleted.md b/docs/SectionsDeleted.md new file mode 100644 index 0000000..97f42c8 --- /dev/null +++ b/docs/SectionsDeleted.md @@ -0,0 +1,10 @@ +# SectionsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SectionObject**](SectionObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SectionsResponse.md b/docs/SectionsResponse.md new file mode 100644 index 0000000..f8a6f65 --- /dev/null +++ b/docs/SectionsResponse.md @@ -0,0 +1,10 @@ +# SectionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[SectionResponse]**](SectionResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/SectionsUpdated.md b/docs/SectionsUpdated.md new file mode 100644 index 0000000..ff5b927 --- /dev/null +++ b/docs/SectionsUpdated.md @@ -0,0 +1,10 @@ +# SectionsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SectionObject**](SectionObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Student.md b/docs/Student.md new file mode 100644 index 0000000..23dfd73 --- /dev/null +++ b/docs/Student.md @@ -0,0 +1,33 @@ +# Student + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **str** | | [optional] +**credentials** | [**Credentials**](Credentials.md) | | [optional] +**district** | **str** | | [optional] +**dob** | **str** | | [optional] +**ell_status** | **str** | | [optional] +**email** | **str** | | [optional] +**gender** | **str** | | [optional] +**grade** | **str** | | [optional] +**graduation_year** | **str** | | [optional] +**hispanic_ethnicity** | **str** | | [optional] +**home_language** | **str** | | [optional] +**id** | **str** | | [optional] +**iep_status** | **str** | | [optional] +**last_modified** | **str** | | [optional] +**location** | [**Location**](Location.md) | | [optional] +**name** | [**Name**](Name.md) | | [optional] +**race** | **str** | | [optional] +**school** | **str** | | [optional] +**schools** | **list[str]** | | [optional] +**sis_id** | **str** | | [optional] +**state_id** | **str** | | [optional] +**student_number** | **str** | | [optional] +**unweighted_gpa** | **str** | | [optional] +**weighted_gpa** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentContact.md b/docs/StudentContact.md new file mode 100644 index 0000000..d6604d6 --- /dev/null +++ b/docs/StudentContact.md @@ -0,0 +1,19 @@ +# StudentContact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**district** | **str** | | [optional] +**email** | **str** | | [optional] +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**phone** | **str** | | [optional] +**phone_type** | **str** | | [optional] +**relationship** | **str** | | [optional] +**sis_id** | **str** | | [optional] +**student** | **str** | | [optional] +**type** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentContactObject.md b/docs/StudentContactObject.md new file mode 100644 index 0000000..6757632 --- /dev/null +++ b/docs/StudentContactObject.md @@ -0,0 +1,10 @@ +# StudentContactObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**StudentContact**](StudentContact.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentContactResponse.md b/docs/StudentContactResponse.md new file mode 100644 index 0000000..061f81a --- /dev/null +++ b/docs/StudentContactResponse.md @@ -0,0 +1,10 @@ +# StudentContactResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**StudentContact**](StudentContact.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentContactsForStudentResponse.md b/docs/StudentContactsForStudentResponse.md new file mode 100644 index 0000000..6a388de --- /dev/null +++ b/docs/StudentContactsForStudentResponse.md @@ -0,0 +1,10 @@ +# StudentContactsForStudentResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[StudentContact]**](StudentContact.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentContactsResponse.md b/docs/StudentContactsResponse.md new file mode 100644 index 0000000..fc2122b --- /dev/null +++ b/docs/StudentContactsResponse.md @@ -0,0 +1,10 @@ +# StudentContactsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[StudentContactResponse]**](StudentContactResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentObject.md b/docs/StudentObject.md new file mode 100644 index 0000000..6461d93 --- /dev/null +++ b/docs/StudentObject.md @@ -0,0 +1,10 @@ +# StudentObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**Student**](Student.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentResponse.md b/docs/StudentResponse.md new file mode 100644 index 0000000..8c90182 --- /dev/null +++ b/docs/StudentResponse.md @@ -0,0 +1,10 @@ +# StudentResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Student**](Student.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentcontactsCreated.md b/docs/StudentcontactsCreated.md new file mode 100644 index 0000000..95e36ff --- /dev/null +++ b/docs/StudentcontactsCreated.md @@ -0,0 +1,13 @@ +# StudentcontactsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **str** | | [optional] +**id** | **str** | | [optional] +**type** | **str** | | +**data** | [**StudentContactObject**](StudentContactObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentcontactsDeleted.md b/docs/StudentcontactsDeleted.md new file mode 100644 index 0000000..c29d344 --- /dev/null +++ b/docs/StudentcontactsDeleted.md @@ -0,0 +1,13 @@ +# StudentcontactsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **str** | | [optional] +**id** | **str** | | [optional] +**type** | **str** | | +**data** | [**StudentContactObject**](StudentContactObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentcontactsUpdated.md b/docs/StudentcontactsUpdated.md new file mode 100644 index 0000000..91a865d --- /dev/null +++ b/docs/StudentcontactsUpdated.md @@ -0,0 +1,13 @@ +# StudentcontactsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **str** | | [optional] +**id** | **str** | | [optional] +**type** | **str** | | +**data** | [**StudentContactObject**](StudentContactObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentsCreated.md b/docs/StudentsCreated.md new file mode 100644 index 0000000..a74f45c --- /dev/null +++ b/docs/StudentsCreated.md @@ -0,0 +1,10 @@ +# StudentsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**StudentObject**](StudentObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentsDeleted.md b/docs/StudentsDeleted.md new file mode 100644 index 0000000..ad44860 --- /dev/null +++ b/docs/StudentsDeleted.md @@ -0,0 +1,10 @@ +# StudentsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**StudentObject**](StudentObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentsResponse.md b/docs/StudentsResponse.md new file mode 100644 index 0000000..b25e7ca --- /dev/null +++ b/docs/StudentsResponse.md @@ -0,0 +1,10 @@ +# StudentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[StudentResponse]**](StudentResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/StudentsUpdated.md b/docs/StudentsUpdated.md new file mode 100644 index 0000000..a298c82 --- /dev/null +++ b/docs/StudentsUpdated.md @@ -0,0 +1,10 @@ +# StudentsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**StudentObject**](StudentObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Teacher.md b/docs/Teacher.md new file mode 100644 index 0000000..9e4eb39 --- /dev/null +++ b/docs/Teacher.md @@ -0,0 +1,22 @@ +# Teacher + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **str** | | [optional] +**credentials** | [**Credentials**](Credentials.md) | | [optional] +**district** | **str** | | [optional] +**email** | **str** | | [optional] +**id** | **str** | | [optional] +**last_modified** | **str** | | [optional] +**name** | [**Name**](Name.md) | | [optional] +**school** | **str** | | [optional] +**schools** | **list[str]** | | [optional] +**sis_id** | **str** | | [optional] +**state_id** | **str** | | [optional] +**teacher_number** | **str** | | [optional] +**title** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TeacherObject.md b/docs/TeacherObject.md new file mode 100644 index 0000000..e0a3a1a --- /dev/null +++ b/docs/TeacherObject.md @@ -0,0 +1,10 @@ +# TeacherObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**Teacher**](Teacher.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TeacherResponse.md b/docs/TeacherResponse.md new file mode 100644 index 0000000..490dd1a --- /dev/null +++ b/docs/TeacherResponse.md @@ -0,0 +1,10 @@ +# TeacherResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Teacher**](Teacher.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TeachersCreated.md b/docs/TeachersCreated.md new file mode 100644 index 0000000..4388cd2 --- /dev/null +++ b/docs/TeachersCreated.md @@ -0,0 +1,10 @@ +# TeachersCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TeacherObject**](TeacherObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TeachersDeleted.md b/docs/TeachersDeleted.md new file mode 100644 index 0000000..1a66858 --- /dev/null +++ b/docs/TeachersDeleted.md @@ -0,0 +1,10 @@ +# TeachersDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TeacherObject**](TeacherObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TeachersResponse.md b/docs/TeachersResponse.md new file mode 100644 index 0000000..8033bec --- /dev/null +++ b/docs/TeachersResponse.md @@ -0,0 +1,10 @@ +# TeachersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[TeacherResponse]**](TeacherResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TeachersUpdated.md b/docs/TeachersUpdated.md new file mode 100644 index 0000000..c6fcfe1 --- /dev/null +++ b/docs/TeachersUpdated.md @@ -0,0 +1,10 @@ +# TeachersUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TeacherObject**](TeacherObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/Term.md b/docs/Term.md new file mode 100644 index 0000000..d1b29f4 --- /dev/null +++ b/docs/Term.md @@ -0,0 +1,13 @@ +# Term + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**end_date** | **str** | | [optional] +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**start_date** | **str** | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TermObject.md b/docs/TermObject.md new file mode 100644 index 0000000..96fa3ca --- /dev/null +++ b/docs/TermObject.md @@ -0,0 +1,10 @@ +# TermObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**Term**](Term.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TermResponse.md b/docs/TermResponse.md new file mode 100644 index 0000000..5228eac --- /dev/null +++ b/docs/TermResponse.md @@ -0,0 +1,10 @@ +# TermResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Term**](Term.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TermsCreated.md b/docs/TermsCreated.md new file mode 100644 index 0000000..33f7587 --- /dev/null +++ b/docs/TermsCreated.md @@ -0,0 +1,10 @@ +# TermsCreated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TermObject**](TermObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TermsDeleted.md b/docs/TermsDeleted.md new file mode 100644 index 0000000..a244b6e --- /dev/null +++ b/docs/TermsDeleted.md @@ -0,0 +1,10 @@ +# TermsDeleted + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TermObject**](TermObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TermsResponse.md b/docs/TermsResponse.md new file mode 100644 index 0000000..fc1a177 --- /dev/null +++ b/docs/TermsResponse.md @@ -0,0 +1,10 @@ +# TermsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[TermResponse]**](TermResponse.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/TermsUpdated.md b/docs/TermsUpdated.md new file mode 100644 index 0000000..191efde --- /dev/null +++ b/docs/TermsUpdated.md @@ -0,0 +1,10 @@ +# TermsUpdated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TermObject**](TermObject.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/override/README.md b/override/README.md new file mode 100644 index 0000000..e50b61b --- /dev/null +++ b/override/README.md @@ -0,0 +1,105 @@ +# Clever - the Python library for the Clever API + +## API Documentation +View more detailed documentation [here](docs/README.md) + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation +From PyPi: + +```bash + $ pip install clever +``` + +or + +```bash + $ easy_install clever +``` + +Or from source: + +```bash + $ python setup.py install +``` + +Then import the package: +```python +import clever +``` + +## Getting Started + +Please follow the [installation procedure](#installation) and then run the following: + +```python +from __future__ import print_function +import time +import clever +from clever.rest import ApiException +from pprint import pprint + +# Note: This is hard coded for demo purposes only. Keep your access tokens secret! +# https://dev.clever.com/docs/security#section-security-best-practices + +# Configure OAuth2 access token for authorization: oauth +configuration = clever.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = clever.DataApi(clever.ApiClient(configuration)) + +try: + api_response = api_instance.get_students() + for student in api_response.data: + pprint(student.data.id) +except ApiException as e: + print("Exception when calling DataApi->get_students: %s\n" % e) + +``` + +## Updating the Library + +1. Git clone swagger-codegen (https://github.com/swagger-api/swagger-codegen) + +2. Git clone Clever's swagger-api repo (https://github.com/Clever/swagger-api) + +3. Run this command in the swagger-codegen repo +``` +java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i $PATH_TO_SWAGGER_API_REPO/v1.2-client.yml -c $PATH_TO_THIS_REPO/override/config.json -l python -o $PATH_TO_THIS_REPO --additional-properties packageVersion=$VERSION +``` + +4. Run `make override` to copy over the override files + +5. Update the CHANGELOG.md with the changes! + + +## Development + +### Dependencies + + make deps + +### Testing + + make test + +## Publishing + +Run `make publish` to publish a new version of the library. + +In order to publish to PyPI you will need a `.pypirc` file in your `$HOME` directory with the following contents: +``` +[distutils] +index-servers = + pypi + +[pypi] +username: **** +password: **** +``` + +The username and password are in 1Password for Teams under `PyPI`. diff --git a/override/VERSION b/override/VERSION new file mode 100644 index 0000000..b502146 --- /dev/null +++ b/override/VERSION @@ -0,0 +1 @@ +3.0.2 diff --git a/override/api_client.py b/override/api_client.py new file mode 100644 index 0000000..c3c560c --- /dev/null +++ b/override/api_client.py @@ -0,0 +1,632 @@ +# coding: utf-8 +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import os +import re +import json +import mimetypes +import tempfile +from multiprocessing.pool import ThreadPool + +from datetime import date, datetime + +# python 2 and python 3 compatibility library +from six import PY3, integer_types, iteritems, text_type +from six.moves.urllib.parse import quote + +from . import models +from .configuration import Configuration +from .rest import ApiException, RESTClientObject + + +class ApiClient(object): + """ + Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param host: The base path for the server to call. + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to the API. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, text_type) + integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': date, + 'datetime': datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + self.pool = ThreadPool() + self.rest_client = RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/3.0.0/python' + + def __del__(self): + self.pool.close() + self.pool.join() + + @property + def user_agent(self): + """ + Gets user agent. + """ + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + """ + Sets user agent. + """ + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, _preload_content=True, + _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, quote(v.encode('utf-8'), safe=config.safe_chars_for_path_param)) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request(method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """ + Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime, date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """ + Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """ + Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match('list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in iteritems(data)} + + if klass == 'Event': + klass = eval('models.'+''.join(data['type'].title().split('.'))) + return self.__deserialize(data,klass) + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == date: + return self.__deserialize_date(data) + elif klass == datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async=None, + _return_http_data_only=None, collection_formats=None, _preload_content=True, + _request_timeout=None): + """ + Makes the HTTP request (synchronous) and return the deserialized data. + To make an async request, set the async parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async bool: execute request asynchronously + :param _return_http_data_only: response data without head status code and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without + reading/decoding response data. Default is True. + :param _request_timeout: timeout setting for this request. If one number provided, it will be total request + timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :return: + If async parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async is False or missing, + then the method will return the response directly. + """ + if not async: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, method, + path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, _request_timeout=None): + """ + Makes the HTTP request using RESTClient. + """ + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """ + Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in iteritems(params) if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """ + Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = mimetypes.\ + guess_type(filename)[0] or 'application/octet-stream' + params.append(tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """ + Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """ + Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """ + Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """ + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.\ + search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).\ + group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "w") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """ + Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return unicode(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """ + Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """ + Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise ApiException( + status=0, + reason="Failed to parse `{0}` into a date object".format(string) + ) + + def __deserialize_datatime(self, string): + """ + Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise ApiException( + status=0, + reason=( + "Failed to parse `{0}` into a datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """ + Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.swagger_types and not hasattr(klass, 'get_real_child_model'): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in iteritems(klass.swagger_types): + if data is not None \ + and klass.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/override/clever.com_ca_bundle.crt b/override/clever.com_ca_bundle.crt new file mode 100644 index 0000000..3dbb5e9 --- /dev/null +++ b/override/clever.com_ca_bundle.crt @@ -0,0 +1,111 @@ +-----BEGIN CERTIFICATE----- +MIIG5jCCBc6gAwIBAgIQAze5KDR8YKauxa2xIX84YDANBgkqhkiG9w0BAQUFADBs +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j +ZSBFViBSb290IENBMB4XDTA3MTEwOTEyMDAwMFoXDTIxMTExMDAwMDAwMFowaTEL +MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 +LmRpZ2ljZXJ0LmNvbTEoMCYGA1UEAxMfRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug +RVYgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPOWYth1bhn/ +PzR8SU8xfg0ETpmB4rOFVZEwscCvcLssqOcYqj9495BoUoYBiJfiOwZlkKq9ZXbC +7L4QWzd4g2B1Rca9dKq2n6Q6AVAXxDlpufFP74LByvNK28yeUE9NQKM6kOeGZrzw +PnYoTNF1gJ5qNRQ1A57bDIzCKK1Qss72kaPDpQpYSfZ1RGy6+c7pqzoC4E3zrOJ6 +4GAiBTyC01Li85xH+DvYskuTVkq/cKs+6WjIHY9YHSpNXic9rQpZL1oRIEDZaARo +LfTAhAsKG3jf7RpY3PtBWm1r8u0c7lwytlzs16YDMqbo3rcoJ1mIgP97rYlY1R4U +pPKwcNSgPqcCAwEAAaOCA4UwggOBMA4GA1UdDwEB/wQEAwIBhjA7BgNVHSUENDAy +BggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDBggrBgEFBQcDBAYIKwYBBQUH +AwgwggHEBgNVHSAEggG7MIIBtzCCAbMGCWCGSAGG/WwCATCCAaQwOgYIKwYBBQUH +AgEWLmh0dHA6Ly93d3cuZGlnaWNlcnQuY29tL3NzbC1jcHMtcmVwb3NpdG9yeS5o +dG0wggFkBggrBgEFBQcCAjCCAVYeggFSAEEAbgB5ACAAdQBzAGUAIABvAGYAIAB0 +AGgAaQBzACAAQwBlAHIAdABpAGYAaQBjAGEAdABlACAAYwBvAG4AcwB0AGkAdAB1 +AHQAZQBzACAAYQBjAGMAZQBwAHQAYQBuAGMAZQAgAG8AZgAgAHQAaABlACAARABp +AGcAaQBDAGUAcgB0ACAARQBWACAAQwBQAFMAIABhAG4AZAAgAHQAaABlACAAUgBl +AGwAeQBpAG4AZwAgAFAAYQByAHQAeQAgAEEAZwByAGUAZQBtAGUAbgB0ACAAdwBo +AGkAYwBoACAAbABpAG0AaQB0ACAAbABpAGEAYgBpAGwAaQB0AHkAIABhAG4AZAAg +AGEAcgBlACAAaQBuAGMAbwByAHAAbwByAGEAdABlAGQAIABoAGUAcgBlAGkAbgAg +AGIAeQAgAHIAZQBmAGUAcgBlAG4AYwBlAC4wEgYDVR0TAQH/BAgwBgEB/wIBADCB +gwYIKwYBBQUHAQEEdzB1MCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2Vy +dC5jb20wTQYIKwYBBQUHMAKGQWh0dHA6Ly93d3cuZGlnaWNlcnQuY29tL0NBQ2Vy +dHMvRGlnaUNlcnRIaWdoQXNzdXJhbmNlRVZSb290Q0EuY3J0MIGPBgNVHR8EgYcw +gYQwQKA+oDyGOmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEhpZ2hB +c3N1cmFuY2VFVlJvb3RDQS5jcmwwQKA+oDyGOmh0dHA6Ly9jcmw0LmRpZ2ljZXJ0 +LmNvbS9EaWdpQ2VydEhpZ2hBc3N1cmFuY2VFVlJvb3RDQS5jcmwwHQYDVR0OBBYE +FExYyyXwQU9S9CjIgUObpqig5pLlMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSYJhoI +Au9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQBMeheHKF0XvLIyc7/NLvVYMR3wsXFU +nNabZ5PbLwM+Fm8eA8lThKNWYB54lBuiqG+jpItSkdfdXJW777UWSemlQk808kf/ +roF/E1S3IMRwFcuBCoHLdFfcnN8kpCkMGPAc5K4HM+zxST5Vz25PDVR708noFUjU +xbvcNRx3RQdIRYW9135TuMAW2ZXNi419yWBP0aKb49Aw1rRzNubS+QOy46T15bg+ +BEkAui6mSnKDcp33C4ypieez12Qf1uNgywPE3IjpnSUBAHHLA7QpYCWP+UbRe3Gu +zVMSW4SOwg/H7ZMZ2cn6j1g0djIvruFQFGHUqFijyDATI+/GJYw2jxyA +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j +ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL +MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 +LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug +RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm ++9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW +PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM +xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB +Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 +hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg +EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF +MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA +FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec +nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z +eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF +hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 +Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep ++OkuE6N36B9K +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIEjzCCA3egAwIBAgIQBp4dt3/PHfupevXlyaJANzANBgkqhkiG9w0BAQUFADBh +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD +QTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgxMjAwMDBaMEgxCzAJBgNVBAYTAlVT +MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxIjAgBgNVBAMTGURpZ2lDZXJ0IFNlY3Vy +ZSBTZXJ2ZXIgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7V+Qh +qdWbYDd+jqFhf4HiGsJ1ZNmRUAvkNkQkbjDSm3on+sJqrmpwCTi5IArIZRBKiKwx +8tyS8mOhXYBjWYCSIxzm73ZKUDXJ2HE4ue3w5kKu0zgmeTD5IpTG26Y/QXiQ2N5c +fml9+JAVOtChoL76srIZodgr0c6/a91Jq6OS/rWryME+7gEA2KlEuEJziMNh9atK +gygK0tRJ+mqxzd9XLJTl4sqDX7e6YlwvaKXwwLn9K9HpH9gaYhW9/z2m98vv5ttl +LyU47PvmIGZYljQZ0hXOIdMkzNkUb9j+Vcfnb7YPGoxJvinyulqagSY3JG/XSBJs +Lln1nBi72fZo4t9FAgMBAAGjggFaMIIBVjASBgNVHRMBAf8ECDAGAQH/AgEAMA4G +A1UdDwEB/wQEAwIBhjA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGGGGh0dHA6 +Ly9vY3NwLmRpZ2ljZXJ0LmNvbTB7BgNVHR8EdDByMDegNaAzhjFodHRwOi8vY3Js +My5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDegNaAzhjFo +dHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290Q0EuY3Js +MD0GA1UdIAQ2MDQwMgYEVR0gADAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5k +aWdpY2VydC5jb20vQ1BTMB0GA1UdDgQWBBSQcds363PI79zVHhK2NLorWqCmkjAf +BgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTANBgkqhkiG9w0BAQUFAAOC +AQEAMM7RlVEArgYLoQ4CwBestn+PIPZAdXQczHixpE/q9NDEnaLegQcmH0CIUfAf +z7dMQJnQ9DxxmHOIlywZ126Ej6QfnFog41FcsMWemWpPyGn3EP9OrRnZyVizM64M +2ZYpnnGycGOjtpkWQh1l8/egHn3F1GUUsmKE1GxcCAzYbJMrtHZZitF//wPYwl24 +LyLWOPD2nGt9RuuZdPfrSg6ppgTre87wXGuYMVqYQOtpxAX0IKjKCDplbDgV9Vws +slXkLGtB8L5cRspKKaBIXiDSRf8F3jSvcEuBOeLKB1d8tjHcISnivpcOd5AUUUDh +v+PMGxmcJcqnBrJT3yOyzxIZow== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD +QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT +MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j +b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB +CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97 +nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt +43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P +T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4 +gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR +TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw +DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr +hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg +06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF +PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls +YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- diff --git a/override/contacts_created.py b/override/contacts_created.py new file mode 100644 index 0000000..7ce361f --- /dev/null +++ b/override/contacts_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class ContactsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ContactObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactsCreated. + + :return: The data of this ContactsCreated. + :rtype: ContactObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactsCreated. + + :param data: The data of this ContactsCreated. + :type: ContactObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/contacts_deleted.py b/override/contacts_deleted.py new file mode 100644 index 0000000..c4ba020 --- /dev/null +++ b/override/contacts_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class ContactsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ContactObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactsDeleted. + + :return: The data of this ContactsDeleted. + :rtype: ContactObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactsDeleted. + + :param data: The data of this ContactsDeleted. + :type: ContactObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/contacts_updated.py b/override/contacts_updated.py new file mode 100644 index 0000000..e4ec27d --- /dev/null +++ b/override/contacts_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class ContactsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ContactObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + ContactsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this ContactsUpdated. + + :return: The data of this ContactsUpdated. + :rtype: ContactObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this ContactsUpdated. + + :param data: The data of this ContactsUpdated. + :type: ContactObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, ContactsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/courses_created.py b/override/courses_created.py new file mode 100644 index 0000000..bfb1846 --- /dev/null +++ b/override/courses_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class CoursesCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CourseObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CoursesCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CoursesCreated. + + :return: The data of this CoursesCreated. + :rtype: CourseObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CoursesCreated. + + :param data: The data of this CoursesCreated. + :type: CourseObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CoursesCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/courses_deleted.py b/override/courses_deleted.py new file mode 100644 index 0000000..84eb363 --- /dev/null +++ b/override/courses_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class CoursesDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CourseObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CoursesDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CoursesDeleted. + + :return: The data of this CoursesDeleted. + :rtype: CourseObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CoursesDeleted. + + :param data: The data of this CoursesDeleted. + :type: CourseObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CoursesDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/courses_updated.py b/override/courses_updated.py new file mode 100644 index 0000000..a6960f7 --- /dev/null +++ b/override/courses_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class CoursesUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CourseObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + CoursesUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this CoursesUpdated. + + :return: The data of this CoursesUpdated. + :rtype: CourseObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this CoursesUpdated. + + :param data: The data of this CoursesUpdated. + :type: CourseObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, CoursesUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/districtadmins_created.py b/override/districtadmins_created.py new file mode 100644 index 0000000..7c2226a --- /dev/null +++ b/override/districtadmins_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictadminsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictadminsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictadminsCreated. + + :return: The data of this DistrictadminsCreated. + :rtype: DistrictAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictadminsCreated. + + :param data: The data of this DistrictadminsCreated. + :type: DistrictAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictadminsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/districtadmins_deleted.py b/override/districtadmins_deleted.py new file mode 100644 index 0000000..56a9419 --- /dev/null +++ b/override/districtadmins_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictadminsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictadminsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictadminsDeleted. + + :return: The data of this DistrictadminsDeleted. + :rtype: DistrictAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictadminsDeleted. + + :param data: The data of this DistrictadminsDeleted. + :type: DistrictAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictadminsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/districtadmins_updated.py b/override/districtadmins_updated.py new file mode 100644 index 0000000..bd3e765 --- /dev/null +++ b/override/districtadmins_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictadminsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictadminsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictadminsUpdated. + + :return: The data of this DistrictadminsUpdated. + :rtype: DistrictAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictadminsUpdated. + + :param data: The data of this DistrictadminsUpdated. + :type: DistrictAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictadminsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/districts_created.py b/override/districts_created.py new file mode 100644 index 0000000..6215970 --- /dev/null +++ b/override/districts_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictsCreated. + + :return: The data of this DistrictsCreated. + :rtype: DistrictObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictsCreated. + + :param data: The data of this DistrictsCreated. + :type: DistrictObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/districts_deleted.py b/override/districts_deleted.py new file mode 100644 index 0000000..cd17f37 --- /dev/null +++ b/override/districts_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictsDeleted. + + :return: The data of this DistrictsDeleted. + :rtype: DistrictObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictsDeleted. + + :param data: The data of this DistrictsDeleted. + :type: DistrictObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/districts_updated.py b/override/districts_updated.py new file mode 100644 index 0000000..e4e3e57 --- /dev/null +++ b/override/districts_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class DistrictsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'DistrictObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + DistrictsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this DistrictsUpdated. + + :return: The data of this DistrictsUpdated. + :rtype: DistrictObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this DistrictsUpdated. + + :param data: The data of this DistrictsUpdated. + :type: DistrictObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, DistrictsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/event.py b/override/event.py new file mode 100644 index 0000000..897bfb8 --- /dev/null +++ b/override/event.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re + + +class Event(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'str', + 'id': 'str', + 'type': 'str' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'type': 'type' + } + + def __init__(self, created=None, id=None, type=None): + """ + Event - a model defined in Swagger + """ + + self._created = None + self._id = None + self._type = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + self.type = type + + @property + def created(self): + """ + Gets the created of this Event. + + :return: The created of this Event. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """ + Sets the created of this Event. + + :param created: The created of this Event. + :type: str + """ + + self._created = created + + @property + def id(self): + """ + Gets the id of this Event. + + :return: The id of this Event. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Event. + + :param id: The id of this Event. + :type: str + """ + + self._id = id + + @property + def type(self): + """ + Gets the type of this Event. + + :return: The type of this Event. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this Event. + + :param type: The type of this Event. + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") + + self._type = type + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, Event): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/importer.py b/override/importer.py new file mode 100644 index 0000000..b1de347 --- /dev/null +++ b/override/importer.py @@ -0,0 +1,21 @@ +# Imports needed in setup.py and __init__.py + +def import_json(): + # Python 2.5 and below do not ship with json + _json_loaded = None + try: + import json + if hasattr(json, 'loads'): + return json + _json_loaded = False + except ImportError: + pass + + try: + import simplejson + return simplejson + except ImportError: + if _json_loaded is None: + raise ImportError("Clever requires a JSON library, which you do not appear to have. Please install the simplejson library. HINT: Try installing the python simplejson library via 'pip install simplejson' or 'easy_install simplejson'.") + else: + raise ImportError("Clever requires a JSON library with the same interface as the Python 2.6 'json' library. You appear to have a 'json' library with a different interface. Please install the simplejson library. HINT: Try installing the python simplejson library via 'pip install simplejson' or 'easy_install simplejson'.") diff --git a/override/override.sh b/override/override.sh new file mode 100755 index 0000000..be4ca9a --- /dev/null +++ b/override/override.sh @@ -0,0 +1,36 @@ + # delete existing files +rm -rf clever || true +# Copy autogenerated files into clever directory and rename +cp -R swagger_client/. clever || true +rm -rf swagger_client || true + +# Rename references of swagger client to Clever +git grep -l 'swagger_client' -- './*' ':(exclude)override/override.sh' | xargs sed -i "" 's/swagger_client/clever/g' +git grep -l 'swagger-client' -- './*' ':(exclude)override/override.sh' | xargs sed -i "" 's/swagger-client/clever-python/g' + +# Update the README +mv README.md docs/README.md +sed -i "" 's/## Documentation for API Endpoints/\'$'\n## Documentation for API Endpoints/g' docs/README.md +sed -i "" '/## Requirements./,//d' docs/README.md +sed -i "" '/## Author/d' docs/README.md +sed -i "" 's/docs\///g' docs/README.md +git grep -l '../README.md' -- './docs/*' | xargs sed -i "" 's/..\/README.md/README.md/g' +cp override/README.md README.md + + +# Copy override files for events +cp override/api_client.py clever/ +cp override/*_created.py clever/models/ +cp override/*_updated.py clever/models/ +cp override/*_deleted.py clever/models/ +cp override/event.py clever/models/ # The autogenerated deserialization ends up in a loop so remove it + +# Copy over tests +cp override/test_* test/ + +# Copy other files over +cp override/VERSION clever/ +cp override/version.py clever/ +cp override/importer.py clever/ +mkdir -p clever/data +cp override/clever.com_ca_bundle.crt clever/data/ diff --git a/override/schooladmins_created.py b/override/schooladmins_created.py new file mode 100644 index 0000000..2f567a9 --- /dev/null +++ b/override/schooladmins_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchooladminsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchooladminsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchooladminsCreated. + + :return: The data of this SchooladminsCreated. + :rtype: SchoolAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchooladminsCreated. + + :param data: The data of this SchooladminsCreated. + :type: SchoolAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchooladminsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/schooladmins_deleted.py b/override/schooladmins_deleted.py new file mode 100644 index 0000000..31f3fe4 --- /dev/null +++ b/override/schooladmins_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchooladminsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchooladminsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchooladminsDeleted. + + :return: The data of this SchooladminsDeleted. + :rtype: SchoolAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchooladminsDeleted. + + :param data: The data of this SchooladminsDeleted. + :type: SchoolAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchooladminsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/schooladmins_updated.py b/override/schooladmins_updated.py new file mode 100644 index 0000000..de89a4f --- /dev/null +++ b/override/schooladmins_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchooladminsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolAdminObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchooladminsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchooladminsUpdated. + + :return: The data of this SchooladminsUpdated. + :rtype: SchoolAdminObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchooladminsUpdated. + + :param data: The data of this SchooladminsUpdated. + :type: SchoolAdminObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchooladminsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/schools_created.py b/override/schools_created.py new file mode 100644 index 0000000..0bdffd1 --- /dev/null +++ b/override/schools_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchoolsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolsCreated. + + :return: The data of this SchoolsCreated. + :rtype: SchoolObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolsCreated. + + :param data: The data of this SchoolsCreated. + :type: SchoolObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/schools_deleted.py b/override/schools_deleted.py new file mode 100644 index 0000000..99a7123 --- /dev/null +++ b/override/schools_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchoolsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolsDeleted. + + :return: The data of this SchoolsDeleted. + :rtype: SchoolObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolsDeleted. + + :param data: The data of this SchoolsDeleted. + :type: SchoolObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/schools_updated.py b/override/schools_updated.py new file mode 100644 index 0000000..46ce732 --- /dev/null +++ b/override/schools_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SchoolsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SchoolObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SchoolsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SchoolsUpdated. + + :return: The data of this SchoolsUpdated. + :rtype: SchoolObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SchoolsUpdated. + + :param data: The data of this SchoolsUpdated. + :type: SchoolObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SchoolsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/sections_created.py b/override/sections_created.py new file mode 100644 index 0000000..a7d4356 --- /dev/null +++ b/override/sections_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SectionsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SectionObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionsCreated. + + :return: The data of this SectionsCreated. + :rtype: SectionObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionsCreated. + + :param data: The data of this SectionsCreated. + :type: SectionObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/sections_deleted.py b/override/sections_deleted.py new file mode 100644 index 0000000..343b1ca --- /dev/null +++ b/override/sections_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SectionsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SectionObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionsDeleted. + + :return: The data of this SectionsDeleted. + :rtype: SectionObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionsDeleted. + + :param data: The data of this SectionsDeleted. + :type: SectionObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/sections_updated.py b/override/sections_updated.py new file mode 100644 index 0000000..dfbca8b --- /dev/null +++ b/override/sections_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class SectionsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'SectionObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + SectionsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this SectionsUpdated. + + :return: The data of this SectionsUpdated. + :rtype: SectionObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this SectionsUpdated. + + :param data: The data of this SectionsUpdated. + :type: SectionObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, SectionsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/students_created.py b/override/students_created.py new file mode 100644 index 0000000..536b798 --- /dev/null +++ b/override/students_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class StudentsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'StudentObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentsCreated. + + :return: The data of this StudentsCreated. + :rtype: StudentObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentsCreated. + + :param data: The data of this StudentsCreated. + :type: StudentObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/students_deleted.py b/override/students_deleted.py new file mode 100644 index 0000000..bfef358 --- /dev/null +++ b/override/students_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class StudentsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'StudentObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentsDeleted. + + :return: The data of this StudentsDeleted. + :rtype: StudentObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentsDeleted. + + :param data: The data of this StudentsDeleted. + :type: StudentObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/students_updated.py b/override/students_updated.py new file mode 100644 index 0000000..fdc80a3 --- /dev/null +++ b/override/students_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class StudentsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'StudentObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + StudentsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this StudentsUpdated. + + :return: The data of this StudentsUpdated. + :rtype: StudentObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this StudentsUpdated. + + :param data: The data of this StudentsUpdated. + :type: StudentObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, StudentsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/teachers_created.py b/override/teachers_created.py new file mode 100644 index 0000000..729454b --- /dev/null +++ b/override/teachers_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TeachersCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TeacherObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeachersCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeachersCreated. + + :return: The data of this TeachersCreated. + :rtype: TeacherObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeachersCreated. + + :param data: The data of this TeachersCreated. + :type: TeacherObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeachersCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/teachers_deleted.py b/override/teachers_deleted.py new file mode 100644 index 0000000..1043ac0 --- /dev/null +++ b/override/teachers_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TeachersDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TeacherObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeachersDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeachersDeleted. + + :return: The data of this TeachersDeleted. + :rtype: TeacherObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeachersDeleted. + + :param data: The data of this TeachersDeleted. + :type: TeacherObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeachersDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/teachers_updated.py b/override/teachers_updated.py new file mode 100644 index 0000000..4ad0458 --- /dev/null +++ b/override/teachers_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TeachersUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TeacherObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TeachersUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TeachersUpdated. + + :return: The data of this TeachersUpdated. + :rtype: TeacherObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TeachersUpdated. + + :param data: The data of this TeachersUpdated. + :type: TeacherObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TeachersUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/terms_created.py b/override/terms_created.py new file mode 100644 index 0000000..7dac9d1 --- /dev/null +++ b/override/terms_created.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TermsCreated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TermObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermsCreated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermsCreated. + + :return: The data of this TermsCreated. + :rtype: TermObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermsCreated. + + :param data: The data of this TermsCreated. + :type: TermObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermsCreated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/terms_deleted.py b/override/terms_deleted.py new file mode 100644 index 0000000..7edd24d --- /dev/null +++ b/override/terms_deleted.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TermsDeleted(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TermObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermsDeleted - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermsDeleted. + + :return: The data of this TermsDeleted. + :rtype: TermObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermsDeleted. + + :param data: The data of this TermsDeleted. + :type: TermObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermsDeleted): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/terms_updated.py b/override/terms_updated.py new file mode 100644 index 0000000..55dc58f --- /dev/null +++ b/override/terms_updated.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from pprint import pformat +from six import iteritems +import re +from . import event + +class TermsUpdated(event.Event): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TermObject' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): + """ + TermsUpdated - a model defined in Swagger + """ + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """ + Gets the data of this TermsUpdated. + + :return: The data of this TermsUpdated. + :rtype: TermObject + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this TermsUpdated. + + :param data: The data of this TermsUpdated. + :type: TermObject + """ + + self._data = data + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + if not isinstance(other, TermsUpdated): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other diff --git a/override/test_data_api.py b/override/test_data_api.py new file mode 100644 index 0000000..1d5bcfa --- /dev/null +++ b/override/test_data_api.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest +import urllib3 + +import clever +from clever.rest import ApiException +from clever.apis.data_api import DataApi + +class MockPoolManager(object): + def __init__(self, tc): + self._tc = tc + self._reqs = [] + + def expect_request(self, *args, **kwargs): + self._reqs.append((args, kwargs)) + + def request(self, *args, **kwargs): + return urllib3.HTTPResponse(status=200, body='{"data": {"name": "Oh haiô"}}') + +class TestDataApi(unittest.TestCase): + """ DataApi unit test stubs """ + + def setUp(self): + self.api = clever.apis.data_api.DataApi() + self.api.api_client.configuration.access_token = 'TEST_TOKEN' + + def tearDown(self): + pass + + def test_unicode_send(self): + # Make sure unicode requests can be sent. 404 error is an ApiException + self.assertRaises(ApiException, self.api.get_district, u'☃') + + def test_unicode_receive(self): + mock_pool = MockPoolManager(self) + real_pool = self.api.api_client.rest_client.pool_manager + self.api.api_client.rest_client.pool_manager = mock_pool + + mock_pool.expect_request('GET', 'https://api.clever.com/v2.0/districts/something') + # Make sure unicode responses can be received. + self.assertEqual(u'Oh haiô', self.api.get_district('something').data.name) + self.api.api_client.rest_client.pool_manager = real_pool + + + def test_get_contact(self): + """ + Test case for get_contact + + + """ + pass + + def test_get_contacts(self): + """ + Test case for get_contacts + + + """ + pass + + def test_get_contacts_for_student(self): + """ + Test case for get_contacts_for_student + + + """ + pass + + def test_get_district(self): + """ + Test case for get_district + + + """ + pass + + def test_get_district_admin(self): + """ + Test case for get_district_admin + + + """ + pass + + def test_get_district_admins(self): + """ + Test case for get_district_admins + + + """ + pass + + def test_get_district_for_school(self): + """ + Test case for get_district_for_school + + + """ + pass + + def test_get_district_for_section(self): + """ + Test case for get_district_for_section + + + """ + pass + + def test_get_district_for_student(self): + """ + Test case for get_district_for_student + + + """ + pass + + def test_get_district_for_student_contact(self): + """ + Test case for get_district_for_student_contact + + + """ + pass + + def test_get_district_for_teacher(self): + """ + Test case for get_district_for_teacher + + + """ + pass + + def test_get_district_status(self): + """ + Test case for get_district_status + + + """ + pass + + def test_get_districts(self): + """ + Test case for get_districts + + + """ + pass + + def test_get_grade_levels_for_teacher(self): + """ + Test case for get_grade_levels_for_teacher + + + """ + pass + + def test_get_school(self): + """ + Test case for get_school + + + """ + pass + + def test_get_school_admin(self): + """ + Test case for get_school_admin + + + """ + pass + + def test_get_school_admins(self): + """ + Test case for get_school_admins + + + """ + pass + + def test_get_school_for_section(self): + """ + Test case for get_school_for_section + + + """ + pass + + def test_get_school_for_student(self): + """ + Test case for get_school_for_student + + + """ + pass + + def test_get_school_for_teacher(self): + """ + Test case for get_school_for_teacher + + + """ + pass + + def test_get_schools(self): + """ + Test case for get_schools + + + """ + pass + + def test_get_schools_for_school_admin(self): + """ + Test case for get_schools_for_school_admin + + + """ + pass + + def test_get_section(self): + """ + Test case for get_section + + + """ + pass + + def test_get_sections(self): + """ + Test case for get_sections + + + """ + pass + + def test_get_sections_for_school(self): + """ + Test case for get_sections_for_school + + + """ + pass + + def test_get_sections_for_student(self): + """ + Test case for get_sections_for_student + + + """ + pass + + def test_get_sections_for_teacher(self): + """ + Test case for get_sections_for_teacher + + + """ + pass + + def test_get_student(self): + """ + Test case for get_student + + + """ + pass + + def test_get_student_for_contact(self): + """ + Test case for get_student_for_contact + + + """ + pass + + def test_get_students(self): + """ + Test case for get_students + + + """ + pass + + def test_get_students_for_school(self): + """ + Test case for get_students_for_school + + + """ + pass + + def test_get_students_for_section(self): + """ + Test case for get_students_for_section + + + """ + pass + + def test_get_students_for_teacher(self): + """ + Test case for get_students_for_teacher + + + """ + pass + + def test_get_teacher(self): + """ + Test case for get_teacher + + + """ + pass + + def test_get_teacher_for_section(self): + """ + Test case for get_teacher_for_section + + + """ + pass + + def test_get_teachers(self): + """ + Test case for get_teachers + + + """ + pass + + def test_get_teachers_for_school(self): + """ + Test case for get_teachers_for_school + + + """ + pass + + def test_get_teachers_for_section(self): + """ + Test case for get_teachers_for_section + + + """ + pass + + def test_get_teachers_for_student(self): + """ + Test case for get_teachers_for_student + + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/override/test_events_api.py b/override/test_events_api.py new file mode 100644 index 0000000..b5c33b9 --- /dev/null +++ b/override/test_events_api.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.apis.events_api import EventsApi + + +class TestEventsApi(unittest.TestCase): + """ EventsApi unit test stubs """ + + def setUp(self): + self.api = clever.apis.events_api.EventsApi() + self.api.api_client.configuration.access_token = 'TEST_TOKEN' + + def tearDown(self): + pass + + def test_get_event(self): + """ + Test case for get_event + + + """ + pass + + def test_get_events(self): + """ + Test case for get_events + + + """ + + # Check event class is properly set + response = self.api.get_events(limit=1) + event = response.data[0] + event_class = type(event.data).__name__ + self.assertTrue(event_class != 'Event') + self.assertTrue(event_class.endswith('Created') or event_class.endswith('Updated') or event_class.endswith('Deleted')) + + def test_get_events_for_school(self): + """ + Test case for get_events_for_school + + + """ + pass + + def test_get_events_for_school_admin(self): + """ + Test case for get_events_for_school_admin + + + """ + pass + + def test_get_events_for_section(self): + """ + Test case for get_events_for_section + + + """ + pass + + def test_get_events_for_student(self): + """ + Test case for get_events_for_student + + + """ + pass + + def test_get_events_for_teacher(self): + """ + Test case for get_events_for_teacher + + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/override/version.py b/override/version.py new file mode 100644 index 0000000..a711738 --- /dev/null +++ b/override/version.py @@ -0,0 +1,4 @@ +import pkg_resources + +version_file = pkg_resources.resource_stream(__name__, "VERSION") +VERSION = version_file.readline().strip().decode() diff --git a/publish.sh b/publish.sh index 52b034d..106dfb3 100755 --- a/publish.sh +++ b/publish.sh @@ -17,7 +17,7 @@ fi read -p "Publish and tag as v$version? " -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then # publish to pypi - python setup.py sdist upload + python setup.py sdist upload -r https://upload.pypi.org/legacy/ # create git tags git tag -a v$version -m "version $version" diff --git a/requirements.txt b/requirements.txt index aff2b9e..bafdc07 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ -httmock>=1.2.2 -requests>=0.8.8 -six>=1.10.0 \ No newline at end of file +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.py b/setup.py index c77ba6e..6799947 100644 --- a/setup.py +++ b/setup.py @@ -1,40 +1,57 @@ -import os +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + import sys +from setuptools import setup, find_packages + +NAME = "clever-python" +VERSION = "3.0.2" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="Clever API", + author_email="", + url="", + keywords=["Swagger", "Clever API"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + The Clever API + """ +) -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -# Don't import clever module here, since deps may not be installed -sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'clever')) -import importer -import version - -path, script = os.path.split(sys.argv[0]) -os.chdir(os.path.abspath(path)) - -# Get simplejson if we don't already have json -install_requires = ['requests >= 0.8.8'] -try: - importer.import_json() -except ImportError: - install_requires.append('simplejson') - -try: - import json - _json_loaded = hasattr(json, 'loads') -except ImportError: - pass - -setup(name='clever', - version=version.VERSION, - description='Clever Python bindings', - author='Clever', - author_email='tech-support@clever.com', - url='https://clever.com/', - packages=['clever'], - package_data={'clever' : ['data/clever.com_ca_bundle.crt', 'VERSION']}, - install_requires=install_requires, - test_suite='test', +# We publish to both 'clever' and 'clever-python' +setup( + name="clever", + version=VERSION, + description="Clever API", + author_email="", + url="", + keywords=["Swagger", "Clever API"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + The Clever API + """ ) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/test.py b/test.py new file mode 100644 index 0000000..71f6a1c --- /dev/null +++ b/test.py @@ -0,0 +1,5 @@ +import clever +clever.set_token('6c6fe12c1fc88de03a2612c93634b32ed7452638') + +contacts = clever.Student.all() +print contacts diff --git a/test/requirements.txt b/test/requirements.txt deleted file mode 100644 index bd00cb4..0000000 --- a/test/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -httmock \ No newline at end of file diff --git a/test/test_bad_request.py b/test/test_bad_request.py new file mode 100644 index 0000000..f93fc04 --- /dev/null +++ b/test/test_bad_request.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.bad_request import BadRequest + + +class TestBadRequest(unittest.TestCase): + """ BadRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBadRequest(self): + """ + Test BadRequest + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.bad_request.BadRequest() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cert_pinning.py b/test/test_cert_pinning.py deleted file mode 100644 index b9ec880..0000000 --- a/test/test_cert_pinning.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- - -import os -import sys -import unittest -sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) -import clever -from clever import importer - -class CleverTestCase(unittest.TestCase): - def setUp(self): - super(CleverTestCase, self).setUp() - clever.set_token('DEMO_TOKEN') - -class CertPinning(CleverTestCase): - def test_prod_api(self): - clever.api_base = 'https://api.clever.com/' - district = clever.District.all()[0] - self.assertEqual(district.name, 'Demo District') - - def test_cert_failure(self): - clever.api_base = 'https://httpbin.org/' - self.assertRaises(clever.APIConnectionError, clever.District.all) - -if __name__ == '__main__': - suite = unittest.TestSuite() - suite.addTest(unittest.TestLoader().loadTestsFromTestCase(CertPinning)) - unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/test/test_clever.py b/test/test_clever.py deleted file mode 100644 index 49565ca..0000000 --- a/test/test_clever.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -import os -import sys -import unittest -import httmock -import itertools - -sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) -import clever -from clever import importer -json = importer.import_json() - -import requests -from httmock import response, HTTMock - - -def functional_test(auth): - class FunctionalTests(CleverTestCase): - - def setUp(self): - super(FunctionalTests, self).setUp() - clever.api_base = os.environ.get('CLEVER_API_BASE', 'https://api.clever.com/') - if auth.get("token", None): - clever.set_token(auth["token"]) - return FunctionalTests - - -class CleverTestCase(unittest.TestCase): - - def setUp(self): - super(CleverTestCase, self).setUp() - clever.api_base = os.environ.get('CLEVER_API_BASE', 'https://api.clever.com/') - clever.set_token('DEMO_TOKEN') - - -class FunctionalTests(CleverTestCase): - - def test_dns_failure(self): - api_base = clever.api_base - try: - clever.api_base = 'https://my-invalid-domain.ireallywontresolve/v1' - self.assertRaises(clever.APIConnectionError, clever.District.all) - finally: - clever.api_base = api_base - - def test_list_accessors(self): - district = clever.District.all()[0] - self.assertEqual(district['name'], district.name) - - def test_iter(self): - for district in clever.District.iter(): - self.assertTrue(district.id) - - def test_starting_after(self): - allstudents = clever.Student.all() - second_to_last_id = allstudents[len(allstudents)-2]['id'] - students = clever.Student.iter(starting_after=second_to_last_id) - count = len(list(students)) - self.assertTrue(count==1) - - def test_ending_before(self): - allstudents = clever.Student.all() - second_id = allstudents[1]['id'] - students = clever.Student.iter(ending_before=second_id) - count = len(list(students)) - self.assertTrue(count==1) - - def test_iter_count(self): - r = requests.get('https://api.clever.com/v1.1/students?count=true', - headers={'Authorization': 'Bearer DEMO_TOKEN'}) - - req_count = json.loads(r.text)["count"] - iter_count = len([x for x in clever.Student.iter()]) - - self.assertTrue(req_count > clever.Student.ITER_LIMIT) - self.assertEqual(req_count, iter_count) - - def test_unsupported_params(self): - self.assertRaises(clever.CleverError, lambda: clever.District.all(page=2)) - self.assertRaises(clever.CleverError, lambda: clever.District.all(limit=10)) - self.assertRaises(clever.CleverError, lambda: clever.District.all(page=2, limit=10)) - - def test_unicode(self): - # Make sure unicode requests can be sent - self.assertRaises(clever.APIError, clever.District.retrieve, id=u'☃') - - def test_none_values(self): - district = clever.District.all(sort=None)[0] - self.assertTrue(district.id) - - def test_missing_id(self): - district = clever.District() - self.assertRaises(clever.InvalidRequestError, district.refresh) - - def test_keys_and_values_methods(self): - clever_object = clever.CleverObject() - self.assertEqual(clever_object.keys(), set()) - self.assertEqual(clever_object.values(), set()) - - def test_empty_list_on_no_data(self): - district = clever.District.all(where=json.dumps({'name': 'asdf'})) - self.assertEqual(district, []) - -class AuthenticationErrorTest(CleverTestCase): - - def test_invalid_credentials(self): - token = clever.get_token() - try: - clever.set_token('invalid') - clever.District.all() - except clever.AuthenticationError, e: - self.assertEqual(401, e.http_status) - self.assertTrue(isinstance(e.http_body, str)) - self.assertTrue(isinstance(e.json_body, dict)) - finally: - clever.set_token(token) - - -class InvalidRequestErrorTest(CleverTestCase): - - def test_nonexistent_object(self): - try: - clever.District.retrieve('invalid') - except clever.APIError, e: - self.assertEqual(404, e.http_status) - self.assertFalse(isinstance(e.json_body, dict)) # 404 does not have a body - self.assertTrue(isinstance(e.http_body, str)) - -#generates httmock responses for TooManyRequestsErrorTest -def too_many_requests_content(url, request): - headers = { - 'X-Ratelimit-Bucket': 'all, none', - 'X-Ratelimit-Limit' : '200, 1200', - 'X-Ratelimit-Reset' : '135136, 31634', - 'X-Ratelimit-Remaining' : '0, 0' - } - return response(429, "", headers, None, 5, None) - -class TooManyRequestsErrorTest(CleverTestCase): - - def test_rate_limiter(self): - with HTTMock(too_many_requests_content): - r = requests.get('https://test.rate.limiting/') - res = {'body': r.content, 'headers': r.headers, 'code': 429} - APIRequestor = clever.APIRequestor() - self.assertRaises(clever.TooManyRequestsError, lambda : APIRequestor.interpret_response(res)) - -if __name__ == '__main__': - suite = unittest.TestSuite() - for TestClass in [ - functional_test({"token": "DEMO_TOKEN"}), - AuthenticationErrorTest, - InvalidRequestErrorTest, - TooManyRequestsErrorTest]: - suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestClass)) - unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/test/test_cli_clever.py b/test/test_cli_clever.py deleted file mode 100644 index 7a73c0c..0000000 --- a/test/test_cli_clever.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -import os -import unittest -import subprocess - -CLI_CLEVER = os.path.join(os.path.dirname(__file__), '../bin/clever ') - -class CleverCLITestCase(unittest.TestCase): - - def run_clever(self, args='', env=None): - """ - Runs the cli clever script, passes supplied args. - """ - process = subprocess.Popen(CLI_CLEVER + args, shell=True, env=env, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - - out, err = process.communicate() - code = process.returncode - return out, err, code - - def test_help(self): - # Test help on error - out, err, code = self.run_clever() - self.assertEqual(code, 1) - # Test help on option - out, err, code = self.run_clever('-h') - self.assertEqual(code, 0) - - def test_api_token(self): - # Check for error when key is not provided - out, err, code = self.run_clever('district all') - self.assertEqual(code, 2) - # Check for no error when key is provided via -t - out, err, code = self.run_clever('district all -t DEMO_TOKEN') - self.assertEqual(code, 0) - # Check for no error when key is provided via CLEVER_API_TOKEN - env = {'CLEVER_API_TOKEN':'DEMO_TOKEN'} - out, err, code = self.run_clever('district all', env) - self.assertEqual(code, 0) diff --git a/test/test_contact.py b/test/test_contact.py new file mode 100644 index 0000000..5ad7cce --- /dev/null +++ b/test/test_contact.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.contact import Contact + + +class TestContact(unittest.TestCase): + """ Contact unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContact(self): + """ + Test Contact + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.contact.Contact() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contact_object.py b/test/test_contact_object.py new file mode 100644 index 0000000..57668e7 --- /dev/null +++ b/test/test_contact_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.contact_object import ContactObject + + +class TestContactObject(unittest.TestCase): + """ ContactObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContactObject(self): + """ + Test ContactObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.contact_object.ContactObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contact_response.py b/test/test_contact_response.py new file mode 100644 index 0000000..a92dc9b --- /dev/null +++ b/test/test_contact_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.contact_response import ContactResponse + + +class TestContactResponse(unittest.TestCase): + """ ContactResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContactResponse(self): + """ + Test ContactResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.contact_response.ContactResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contacts_created.py b/test/test_contacts_created.py new file mode 100644 index 0000000..1109203 --- /dev/null +++ b/test/test_contacts_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.contacts_created import ContactsCreated + + +class TestContactsCreated(unittest.TestCase): + """ ContactsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContactsCreated(self): + """ + Test ContactsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.contacts_created.ContactsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contacts_deleted.py b/test/test_contacts_deleted.py new file mode 100644 index 0000000..507653d --- /dev/null +++ b/test/test_contacts_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.contacts_deleted import ContactsDeleted + + +class TestContactsDeleted(unittest.TestCase): + """ ContactsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContactsDeleted(self): + """ + Test ContactsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.contacts_deleted.ContactsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contacts_response.py b/test/test_contacts_response.py new file mode 100644 index 0000000..c2c9580 --- /dev/null +++ b/test/test_contacts_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.contacts_response import ContactsResponse + + +class TestContactsResponse(unittest.TestCase): + """ ContactsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContactsResponse(self): + """ + Test ContactsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.contacts_response.ContactsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contacts_updated.py b/test/test_contacts_updated.py new file mode 100644 index 0000000..427855c --- /dev/null +++ b/test/test_contacts_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.contacts_updated import ContactsUpdated + + +class TestContactsUpdated(unittest.TestCase): + """ ContactsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContactsUpdated(self): + """ + Test ContactsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.contacts_updated.ContactsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_course.py b/test/test_course.py new file mode 100644 index 0000000..a595329 --- /dev/null +++ b/test/test_course.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.course import Course + + +class TestCourse(unittest.TestCase): + """ Course unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCourse(self): + """ + Test Course + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.course.Course() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_course_object.py b/test/test_course_object.py new file mode 100644 index 0000000..28d9201 --- /dev/null +++ b/test/test_course_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.course_object import CourseObject + + +class TestCourseObject(unittest.TestCase): + """ CourseObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCourseObject(self): + """ + Test CourseObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.course_object.CourseObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_course_response.py b/test/test_course_response.py new file mode 100644 index 0000000..05207f7 --- /dev/null +++ b/test/test_course_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.course_response import CourseResponse + + +class TestCourseResponse(unittest.TestCase): + """ CourseResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCourseResponse(self): + """ + Test CourseResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.course_response.CourseResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_courses_created.py b/test/test_courses_created.py new file mode 100644 index 0000000..142c397 --- /dev/null +++ b/test/test_courses_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.courses_created import CoursesCreated + + +class TestCoursesCreated(unittest.TestCase): + """ CoursesCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCoursesCreated(self): + """ + Test CoursesCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.courses_created.CoursesCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_courses_deleted.py b/test/test_courses_deleted.py new file mode 100644 index 0000000..564bdf1 --- /dev/null +++ b/test/test_courses_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.courses_deleted import CoursesDeleted + + +class TestCoursesDeleted(unittest.TestCase): + """ CoursesDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCoursesDeleted(self): + """ + Test CoursesDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.courses_deleted.CoursesDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_courses_response.py b/test/test_courses_response.py new file mode 100644 index 0000000..383dc1c --- /dev/null +++ b/test/test_courses_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.courses_response import CoursesResponse + + +class TestCoursesResponse(unittest.TestCase): + """ CoursesResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCoursesResponse(self): + """ + Test CoursesResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.courses_response.CoursesResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_courses_updated.py b/test/test_courses_updated.py new file mode 100644 index 0000000..7d27dc6 --- /dev/null +++ b/test/test_courses_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.courses_updated import CoursesUpdated + + +class TestCoursesUpdated(unittest.TestCase): + """ CoursesUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCoursesUpdated(self): + """ + Test CoursesUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.courses_updated.CoursesUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_credentials.py b/test/test_credentials.py new file mode 100644 index 0000000..bf5e54b --- /dev/null +++ b/test/test_credentials.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.credentials import Credentials + + +class TestCredentials(unittest.TestCase): + """ Credentials unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCredentials(self): + """ + Test Credentials + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.credentials.Credentials() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_data_api.py b/test/test_data_api.py new file mode 100644 index 0000000..1d5bcfa --- /dev/null +++ b/test/test_data_api.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest +import urllib3 + +import clever +from clever.rest import ApiException +from clever.apis.data_api import DataApi + +class MockPoolManager(object): + def __init__(self, tc): + self._tc = tc + self._reqs = [] + + def expect_request(self, *args, **kwargs): + self._reqs.append((args, kwargs)) + + def request(self, *args, **kwargs): + return urllib3.HTTPResponse(status=200, body='{"data": {"name": "Oh haiô"}}') + +class TestDataApi(unittest.TestCase): + """ DataApi unit test stubs """ + + def setUp(self): + self.api = clever.apis.data_api.DataApi() + self.api.api_client.configuration.access_token = 'TEST_TOKEN' + + def tearDown(self): + pass + + def test_unicode_send(self): + # Make sure unicode requests can be sent. 404 error is an ApiException + self.assertRaises(ApiException, self.api.get_district, u'☃') + + def test_unicode_receive(self): + mock_pool = MockPoolManager(self) + real_pool = self.api.api_client.rest_client.pool_manager + self.api.api_client.rest_client.pool_manager = mock_pool + + mock_pool.expect_request('GET', 'https://api.clever.com/v2.0/districts/something') + # Make sure unicode responses can be received. + self.assertEqual(u'Oh haiô', self.api.get_district('something').data.name) + self.api.api_client.rest_client.pool_manager = real_pool + + + def test_get_contact(self): + """ + Test case for get_contact + + + """ + pass + + def test_get_contacts(self): + """ + Test case for get_contacts + + + """ + pass + + def test_get_contacts_for_student(self): + """ + Test case for get_contacts_for_student + + + """ + pass + + def test_get_district(self): + """ + Test case for get_district + + + """ + pass + + def test_get_district_admin(self): + """ + Test case for get_district_admin + + + """ + pass + + def test_get_district_admins(self): + """ + Test case for get_district_admins + + + """ + pass + + def test_get_district_for_school(self): + """ + Test case for get_district_for_school + + + """ + pass + + def test_get_district_for_section(self): + """ + Test case for get_district_for_section + + + """ + pass + + def test_get_district_for_student(self): + """ + Test case for get_district_for_student + + + """ + pass + + def test_get_district_for_student_contact(self): + """ + Test case for get_district_for_student_contact + + + """ + pass + + def test_get_district_for_teacher(self): + """ + Test case for get_district_for_teacher + + + """ + pass + + def test_get_district_status(self): + """ + Test case for get_district_status + + + """ + pass + + def test_get_districts(self): + """ + Test case for get_districts + + + """ + pass + + def test_get_grade_levels_for_teacher(self): + """ + Test case for get_grade_levels_for_teacher + + + """ + pass + + def test_get_school(self): + """ + Test case for get_school + + + """ + pass + + def test_get_school_admin(self): + """ + Test case for get_school_admin + + + """ + pass + + def test_get_school_admins(self): + """ + Test case for get_school_admins + + + """ + pass + + def test_get_school_for_section(self): + """ + Test case for get_school_for_section + + + """ + pass + + def test_get_school_for_student(self): + """ + Test case for get_school_for_student + + + """ + pass + + def test_get_school_for_teacher(self): + """ + Test case for get_school_for_teacher + + + """ + pass + + def test_get_schools(self): + """ + Test case for get_schools + + + """ + pass + + def test_get_schools_for_school_admin(self): + """ + Test case for get_schools_for_school_admin + + + """ + pass + + def test_get_section(self): + """ + Test case for get_section + + + """ + pass + + def test_get_sections(self): + """ + Test case for get_sections + + + """ + pass + + def test_get_sections_for_school(self): + """ + Test case for get_sections_for_school + + + """ + pass + + def test_get_sections_for_student(self): + """ + Test case for get_sections_for_student + + + """ + pass + + def test_get_sections_for_teacher(self): + """ + Test case for get_sections_for_teacher + + + """ + pass + + def test_get_student(self): + """ + Test case for get_student + + + """ + pass + + def test_get_student_for_contact(self): + """ + Test case for get_student_for_contact + + + """ + pass + + def test_get_students(self): + """ + Test case for get_students + + + """ + pass + + def test_get_students_for_school(self): + """ + Test case for get_students_for_school + + + """ + pass + + def test_get_students_for_section(self): + """ + Test case for get_students_for_section + + + """ + pass + + def test_get_students_for_teacher(self): + """ + Test case for get_students_for_teacher + + + """ + pass + + def test_get_teacher(self): + """ + Test case for get_teacher + + + """ + pass + + def test_get_teacher_for_section(self): + """ + Test case for get_teacher_for_section + + + """ + pass + + def test_get_teachers(self): + """ + Test case for get_teachers + + + """ + pass + + def test_get_teachers_for_school(self): + """ + Test case for get_teachers_for_school + + + """ + pass + + def test_get_teachers_for_section(self): + """ + Test case for get_teachers_for_section + + + """ + pass + + def test_get_teachers_for_student(self): + """ + Test case for get_teachers_for_student + + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_district.py b/test/test_district.py new file mode 100644 index 0000000..0d70e40 --- /dev/null +++ b/test/test_district.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.district import District + + +class TestDistrict(unittest.TestCase): + """ District unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrict(self): + """ + Test District + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.district.District() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_district_admin.py b/test/test_district_admin.py new file mode 100644 index 0000000..a206473 --- /dev/null +++ b/test/test_district_admin.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.district_admin import DistrictAdmin + + +class TestDistrictAdmin(unittest.TestCase): + """ DistrictAdmin unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictAdmin(self): + """ + Test DistrictAdmin + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.district_admin.DistrictAdmin() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_district_admin_object.py b/test/test_district_admin_object.py new file mode 100644 index 0000000..2a4d88e --- /dev/null +++ b/test/test_district_admin_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.district_admin_object import DistrictAdminObject + + +class TestDistrictAdminObject(unittest.TestCase): + """ DistrictAdminObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictAdminObject(self): + """ + Test DistrictAdminObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.district_admin_object.DistrictAdminObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_district_admin_response.py b/test/test_district_admin_response.py new file mode 100644 index 0000000..a10749e --- /dev/null +++ b/test/test_district_admin_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.district_admin_response import DistrictAdminResponse + + +class TestDistrictAdminResponse(unittest.TestCase): + """ DistrictAdminResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictAdminResponse(self): + """ + Test DistrictAdminResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.district_admin_response.DistrictAdminResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_district_admins_response.py b/test/test_district_admins_response.py new file mode 100644 index 0000000..0adccfd --- /dev/null +++ b/test/test_district_admins_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.district_admins_response import DistrictAdminsResponse + + +class TestDistrictAdminsResponse(unittest.TestCase): + """ DistrictAdminsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictAdminsResponse(self): + """ + Test DistrictAdminsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.district_admins_response.DistrictAdminsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_district_object.py b/test/test_district_object.py new file mode 100644 index 0000000..637c63f --- /dev/null +++ b/test/test_district_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.district_object import DistrictObject + + +class TestDistrictObject(unittest.TestCase): + """ DistrictObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictObject(self): + """ + Test DistrictObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.district_object.DistrictObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_district_response.py b/test/test_district_response.py new file mode 100644 index 0000000..4991d12 --- /dev/null +++ b/test/test_district_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.district_response import DistrictResponse + + +class TestDistrictResponse(unittest.TestCase): + """ DistrictResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictResponse(self): + """ + Test DistrictResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.district_response.DistrictResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_districtadmins_created.py b/test/test_districtadmins_created.py new file mode 100644 index 0000000..012378e --- /dev/null +++ b/test/test_districtadmins_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.districtadmins_created import DistrictadminsCreated + + +class TestDistrictadminsCreated(unittest.TestCase): + """ DistrictadminsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictadminsCreated(self): + """ + Test DistrictadminsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.districtadmins_created.DistrictadminsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_districtadmins_deleted.py b/test/test_districtadmins_deleted.py new file mode 100644 index 0000000..63bb484 --- /dev/null +++ b/test/test_districtadmins_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.districtadmins_deleted import DistrictadminsDeleted + + +class TestDistrictadminsDeleted(unittest.TestCase): + """ DistrictadminsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictadminsDeleted(self): + """ + Test DistrictadminsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.districtadmins_deleted.DistrictadminsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_districtadmins_updated.py b/test/test_districtadmins_updated.py new file mode 100644 index 0000000..cbd840f --- /dev/null +++ b/test/test_districtadmins_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.districtadmins_updated import DistrictadminsUpdated + + +class TestDistrictadminsUpdated(unittest.TestCase): + """ DistrictadminsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictadminsUpdated(self): + """ + Test DistrictadminsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.districtadmins_updated.DistrictadminsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_districts_created.py b/test/test_districts_created.py new file mode 100644 index 0000000..045803c --- /dev/null +++ b/test/test_districts_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.districts_created import DistrictsCreated + + +class TestDistrictsCreated(unittest.TestCase): + """ DistrictsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictsCreated(self): + """ + Test DistrictsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.districts_created.DistrictsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_districts_deleted.py b/test/test_districts_deleted.py new file mode 100644 index 0000000..4b448af --- /dev/null +++ b/test/test_districts_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.districts_deleted import DistrictsDeleted + + +class TestDistrictsDeleted(unittest.TestCase): + """ DistrictsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictsDeleted(self): + """ + Test DistrictsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.districts_deleted.DistrictsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_districts_response.py b/test/test_districts_response.py new file mode 100644 index 0000000..33a1f3d --- /dev/null +++ b/test/test_districts_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.districts_response import DistrictsResponse + + +class TestDistrictsResponse(unittest.TestCase): + """ DistrictsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictsResponse(self): + """ + Test DistrictsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.districts_response.DistrictsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_districts_updated.py b/test/test_districts_updated.py new file mode 100644 index 0000000..72b0ec9 --- /dev/null +++ b/test/test_districts_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.districts_updated import DistrictsUpdated + + +class TestDistrictsUpdated(unittest.TestCase): + """ DistrictsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDistrictsUpdated(self): + """ + Test DistrictsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.districts_updated.DistrictsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_event.py b/test/test_event.py new file mode 100644 index 0000000..72bbade --- /dev/null +++ b/test/test_event.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.event import Event + + +class TestEvent(unittest.TestCase): + """ Event unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEvent(self): + """ + Test Event + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.event.Event() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_event_response.py b/test/test_event_response.py new file mode 100644 index 0000000..73d1dae --- /dev/null +++ b/test/test_event_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.event_response import EventResponse + + +class TestEventResponse(unittest.TestCase): + """ EventResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEventResponse(self): + """ + Test EventResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.event_response.EventResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_events_api.py b/test/test_events_api.py new file mode 100644 index 0000000..b5c33b9 --- /dev/null +++ b/test/test_events_api.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.apis.events_api import EventsApi + + +class TestEventsApi(unittest.TestCase): + """ EventsApi unit test stubs """ + + def setUp(self): + self.api = clever.apis.events_api.EventsApi() + self.api.api_client.configuration.access_token = 'TEST_TOKEN' + + def tearDown(self): + pass + + def test_get_event(self): + """ + Test case for get_event + + + """ + pass + + def test_get_events(self): + """ + Test case for get_events + + + """ + + # Check event class is properly set + response = self.api.get_events(limit=1) + event = response.data[0] + event_class = type(event.data).__name__ + self.assertTrue(event_class != 'Event') + self.assertTrue(event_class.endswith('Created') or event_class.endswith('Updated') or event_class.endswith('Deleted')) + + def test_get_events_for_school(self): + """ + Test case for get_events_for_school + + + """ + pass + + def test_get_events_for_school_admin(self): + """ + Test case for get_events_for_school_admin + + + """ + pass + + def test_get_events_for_section(self): + """ + Test case for get_events_for_section + + + """ + pass + + def test_get_events_for_student(self): + """ + Test case for get_events_for_student + + + """ + pass + + def test_get_events_for_teacher(self): + """ + Test case for get_events_for_teacher + + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_events_response.py b/test/test_events_response.py new file mode 100644 index 0000000..68405b3 --- /dev/null +++ b/test/test_events_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.events_response import EventsResponse + + +class TestEventsResponse(unittest.TestCase): + """ EventsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEventsResponse(self): + """ + Test EventsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.events_response.EventsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_error.py b/test/test_internal_error.py new file mode 100644 index 0000000..ffc00d7 --- /dev/null +++ b/test/test_internal_error.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.internal_error import InternalError + + +class TestInternalError(unittest.TestCase): + """ InternalError unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInternalError(self): + """ + Test InternalError + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.internal_error.InternalError() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_location.py b/test/test_location.py new file mode 100644 index 0000000..ec66f50 --- /dev/null +++ b/test/test_location.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.location import Location + + +class TestLocation(unittest.TestCase): + """ Location unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLocation(self): + """ + Test Location + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.location.Location() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_name.py b/test/test_name.py new file mode 100644 index 0000000..3439889 --- /dev/null +++ b/test/test_name.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.name import Name + + +class TestName(unittest.TestCase): + """ Name unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testName(self): + """ + Test Name + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.name.Name() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_not_found.py b/test/test_not_found.py new file mode 100644 index 0000000..8389659 --- /dev/null +++ b/test/test_not_found.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.not_found import NotFound + + +class TestNotFound(unittest.TestCase): + """ NotFound unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotFound(self): + """ + Test NotFound + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.not_found.NotFound() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_principal.py b/test/test_principal.py new file mode 100644 index 0000000..1373600 --- /dev/null +++ b/test/test_principal.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.principal import Principal + + +class TestPrincipal(unittest.TestCase): + """ Principal unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPrincipal(self): + """ + Test Principal + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.principal.Principal() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_school.py b/test/test_school.py new file mode 100644 index 0000000..a7d5acd --- /dev/null +++ b/test/test_school.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.school import School + + +class TestSchool(unittest.TestCase): + """ School unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchool(self): + """ + Test School + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.school.School() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_school_admin.py b/test/test_school_admin.py new file mode 100644 index 0000000..c53e233 --- /dev/null +++ b/test/test_school_admin.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.school_admin import SchoolAdmin + + +class TestSchoolAdmin(unittest.TestCase): + """ SchoolAdmin unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolAdmin(self): + """ + Test SchoolAdmin + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.school_admin.SchoolAdmin() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_school_admin_object.py b/test/test_school_admin_object.py new file mode 100644 index 0000000..35ce99d --- /dev/null +++ b/test/test_school_admin_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.school_admin_object import SchoolAdminObject + + +class TestSchoolAdminObject(unittest.TestCase): + """ SchoolAdminObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolAdminObject(self): + """ + Test SchoolAdminObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.school_admin_object.SchoolAdminObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_school_admin_response.py b/test/test_school_admin_response.py new file mode 100644 index 0000000..d78b3d9 --- /dev/null +++ b/test/test_school_admin_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.school_admin_response import SchoolAdminResponse + + +class TestSchoolAdminResponse(unittest.TestCase): + """ SchoolAdminResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolAdminResponse(self): + """ + Test SchoolAdminResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.school_admin_response.SchoolAdminResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_school_admins_response.py b/test/test_school_admins_response.py new file mode 100644 index 0000000..0373690 --- /dev/null +++ b/test/test_school_admins_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.school_admins_response import SchoolAdminsResponse + + +class TestSchoolAdminsResponse(unittest.TestCase): + """ SchoolAdminsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolAdminsResponse(self): + """ + Test SchoolAdminsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.school_admins_response.SchoolAdminsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_school_object.py b/test/test_school_object.py new file mode 100644 index 0000000..72b5047 --- /dev/null +++ b/test/test_school_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.school_object import SchoolObject + + +class TestSchoolObject(unittest.TestCase): + """ SchoolObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolObject(self): + """ + Test SchoolObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.school_object.SchoolObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_school_response.py b/test/test_school_response.py new file mode 100644 index 0000000..16ae1c8 --- /dev/null +++ b/test/test_school_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.school_response import SchoolResponse + + +class TestSchoolResponse(unittest.TestCase): + """ SchoolResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolResponse(self): + """ + Test SchoolResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.school_response.SchoolResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_schooladmins_created.py b/test/test_schooladmins_created.py new file mode 100644 index 0000000..13d98f6 --- /dev/null +++ b/test/test_schooladmins_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.schooladmins_created import SchooladminsCreated + + +class TestSchooladminsCreated(unittest.TestCase): + """ SchooladminsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchooladminsCreated(self): + """ + Test SchooladminsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.schooladmins_created.SchooladminsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_schooladmins_deleted.py b/test/test_schooladmins_deleted.py new file mode 100644 index 0000000..47a99a3 --- /dev/null +++ b/test/test_schooladmins_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.schooladmins_deleted import SchooladminsDeleted + + +class TestSchooladminsDeleted(unittest.TestCase): + """ SchooladminsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchooladminsDeleted(self): + """ + Test SchooladminsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.schooladmins_deleted.SchooladminsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_schooladmins_updated.py b/test/test_schooladmins_updated.py new file mode 100644 index 0000000..c5df417 --- /dev/null +++ b/test/test_schooladmins_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.schooladmins_updated import SchooladminsUpdated + + +class TestSchooladminsUpdated(unittest.TestCase): + """ SchooladminsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchooladminsUpdated(self): + """ + Test SchooladminsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.schooladmins_updated.SchooladminsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_schools_created.py b/test/test_schools_created.py new file mode 100644 index 0000000..62e02ec --- /dev/null +++ b/test/test_schools_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.schools_created import SchoolsCreated + + +class TestSchoolsCreated(unittest.TestCase): + """ SchoolsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolsCreated(self): + """ + Test SchoolsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.schools_created.SchoolsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_schools_deleted.py b/test/test_schools_deleted.py new file mode 100644 index 0000000..2399813 --- /dev/null +++ b/test/test_schools_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.schools_deleted import SchoolsDeleted + + +class TestSchoolsDeleted(unittest.TestCase): + """ SchoolsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolsDeleted(self): + """ + Test SchoolsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.schools_deleted.SchoolsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_schools_response.py b/test/test_schools_response.py new file mode 100644 index 0000000..7ca680c --- /dev/null +++ b/test/test_schools_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.schools_response import SchoolsResponse + + +class TestSchoolsResponse(unittest.TestCase): + """ SchoolsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolsResponse(self): + """ + Test SchoolsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.schools_response.SchoolsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_schools_updated.py b/test/test_schools_updated.py new file mode 100644 index 0000000..9b5e046 --- /dev/null +++ b/test/test_schools_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.schools_updated import SchoolsUpdated + + +class TestSchoolsUpdated(unittest.TestCase): + """ SchoolsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSchoolsUpdated(self): + """ + Test SchoolsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.schools_updated.SchoolsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_section.py b/test/test_section.py new file mode 100644 index 0000000..facb1d7 --- /dev/null +++ b/test/test_section.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.section import Section + + +class TestSection(unittest.TestCase): + """ Section unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSection(self): + """ + Test Section + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.section.Section() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_section_object.py b/test/test_section_object.py new file mode 100644 index 0000000..580cf06 --- /dev/null +++ b/test/test_section_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.section_object import SectionObject + + +class TestSectionObject(unittest.TestCase): + """ SectionObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSectionObject(self): + """ + Test SectionObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.section_object.SectionObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_section_response.py b/test/test_section_response.py new file mode 100644 index 0000000..e613096 --- /dev/null +++ b/test/test_section_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.section_response import SectionResponse + + +class TestSectionResponse(unittest.TestCase): + """ SectionResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSectionResponse(self): + """ + Test SectionResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.section_response.SectionResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sections_created.py b/test/test_sections_created.py new file mode 100644 index 0000000..6eb84de --- /dev/null +++ b/test/test_sections_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.sections_created import SectionsCreated + + +class TestSectionsCreated(unittest.TestCase): + """ SectionsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSectionsCreated(self): + """ + Test SectionsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.sections_created.SectionsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sections_deleted.py b/test/test_sections_deleted.py new file mode 100644 index 0000000..70d697f --- /dev/null +++ b/test/test_sections_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.sections_deleted import SectionsDeleted + + +class TestSectionsDeleted(unittest.TestCase): + """ SectionsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSectionsDeleted(self): + """ + Test SectionsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.sections_deleted.SectionsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sections_response.py b/test/test_sections_response.py new file mode 100644 index 0000000..565669e --- /dev/null +++ b/test/test_sections_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.sections_response import SectionsResponse + + +class TestSectionsResponse(unittest.TestCase): + """ SectionsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSectionsResponse(self): + """ + Test SectionsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.sections_response.SectionsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sections_updated.py b/test/test_sections_updated.py new file mode 100644 index 0000000..4d468a7 --- /dev/null +++ b/test/test_sections_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.sections_updated import SectionsUpdated + + +class TestSectionsUpdated(unittest.TestCase): + """ SectionsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSectionsUpdated(self): + """ + Test SectionsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.sections_updated.SectionsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_student.py b/test/test_student.py new file mode 100644 index 0000000..d99235b --- /dev/null +++ b/test/test_student.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.student import Student + + +class TestStudent(unittest.TestCase): + """ Student unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStudent(self): + """ + Test Student + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.student.Student() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_student_object.py b/test/test_student_object.py new file mode 100644 index 0000000..561ff4d --- /dev/null +++ b/test/test_student_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.student_object import StudentObject + + +class TestStudentObject(unittest.TestCase): + """ StudentObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStudentObject(self): + """ + Test StudentObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.student_object.StudentObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_student_response.py b/test/test_student_response.py new file mode 100644 index 0000000..a68c9e6 --- /dev/null +++ b/test/test_student_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.student_response import StudentResponse + + +class TestStudentResponse(unittest.TestCase): + """ StudentResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStudentResponse(self): + """ + Test StudentResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.student_response.StudentResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_students_created.py b/test/test_students_created.py new file mode 100644 index 0000000..713bb28 --- /dev/null +++ b/test/test_students_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.students_created import StudentsCreated + + +class TestStudentsCreated(unittest.TestCase): + """ StudentsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStudentsCreated(self): + """ + Test StudentsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.students_created.StudentsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_students_deleted.py b/test/test_students_deleted.py new file mode 100644 index 0000000..94c6424 --- /dev/null +++ b/test/test_students_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.students_deleted import StudentsDeleted + + +class TestStudentsDeleted(unittest.TestCase): + """ StudentsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStudentsDeleted(self): + """ + Test StudentsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.students_deleted.StudentsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_students_response.py b/test/test_students_response.py new file mode 100644 index 0000000..39ca999 --- /dev/null +++ b/test/test_students_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.students_response import StudentsResponse + + +class TestStudentsResponse(unittest.TestCase): + """ StudentsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStudentsResponse(self): + """ + Test StudentsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.students_response.StudentsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_students_updated.py b/test/test_students_updated.py new file mode 100644 index 0000000..b2b40cc --- /dev/null +++ b/test/test_students_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.students_updated import StudentsUpdated + + +class TestStudentsUpdated(unittest.TestCase): + """ StudentsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStudentsUpdated(self): + """ + Test StudentsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.students_updated.StudentsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teacher.py b/test/test_teacher.py new file mode 100644 index 0000000..4935903 --- /dev/null +++ b/test/test_teacher.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.teacher import Teacher + + +class TestTeacher(unittest.TestCase): + """ Teacher unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeacher(self): + """ + Test Teacher + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.teacher.Teacher() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teacher_object.py b/test/test_teacher_object.py new file mode 100644 index 0000000..80b04f9 --- /dev/null +++ b/test/test_teacher_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.teacher_object import TeacherObject + + +class TestTeacherObject(unittest.TestCase): + """ TeacherObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeacherObject(self): + """ + Test TeacherObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.teacher_object.TeacherObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teacher_response.py b/test/test_teacher_response.py new file mode 100644 index 0000000..904e40d --- /dev/null +++ b/test/test_teacher_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.teacher_response import TeacherResponse + + +class TestTeacherResponse(unittest.TestCase): + """ TeacherResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeacherResponse(self): + """ + Test TeacherResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.teacher_response.TeacherResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teachers_created.py b/test/test_teachers_created.py new file mode 100644 index 0000000..4bda808 --- /dev/null +++ b/test/test_teachers_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.teachers_created import TeachersCreated + + +class TestTeachersCreated(unittest.TestCase): + """ TeachersCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeachersCreated(self): + """ + Test TeachersCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.teachers_created.TeachersCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teachers_deleted.py b/test/test_teachers_deleted.py new file mode 100644 index 0000000..7ac7331 --- /dev/null +++ b/test/test_teachers_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.teachers_deleted import TeachersDeleted + + +class TestTeachersDeleted(unittest.TestCase): + """ TeachersDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeachersDeleted(self): + """ + Test TeachersDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.teachers_deleted.TeachersDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teachers_response.py b/test/test_teachers_response.py new file mode 100644 index 0000000..5c5a9bb --- /dev/null +++ b/test/test_teachers_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.teachers_response import TeachersResponse + + +class TestTeachersResponse(unittest.TestCase): + """ TeachersResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeachersResponse(self): + """ + Test TeachersResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.teachers_response.TeachersResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teachers_updated.py b/test/test_teachers_updated.py new file mode 100644 index 0000000..7321e9a --- /dev/null +++ b/test/test_teachers_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.teachers_updated import TeachersUpdated + + +class TestTeachersUpdated(unittest.TestCase): + """ TeachersUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeachersUpdated(self): + """ + Test TeachersUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.teachers_updated.TeachersUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_term.py b/test/test_term.py new file mode 100644 index 0000000..d4a0861 --- /dev/null +++ b/test/test_term.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 1.2.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.term import Term + + +class TestTerm(unittest.TestCase): + """ Term unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTerm(self): + """ + Test Term + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.term.Term() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_term_object.py b/test/test_term_object.py new file mode 100644 index 0000000..d1fddec --- /dev/null +++ b/test/test_term_object.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.term_object import TermObject + + +class TestTermObject(unittest.TestCase): + """ TermObject unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTermObject(self): + """ + Test TermObject + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.term_object.TermObject() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_term_response.py b/test/test_term_response.py new file mode 100644 index 0000000..083fc0c --- /dev/null +++ b/test/test_term_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.term_response import TermResponse + + +class TestTermResponse(unittest.TestCase): + """ TermResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTermResponse(self): + """ + Test TermResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.term_response.TermResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_terms_created.py b/test/test_terms_created.py new file mode 100644 index 0000000..fc73295 --- /dev/null +++ b/test/test_terms_created.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.terms_created import TermsCreated + + +class TestTermsCreated(unittest.TestCase): + """ TermsCreated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTermsCreated(self): + """ + Test TermsCreated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.terms_created.TermsCreated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_terms_deleted.py b/test/test_terms_deleted.py new file mode 100644 index 0000000..84e737e --- /dev/null +++ b/test/test_terms_deleted.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.terms_deleted import TermsDeleted + + +class TestTermsDeleted(unittest.TestCase): + """ TermsDeleted unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTermsDeleted(self): + """ + Test TermsDeleted + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.terms_deleted.TermsDeleted() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_terms_response.py b/test/test_terms_response.py new file mode 100644 index 0000000..223c220 --- /dev/null +++ b/test/test_terms_response.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.terms_response import TermsResponse + + +class TestTermsResponse(unittest.TestCase): + """ TermsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTermsResponse(self): + """ + Test TermsResponse + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.terms_response.TermsResponse() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_terms_updated.py b/test/test_terms_updated.py new file mode 100644 index 0000000..3e0eea0 --- /dev/null +++ b/test/test_terms_updated.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Clever API + + The Clever API + + OpenAPI spec version: 2.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import clever +from clever.rest import ApiException +from clever.models.terms_updated import TermsUpdated + + +class TestTermsUpdated(unittest.TestCase): + """ TermsUpdated unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTermsUpdated(self): + """ + Test TermsUpdated + """ + # FIXME: construct object with mandatory attributes with example values + #model = clever.models.terms_updated.TermsUpdated() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..1cf0829 --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + [] \ No newline at end of file