romanpitak / dotmailer-api-v2-php-client Goto Github PK
View Code? Open in Web Editor NEWPHP client library for the dotMailer v2 (REST) API with MULTIPLE ACCOUNTS SUPPORT!
License: MIT License
PHP client library for the dotMailer v2 (REST) API with MULTIPLE ACCOUNTS SUPPORT!
License: MIT License
Missing "return" in DotMailer\Api\Resources\Resources::GetAddressBookContactsUnsubscribedSinceDate
public function GetAddressBookContactsUnsubscribedSinceDate($addressBookId, $date, $select = 1000, $skip = 0)
{
$url = sprintf("address-books/%s/contacts/unsubscribed-since/%s? select=%s&skip=%s", $addressBookId, $date, $select, $skip);
new ApiContactSuppressionList($this->execute($url));
}
Should add "return" construction to line 115
public function GetAddressBookCampaigns($addressBookId, $select = 1000, $skip = 0)
{
$url = sprintf("address-books/%s/campaigns?select=%s&skip=%s", $addressBookId, $select, $skip);
new ApiCampaignList($this->execute($url));
}
Hi. There is some issue with Resources:GetCampaignsSendBySendId()
Currently on this line:
https://github.com/romanpitak/dotMailer-API-v2-PHP-client/blob/master/src/Resources/Resources.php#L360
There is no execution so request will not be send to Dotmailer as result we will have array.
I suggest following solution in my PR:
When trying to use the PostContacts method, if an option has not been added, for example, a custom data field called 'TYPE', then even though the contact gets successfully added to dotmailer, I'm thrown a response error 'Cannot use 'Null' as class name as it is reserved'
Edit - Just seen you've done a fix for this, but when installed with composer, this fix is not applied
ApiTransactionalDataImportStatuses has incorrect constants
const NOT_STARTED = 'NotStarted';
const NOT_FINISHED = 'NotStarted';
const FINISHED = 'NotStarted';
const FAILED = 'NotStarted';
Hi,
this method
https://github.com/romanpitak/dotMailer-API-v2-PHP-client/blob/master/src/Resources/Resources.php#L492
doesn't use passed parameter, so it's always returns an error that transactional data can not be null.
Hi
Trying to work with your implementation in a php 5.5.9-1ubuntu4.11 environment and getting error
PHP Warning: json_decode(): option JSON_BIGINT_AS_STRING not implemented in /SERVERPATH/vendor/romanpitak/dotmailer-api-v2-client/src/DataTypes/MagicArray.php on line 26
it appears to be an issue with ubuntu licencing of the pecl-json-c extension for php
http://api.dotmailer.com/v2/help/wadl#Email is missing from implementation.
You have a wrapper for the resubscribe, but there is a resubscribe with no challenge endpoint that is not implemented.
http://api.dotmailer.com/v2/help/wadl#PostContactsResubscribeWithNoChallenge
I started seeing InvalidOffsetException: "suppressedcontacts" getting ApiContactImportReport
Looks like this may have been added to the API interface recently?
I fixed it by adding
'SuppressedContacts' => 'XsInt'
To ApiContactImportReport.getProperties()
So API endpoint currently is http://api.dotmailer.com which works fine as this is in alias to http://r1-api.dotmailer.com but more regions coming soon. USA(r2) is already live which means that the http://api.dotmailer.com will not work for region 2.
Curent regions :
http://r1-api.dotmailer.com (UK)
http://r2-api.dotmailer.com (USA)
Which region to use for an api user can be retreive from getAccountInfo(the only api call that is valid for any endpoints)
most of the issues we found so far was due to zero unit tests coverage,
can be also some sort of functional tests
Could you supply the code for the function 'getIndexHtml', illustrated near the bottom of the readme?
Hi, I'm having some difficulty understanding how exception handling would work. I'm having some trouble catching the below Exception for example. I'm thinking i'm perhaps in the wrong namespace and/or trying to catch the wrong Exception?
namespace DotMailer\Api\DataTypes;
$contact = new ApiContact();
$contact->email = $_POST['email'];
$contact->emailtype = $_POST['email_type'];
try {
$contact = $resources->PostContacts('invalid input');
} catch (Exception $e) {
echo $e->getMessage();
}
The list of reserved words has been updated in PHP 7 to include ‘null’, which is used as a class name for the null DataType.
I got around it by just renaming Null class to NullDataType and updating the references. As far as I know the only reference is on line 60 of DataTypes/JsonObject.php
.
I haven’t gone so far as to submit a PR as I'm wondering if the issue needs more thought, for example ‘mixed’ may well be reserved in future versions of PHP (see here). Perhaps all the core data types could be name spaced in some way?
Anyway - this library is awesome and has saved me an awful lot of time, so thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.