Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests, fix and docs. #3

Merged
merged 7 commits into from
Jul 21, 2014
Merged

Tests, fix and docs. #3

merged 7 commits into from
Jul 21, 2014

Conversation

fedor
Copy link
Contributor

@fedor fedor commented Jul 3, 2014

Hi Teddy,

Long story short, I've got:

  1. Made unit tests. Will just copy related comments on test run and scope from source code:
# Values for test described in APIv3 class definition below.
# To run test cases go to the directory with current file and run:
# $ python __init__.py
TEST_SLUG = 'dpd-uk'
TEST_TRACKING_NUMBER = '15502370264989N'
TEST_API_KEY = 'YOUR_API_KEY'
    ...
"""
Test code goes below.

Test covers all accessing methods (POST, GET, PUT, DELETE).
Test covers all variants of building specific API calls (endpoints paths + body):
   ...
Test checks conversion of input list type parameters to comma separated strings.
Test checks conversion of input timestamp strings to datetime variables.
Test checks conversion of output timestamp strings to datetime variables.
    ...
"""
  1. Thx to tests, I've found a bug that brakes API endpoint path creation. Fixed.
  2. Made user documentation: https://github.com/korshunov/aftership-python/blob/master/README.rst

Two questions:

  1. Are there any changes in API v4 that breaks calling conventions? If no, I'll just change api.aftership.com/v3/ to api.aftership.com/v4/ for new API support.
  2. Are you happy with changes? If yes I'd like your approve to put this module to PyPi (official Python modules storage). After that, users would be able to install SDK in one-line via pip command (showed in README).

Thanks in advance!
Fedor

teddychan added a commit that referenced this pull request Jul 21, 2014
@teddychan teddychan merged commit 5e38a89 into AfterShip:master Jul 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants