Skip to content

Commit 258b89a

Browse files
committed
Code, tests, etc
1 parent 659831d commit 258b89a

File tree

101 files changed

+13987
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+13987
-0
lines changed

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.venv/
49+
.python-version
50+
.pytest_cache
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
59+
# Sphinx documentation
60+
docs/_build/
61+
62+
# PyBuilder
63+
target/
64+
65+
#Ipython Notebook
66+
.ipynb_checkpoints

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.3.1

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0.pre] - 2021-01-22
9+
10+
### Added
11+
12+
- Pre-release of v1 Library
13+
- Adds support for Orders, Estimates, Projects and Preferences
14+

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
SHELL = /bin/bash
2+
3+
build:
4+
pip install -r requirements.txt
5+
6+
test:
7+
pip install -r test-requirements.txt && \
8+
python -m unittest discover test/
9+
10+
.PHONY: build test

git_push.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/sh
2+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3+
#
4+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5+
6+
git_user_id=$1
7+
git_repo_id=$2
8+
release_note=$3
9+
git_host=$4
10+
11+
if [ "$git_host" = "" ]; then
12+
git_host="github.com"
13+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14+
fi
15+
16+
if [ "$git_user_id" = "" ]; then
17+
git_user_id="GIT_USER_ID"
18+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19+
fi
20+
21+
if [ "$git_repo_id" = "" ]; then
22+
git_repo_id="GIT_REPO_ID"
23+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24+
fi
25+
26+
if [ "$release_note" = "" ]; then
27+
release_note="Minor update"
28+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29+
fi
30+
31+
# Initialize the local directory as a Git repository
32+
git init
33+
34+
# Adds the files in the local repository and stages them for commit.
35+
git add .
36+
37+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
38+
git commit -m "$release_note"
39+
40+
# Sets the new remote
41+
git_remote=`git remote`
42+
if [ "$git_remote" = "" ]; then # git remote not defined
43+
44+
if [ "$GIT_TOKEN" = "" ]; then
45+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47+
else
48+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49+
fi
50+
51+
fi
52+
53+
git pull origin master
54+
55+
# Pushes (Forces) the changes in the local repository up to the remote repository
56+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57+
git push origin master 2>&1 | grep -v 'To https'
58+

patch_api/__init__.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# coding: utf-8
2+
3+
# flake8: noqa
4+
5+
"""
6+
Patch API V1
7+
8+
The core API used to integrate with Patch's service # noqa: E501
9+
10+
The version of the OpenAPI document: v1
11+
Contact: developers@usepatch.com
12+
Generated by: https://openapi-generator.tech
13+
"""
14+
15+
16+
from __future__ import absolute_import
17+
18+
__version__ = "1.0.0"
19+
20+
# import apis into sdk package
21+
from patch_api.api.estimates_api import EstimatesApi
22+
from patch_api.api.orders_api import OrdersApi
23+
from patch_api.api.photos_api import PhotosApi
24+
from patch_api.api.preferences_api import PreferencesApi
25+
from patch_api.api.projects_api import ProjectsApi
26+
27+
# import ApiClient
28+
from patch_api.api_client import ApiClient
29+
from patch_api.configuration import Configuration
30+
from patch_api.exceptions import OpenApiException
31+
from patch_api.exceptions import ApiTypeError
32+
from patch_api.exceptions import ApiValueError
33+
from patch_api.exceptions import ApiKeyError
34+
from patch_api.exceptions import ApiException
35+
# import models into sdk package
36+
from patch_api.models.allocation import Allocation
37+
from patch_api.models.create_mass_estimate_request import CreateMassEstimateRequest
38+
from patch_api.models.create_membership_request import CreateMembershipRequest
39+
from patch_api.models.create_offset_request import CreateOffsetRequest
40+
from patch_api.models.create_order_request import CreateOrderRequest
41+
from patch_api.models.create_organization_request import CreateOrganizationRequest
42+
from patch_api.models.create_photo_request import CreatePhotoRequest
43+
from patch_api.models.create_preference_request import CreatePreferenceRequest
44+
from patch_api.models.create_project_request import CreateProjectRequest
45+
from patch_api.models.error_response import ErrorResponse
46+
from patch_api.models.estimate import Estimate
47+
from patch_api.models.estimate_list_response import EstimateListResponse
48+
from patch_api.models.estimate_response import EstimateResponse
49+
from patch_api.models.fulfill_offset_request import FulfillOffsetRequest
50+
from patch_api.models.membership import Membership
51+
from patch_api.models.membership_response import MembershipResponse
52+
from patch_api.models.meta_index_object import MetaIndexObject
53+
from patch_api.models.offset import Offset
54+
from patch_api.models.offset_list_response import OffsetListResponse
55+
from patch_api.models.offset_response import OffsetResponse
56+
from patch_api.models.order import Order
57+
from patch_api.models.order_list_response import OrderListResponse
58+
from patch_api.models.order_response import OrderResponse
59+
from patch_api.models.photo import Photo
60+
from patch_api.models.photo_response import PhotoResponse
61+
from patch_api.models.preference import Preference
62+
from patch_api.models.preference_list_response import PreferenceListResponse
63+
from patch_api.models.preference_response import PreferenceResponse
64+
from patch_api.models.project import Project
65+
from patch_api.models.project_list_response import ProjectListResponse
66+
from patch_api.models.project_response import ProjectResponse
67+
from patch_api.models.project_type_list_response import ProjectTypeListResponse
68+
from patch_api.models.standard import Standard
69+
from patch_api.models.standard_list_response import StandardListResponse
70+
from patch_api.models.update_offset_request import UpdateOffsetRequest
71+
from patch_api.models.update_project_request import UpdateProjectRequest
72+

patch_api/api/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from __future__ import absolute_import
2+
3+
# flake8: noqa
4+
5+
# import apis into api package
6+
from patch_api.api.estimates_api import EstimatesApi
7+
from patch_api.api.orders_api import OrdersApi
8+
from patch_api.api.photos_api import PhotosApi
9+
from patch_api.api.preferences_api import PreferencesApi
10+
from patch_api.api.projects_api import ProjectsApi

0 commit comments

Comments
 (0)