Commit Graph

325 Commits

Author SHA1 Message Date
Tobias Nyholm
83a20afbfb Added deprecation notices (#295) 2017-03-14 10:58:47 +01:00
Tobias Nyholm
2e9f56e694 Show build status on master branch only (#297) 2017-02-28 11:36:23 +01:00
Sergei Beregov
718547a273 #276 additional method to get an attachment (#277)
* #276 additional method to get an attachment

* #276 fix code style

* Add Mailgun::getAttachment + test

* code style fix
2017-02-28 08:10:04 +01:00
Michal Hanajík
74929b6518 Renamed namespace from Resource\Api to Model (#293)
* Renamed namespace from Resource\Api to Model

* Moved Resources\ApiResponse to Models namespace

Signed-off-by: Michal Hanajík <michal.hanajik@outlook.com>

* Fix of code style
2017-02-23 20:56:30 +01:00
Tobias Nyholm
da873dad04 Removed framework version number (#292) 2017-02-21 08:23:10 +01:00
Tobias Nyholm
d5a49f2e6d Tag api (#286)
* Started on tag api

* Added TagAPI

* code style

* cs

* removed final

* Adjusting to Davids feedback.

* Added PagingProvider interface
2017-02-21 08:22:57 +01:00
z38
e67ef95d5b Avoid fatal error when deserializing unauthorized requests (#282) 2017-02-20 14:04:05 -06:00
Tobias Nyholm
2d83ab3bf8 Show that we allow MultipartStreamBuilder 0.2 (#291) 2017-02-20 13:59:56 -06:00
Sean Johnson
da6ee36fed Implement suppressions API (#258) (#264)
* Implement suppressions API (#258)

* Fix annotation issues and use alternate pagination method
2017-02-20 13:57:54 -06:00
Sean Johnson
b6d035c9a3 Add getPagination* concrete functions on Pagination trait (#271) 2017-02-20 13:21:55 -06:00
Tobias Nyholm
47f816ac56 Add quotes around the boundary. (#278)
This will support bounderies with non whitespace
2017-02-18 18:14:12 +01:00
Sean Johnson
e177e13a0c Update boundary regex to match RFC1341 (#283)
* Update boundary regex to match RFC1341
2017-02-18 10:53:21 -06:00
Sean Johnson
01e0c33ee8 Fix typo in PaginationResponse: getFistUrl (#269) 2017-01-27 18:13:39 -06:00
David Garcia
1613843c7e Routes API (#249)
* Add initial (empty) Routes PHP Unit Test file

We still need to provide the automated tests

* Add initial Routes file

* Describe API Methods

* Inherit method from TestCase - adding @inheritdoc annotation

* Add new DTOs to map API responses to known objects

* Add new Response to manage the Routes list

* Implement method to retrieve a list of Routes

* Add new Response to manage a single Route resource

* Implement method to retrieve a single Route

* Set ShowResponse as final

* Add new Response to manage the Create process

* Implement method to create a new Route

* Fix missing annotation

* Add new Response to manage the Delete Route process

* Implement method to delete a Route based on the ID

* Add new Response to manage the Update Route process

This response is based on Domain API docs due there are no examples on
Routes API docs. We may need to update the response.

* Implement method to update a Route based on the ID

* Require a $limit value greater than 0

* Require a $skip value greater than or equal to 0

* Set UpdateResponse as final

* Add new (empty) public methods to test the Routes API

* Provide method to get the Routes API from Mailgun Client

* Add missed annotation

* Update ShowResponse to return an instance of ApiResponse instead of the DTO

* Update annotation

* Fix annotation

* Update array $actions to provide an empty array by default

* Update parameters to make sure the last arg always is a DateTime (or null)

* Use empty()

* Remove DTO suffix

* Move DTOs to the parent folder/namespace

* Fix annotations
2016-12-09 14:15:06 -08:00
Tobias Nyholm
1a883bac89 Increase timeout for code coverate (#252) 2016-12-09 22:54:02 +01:00
David Garcia
b61d5291b2 Minor amends reported by Scrutinizer CI (#250)
* Scrutinizer CI: Bug

The property deserializer does not seem to exist. Did you mean
serializer?

* Scrutinizer CI: Coding Style + Best Practice

It seems like you are loosely comparing two booleans. Considering using
the strict comparison === instead.

* Scrutinizer CI: Bug

It seems like $variables defined by parameter $variables on line ???
can also be of type null; however,
Mailgun\Messages\MessageBuilder::addRecipient() does only seem to
accept array, maybe add an additional type check?

* Scrutinizer CI: Documentation

The doc-type $class|SimpleResponse could not be parsed: Unknown type
name "$class" at position 0

Adding `object` instead of `SimpleResponse` due we have no files called
`SimpleResponse` in our project, and PhpDoc provides the `object`
keyword as a valid option.

https://www.phpdoc.org/docs/latest/guides/types.html#keywords

* Scrutinizer CI: Documentation

There is no parameter named $smtpPass. Did you maybe mean $smtpPassword?

* Scrutinizer CI: Unused Code

$resource is not used, you could remove the assignment.

* Scrutinizer CI: Unused Code

The parameter $message is not used and could be removed.

* Scrutinizer CI: Unused code

This method is not used, and could be removed. (x2)

* Scrutinizer CI: Patch

Doc Comments

* Scrutinizer CI: Patch

Doc comments
2016-12-09 13:41:23 -08:00
Tobias Nyholm
cc82355e50 Messages api (#247)
* Added message API

* Still use json

* code style
2016-12-07 16:29:08 -06:00
Tobias Nyholm
b1f949a925 Added Webhook API (#246)
* Added Webhook API

* code style
2016-12-07 20:42:24 +01:00
Tobias Nyholm
de13ff66ce Added Event API with pagination (#245)
* Added Event API with pagination

* code style

* code style
2016-12-07 12:03:50 -06:00
Tobias Nyholm
479df95971 Updated response section (#240)
* Updated response section

* Update README.md

* Update README.md
2016-12-07 15:59:22 +01:00
Sean Johnson
4fcf878d39 Add Gitter badge to README (#244) 2016-12-06 13:10:38 -06:00
Sean Johnson
ce8215ff6c Apply fixes from StyleCI (#243) 2016-12-06 12:12:52 -06:00
Tobias Nyholm
751770d32c Disable integration tests until they are improved (#242) 2016-12-06 11:02:32 -06:00
Tobias Nyholm
d12ea9f456 Do not validate API responses. Create Response objects that have part… (#230)
* Do not validate API responses. Create Response objects that have partial data instead

Fix issue #225

* Code style
2016-12-06 00:44:59 -06:00
Tobias Nyholm
adfc1d7bd2 Clean up gitignore. (#234) 2016-11-24 22:29:06 +01:00
Tobias Nyholm
61a019ad67 Fixed integration tests (#233)
* Fixed integration tests

* Update integration tests

* cs
2016-11-24 09:59:05 +01:00
Tobias Nyholm
8c2ffbfd3f Improve Travis build (#231)
* Improve Travis build

* Added more shields

* bugfiz

* minor

* bash fix

* Update min version

* Remove test code

* Refactor
2016-11-24 09:30:41 +01:00
Tobias Nyholm
21c95412c6 Minor documention fix (#227)
* Doc fix

* cs

* cs

* cs

* cs
2016-11-24 08:40:28 +01:00
Sean Johnson
ce9739ea91 Applied fixes from StyleCI (#228) 2016-11-23 23:02:12 +01:00
Tobias Nyholm
8668b4c222 Updated to use Assert 1.2 (#224) 2016-11-23 23:01:26 +01:00
Tobias Nyholm
a3e999e875 Rename functions to reflect the API (#226)
This will fix #202
2016-11-23 22:21:15 +01:00
Tobias Nyholm
9bd6732efd Introduce a request builder. (#217)
* Introduce a request builder.

We inject every dependency (eg RequestFactory and MultipartStreamBuilder) and we do not have to use postMultipart.

* code style

* Use uppercase on http verbs

* Added setters and use getters

* Added tests

* style
2016-11-23 21:55:05 +01:00
Tobias Nyholm
5535803031 Added a contribute section in the readme (#220)
* Added a contribute section in the readm e

* update link

* minor
2016-11-21 21:35:49 +01:00
Sean Johnson
0da5f410a9 Rename serializer to deserializer (#201) (#216) 2016-11-12 02:50:47 +01:00
Tobias Nyholm
20b9fbfe5d Rename AbstractApi to HttpApi (#214)
Fix #200
2016-11-11 15:25:32 -06:00
Tobias Nyholm
e4d181a4fa Rename ObjectSerializer to ModelSerializer (#215)
Fix #204
2016-11-11 15:25:01 -06:00
Tobias Nyholm
1a71c14097 Removed inheritence, Renamed classes, Mark all classes as final (#212)
* Removed inheritence, Renamed classes, Mark all classes as final

* code style

* Updated docs

* Code style

* Be consistant with the naming of functions

* Fixed tests
2016-11-11 14:53:26 -06:00
Tobias Nyholm
c875890720 SImplefied travis config and added composer scripts (#213)
* SImplefied travis config and added composer scripts

* Use 2 space indentation
2016-11-11 14:22:46 -06:00
Sean Johnson
0d2916d47f Add Slack notifications for Travis builds (#208) 2016-10-31 16:23:38 -05:00
Sean Johnson
58430e4537 Domains API, #187 (#198) 2016-10-27 08:34:27 +02:00
Tobias Nyholm
738e6e32e2 POC - Better api (#192)
* Added base for the new API

* code style

* Added response classes

* Added support for serializer

* The abstract API should not know of Mailgun

* Minor

* minor

* Using a client configrator

* code style

* Put HTTPClient in the configurator

* Do not use the api() function

* Use stable version of Assert

* style

* Fixed tests

* make the httpClient private

* Renamed ResponseSerializer to ResponseDeserializer

* Disabled tests that are testing error messages with Assert

* style fixes

* Refactoring fix
2016-10-24 12:01:32 -05:00
Tobias Nyholm
043658f996 Added meta files (#195)
* Added meta files

* Style fixes from StyleCI
2016-10-14 19:20:46 -05:00
Sean Johnson
fb377f7257 Added StyleCI badge. (#196) 2016-10-15 01:58:28 +02:00
Tobias Nyholm
359c6001d4 Deprecate SSL functions (#179) 2016-09-30 15:04:43 +02:00
David Garcia
3aeb602406 Make sure $variables is an array in addRecipient() (#176)
* Write test to verify expected behaviour when we provide a String

* Fix broken test checking if the variable is an Array

* PSR Standard using single quote instead of double quote
2016-09-30 15:03:35 +02:00
David Garcia
6513c12d8c Applied fixes from StyleCI (#177) 2016-09-27 15:23:08 +02:00
Limon Monte
aafd84b0ce Update README.md (#172) 2016-09-26 08:36:49 +02:00
Tobias Nyholm
8fe342f5b9 Apply fixes from StyleCI and make sure we add MIT license properly (#163)
* Applied fixes from StyleCI

* Create LICENSE
2016-09-18 09:56:14 +02:00
Wim Verstuyf
5d04bc63a7 Add attachment from memory (#158) 2016-09-06 13:05:50 +02:00
Sébastien Santoro
18804d491f Fix typo in README (#167) 2016-08-31 23:26:08 +02:00