Coder Social home page Coder Social logo

dotmailer-api-v2-php-client's People

Contributors

christian-thomas avatar danbovey avatar ishakuta avatar railsguy avatar romanpitak avatar willitscale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotmailer-api-v2-php-client's Issues

Bug in Resources class. Return is missing

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));
    }

Bug in class Resources

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));
}

'Null' class

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

Class 'Container' not found

Following your Single example....i've installed via Composer (first time using Composer), but am encountering a Fatal error:

Where did I go wrong?

PHP Fatal error: Class 'Container' not found in /Applications/MAMP/htdocs/dotmailer/index.php on line 5

screenshot 2016-05-11 11 40 01

screenshot 2016-05-11 11 40 16

JSON_BIGINT_AS_STRING not implemented

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

Add unit/functional tests

most of the issues we found so far was due to zero unit tests coverage,
can be also some sort of functional tests

Exception handling

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();
}

PHP 7 Compatibility issue

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.