Skip to content

Commit

Permalink
add links to deprecation message, modify lib order
Browse files Browse the repository at this point in the history
  • Loading branch information
rajumsys committed Mar 7, 2017
1 parent 7dff42d commit eddbe00
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: analysis all build clean docs docs-install docs-open install release release-test test venv
.PHONY: analysis all build clean docs docs-install docs-open install release release-test test venv

all: clean venv install

Expand Down
1 change: 1 addition & 0 deletions sparkpost/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def request(self, method, uri, **kwargs):
'Content-Type': 'application/json',
'Authorization': self.api_key
}
print uri, kwargs
response = self.transport.request(method, uri, headers=headers,
**kwargs)
return response
Expand Down
6 changes: 5 additions & 1 deletion sparkpost/transmissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import copy
import json
import warnings

from email.utils import parseaddr

from .base import Resource
Expand Down Expand Up @@ -276,7 +277,10 @@ def list(self, **kwargs):
:returns: list of transmissions
:raises: :exc:`SparkPostAPIException` if API call fails
"""
warnings.warn('deprecated', DeprecationWarning)
warn_msg = 'This endpoint is deprecated. For details, '
'check https://sparkpo.st/5qcj4.'

warnings.warn(warn_msg, DeprecationWarning)
return self.request('GET', self.uri, params=kwargs)

def delete(self, transmission_id):
Expand Down
2 changes: 1 addition & 1 deletion test/test_transmissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import os
import tempfile
import warnings
from mock import patch

import pytest
import responses
import six
from mock import patch

from sparkpost import SparkPost
from sparkpost import Transmissions
Expand Down

0 comments on commit eddbe00

Please sign in to comment.