Skip to content

Commit 01f17fe

Browse files
authored
Merge pull request #28 from todorDim/features/add_action_id_to_get
Add action_id to get, increase minor version
2 parents c00ea4c + 375f33e commit 01f17fe

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
### API documentation
99

10-
Every code examples can be find on the [Mailjet Documentation][doc]
10+
All code examples can be found on the [Mailjet Documentation][doc].
1111

1212
(Please refer to the [Mailjet Documentation Repository][api_doc] to contribute to the documentation examples)
1313

@@ -22,7 +22,7 @@ Every code examples can be find on the [Mailjet Documentation][doc]
2222
First, make sure you have an API key, and an API secret.
2323
Once you got them, save them in your environment:
2424

25-
```
25+
```bash
2626
export MJ_APIKEY_PUBLIC='your api key'
2727
export MJ_APIKEY_PRIVATE='your api secret'
2828
```
@@ -40,17 +40,17 @@ mailjet = Client(auth=(API_KEY, API_SECRET), version='v3')
4040

4141
```
4242

43-
**NOTE**: `version` reflects the api version in the url (`https://api.mailjet.com/{{ version }}/REST/`). It is `'v3'` by default and can be used to select another api version (for example `v3.1` for the new send API).
43+
**NOTE**: `version` reflects the API version in the URL (`https://api.mailjet.com/{{ version }}/REST/`). It is `'v3'` by default and can be used to select another API version (for example `v3.1` for the new send API).
4444

4545
## Make a `GET` request:
4646
``` python
47-
# get every contacts
47+
# get all contacts
4848
result = mailjet.contact.get()
4949
```
5050

5151
## `GET` request with filters:
5252
``` python
53-
# get the 2 first contacts
53+
# get the first 2 contacts
5454
result = mailjet.contact.get(filters={'limit': 2})
5555
```
5656
## `POST` request
@@ -61,7 +61,7 @@ result = mailjet.sender.create(data={'email': 'test@mailjet.com'})
6161

6262
## Combine a resource with an action
6363
``` python
64-
# Get the contact lists of contact #2
64+
# Get the contacts lists of contact #2
6565
result = mailjet.contact_getcontactslists.get(id=2)
6666
```
6767

@@ -72,7 +72,7 @@ email = {
7272
'FromName': 'Mr Smith',
7373
'FromEmail': 'mr@smith.com',
7474
'Subject': 'Test Email',
75-
'Text-Part': 'Hey there !',
75+
'Text-Part': 'Hey there!',
7676
'Recipients': [{'Email': 'your email here'}]
7777
}
7878

mailjet_rest/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_many(self, filters=None, action_id=None, **kwargs):
5454
return self._get(filters=filters, action_id=action_id **kwargs)
5555

5656
def get(self, id=None, filters=None, action_id=None, **kwargs):
57-
return self._get(id=id, filters=filters, **kwargs)
57+
return self._get(id=id, filters=filters, action_id=action_id, **kwargs)
5858

5959
def create(self, data=None, filters=None, id=None, action_id=None, **kwargs):
6060
if self.headers['Content-type'] == 'application/json':

mailjet_rest/utils/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = (1, 3, 1)
1+
VERSION = (1, 3, 2)
22

33

44
def get_version(version=None):

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_user_agent(self):
9090
auth=self.auth,
9191
version='v3.1'
9292
)
93-
self.assertEqual(self.client.config.user_agent, 'mailjet-apiv3-python/v1.3.1')
93+
self.assertEqual(self.client.config.user_agent, 'mailjet-apiv3-python/v1.3.2')
9494

9595

9696
if __name__ == '__main__':

0 commit comments

Comments
 (0)