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

Add transmission class and examples #122

Merged
merged 41 commits into from
Jun 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1e69843
FAD-3148 basic non-functioning base class
avigoldman Jun 9, 2016
45657ae
FAD-3148 a bit more functionality in the base class
avigoldman Jun 9, 2016
425bc01
FAD-3148 added custom promise class and custom response class. Did go…
avigoldman Jun 10, 2016
3e2a3b2
Updated Transmission.php for new refactor, still WIP. Created Resourc…
vincentwsong Jun 10, 2016
327bd6f
Removed test functions
vwsong Jun 10, 2016
2691ddd
Cleaned up Transmissions.php according to PSR-2, deleted more test co…
vwsong Jun 10, 2016
9a295b1
added sync and aysnc, cleaned up code
avigoldman Jun 10, 2016
6b3d22c
It won't break anymore if there's no CC or BCC
vwsong Jun 10, 2016
d6970a3
it wont break anymore if there's no CC or BCC, and also added return …
vwsong Jun 10, 2016
a145c91
Merge remote-tracking branch 'origin/FAD-3146' into FAD-3148
avigoldman Jun 10, 2016
4ad4528
Minor bugfixes
vwsong Jun 10, 2016
f25891e
No more CC header section if there's no CC
vwsong Jun 10, 2016
0cebe42
added support for async/sync option
avigoldman Jun 10, 2016
247c3fe
Resource.post and get now accepts CC headers which are generated in t…
vwsong Jun 10, 2016
2b42579
added support for async/sync option
avigoldman Jun 10, 2016
e15e8ee
fixed minor bug
vwsong Jun 10, 2016
d0b5a64
Minor bug fix
vwsong Jun 10, 2016
5dd18d3
WIP
vwsong Jun 10, 2016
ec87c5a
WIP
vwsong Jun 10, 2016
8165433
Sending works, cc/bcc headers don't.
vwsong Jun 13, 2016
39abd62
BCCs and CCs now send properly
vwsong Jun 13, 2016
7f8548c
Added parser to change shorthand recipients to array of name and addr…
vwsong Jun 14, 2016
9ef3ac9
Deleted test code, irrelevant comments, and fixed up code.
vwsong Jun 15, 2016
0942bed
added put and delete methods along with request function to handle ca…
avigoldman Jun 17, 2016
1187a2c
merged in 2.x
avigoldman Jun 20, 2016
7adc129
added transmission in sparkpost class. Refactored code in Transmissio…
avigoldman Jun 21, 2016
61e1ea7
added comments and fixed BCC
avigoldman Jun 21, 2016
ec54edf
fixed error thrown in toAddressObject function
avigoldman Jun 21, 2016
7f0c906
set param defaults in resource class
avigoldman Jun 21, 2016
6aa6fa1
grouped formatting functions into a single 'formatPayload' function
avigoldman Jun 21, 2016
01345ca
wrote tests to cover Resource and Transmission classes
avigoldman Jun 21, 2016
9f86fd3
set up options object
avigoldman Jun 22, 2016
d7f6b4b
formatting and comments
avigoldman Jun 22, 2016
ce821d6
parsed example-options.json and pull in autoload.php
avigoldman Jun 22, 2016
9cf58b8
wrote examples for transmissions
avigoldman Jun 22, 2016
b1687e3
removed old tests
avigoldman Jun 22, 2016
a638b1f
changed example-config.json to example-options.json
avigoldman Jun 23, 2016
fda0a91
removed examples-options.json
avigoldman Jun 23, 2016
f79318a
fixed examples, and small details
avigoldman Jun 23, 2016
4f0cb06
added slashes on errors in examples
avigoldman Jun 23, 2016
e81d6eb
getting rid of rold options
avigoldman Jun 23, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.settings
.buildpath
test/output/
examples/example-config.json
examples/example-options.json
.idea
/composer.phar
test.php
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
],
"minimum-stability": "stable",
"scripts": {
"post-install-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
"post-update-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
"post-install-cmd": "if [ ! -f 'examples/example-options.json' ]; then echo '{\n\t\"key\":\"YOUR_API_KEY\"\n}' >> examples/example-options.json; fi",
"post-update-cmd": "if [ ! -f 'examples/example-options.json' ]; then echo '{\n\t\"key\":\"YOUR_API_KEY\"\n}' >> examples/example-options.json; fi",
"test": "phpunit ./test/unit/",
"fix-style": "php-cs-fixer fix ."
},
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions examples/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php

require_once dirname(__FILE__).'/../vendor/autoload.php';

//pull in library options
$optionsFile = file_get_contents(dirname(__FILE__).'/example-options.json');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to update the script in composer.json that creates this file as well.

$options = json_decode($optionsFile, true);
25 changes: 0 additions & 25 deletions examples/transmission/delete_transmission.php

This file was deleted.

25 changes: 0 additions & 25 deletions examples/transmission/get_all_transmissions.php

This file was deleted.

25 changes: 0 additions & 25 deletions examples/transmission/get_transmission.php

This file was deleted.

34 changes: 0 additions & 34 deletions examples/transmission/rfc822.php

This file was deleted.

69 changes: 0 additions & 69 deletions examples/transmission/send_transmission_all_fields.php

This file was deleted.

58 changes: 0 additions & 58 deletions examples/transmission/send_with_bcc.php

This file was deleted.

62 changes: 0 additions & 62 deletions examples/transmission/send_with_cc.php

This file was deleted.

40 changes: 0 additions & 40 deletions examples/transmission/simple_send.php

This file was deleted.

Loading