This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Happi Tails | |
| class Shelter | |
| attr_accessor(:Person, :Animal) | |
| def initialize | |
| @person = {} | |
| @animal = {} | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST \ | |
| --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" https://api.mailjet.com/v3/REST/contact \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"Email":"johnsmith@example.com"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| Count: 1, | |
| Data: [ | |
| { | |
| CreatedAt: "2015-02-03T10:53:54Z", | |
| DeliveredCount: 0, | |
| Email: "johnsmith@example.com", | |
| ID: 98, | |
| IsOptInPending: false, | |
| IsSpamComplaining: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X GET --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X GET --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact/2 | |
| #or via email address: | |
| curl -X GET --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact/johnsmith@example.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X PUT --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact/1 \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"Name":"John"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact/$ID/managecontactlists \ | |
| -H "Content-Type: application/json" \ | |
| -d '{“ContactLists”:[{ “ListID”:list_id, “Action”:addnoforce}, { “ListID”:second_list_id, “Action”:addnoforce}, { “ListID”:another_list_id, “Action”:addnoforce} ]}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact/managemanycontacts \ | |
| -H "Content-Type: application/json" \ | |
| -d "{ 'ContactLists':[{'ListID' : 1, 'Action' : 'addnoforce'}, {'ListID' : 2, 'Action': 'addnoforce'}], 'Contacts':[{'Email':'jimsmith@example.com', 'Name':'Jim', 'Properties':{'Property1':value, 'Property2':value2}}, {'Email':'janetdoe@example.com', 'Name':'Janet', 'Properties': {'Property1': value, 'Property2': value2}}]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X GET --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact/managemanycontacts/JobID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X GET --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \ | |
| https://api.mailjet.com/v3/REST/contact/$ID/getcontactlists |
OlderNewer