GithubHelp home page GithubHelp logo

mailerlite / mailerlite-api-v2-php-sdk Goto Github PK

View Code? Open in Web Editor NEW
80.0 12.0 45.0 77 KB

Official PHP wrapper for MailerLite Classic HTTP API v2

Home Page: https://developers-classic.mailerlite.com/docs

License: MIT License

PHP 100.00%
php php-sdk mailerlite mailerlite-api email-marketing email-campaigns email marketing-automation marketing-emails

mailerlite-api-v2-php-sdk's Introduction

MailerLite Classic API v2 PHP SDK

This library is for MailerLite Classic. If you want to integrate with MailerLite please use https://github.com/mailerlite/mailerlite-php instead.

It is an official PHP SDK for the MailerLite Classic API.

You can find more examples and information about the MailerLite Classic API here: https://developers-classic.mailerlite.com/docs

Getting started

In order to use this library you need to have at least PHP 7.1 version.

There are two ways to use MailerLite PHP SDK:

If you are not familiar with Composer, learn about it here.

Then you will need to run this simple command using CLI:

composer require mailerlite/mailerlite-api-v2-php-sdk

This library is built atop of PSR-7 and PSR-18. If you are receiving Http\Discovery\Exception\DiscoveryFailedException exception, you will need to run:

composer require php-http/guzzle6-adapter
Manual (preferable for shared hostings)

This way is preferable only if you are using shared hosting and do not have a possibility to use Composer. You will need to download the source of the latest release from here, extract it and place its contents in the root folder of your project. The next step is the same as using Composer, you will need to require vendor/autoload.php file in your index.php and lets dive in!

Usage examples

Groups API

In the given example you will see how to initiate selected API and a few actions which are available:

  • Create group
  • Get groups
  • Update group
  • Get subscribers who belongs to selected group
$groupsApi = (new \MailerLiteApi\MailerLite('your-api-key'))->groups();

$newGroup = $groupsApi->create(['name' => 'New group']); // creates group and returns it

$allGroups = $groupsApi->get(); // returns array of groups

$groupId = 123;
$singleGroup = $groupsApi->find($groupId); // returns single item object

$subscribers = $groupsApi->getSubscribers($groupId); // get subscribers who belongs to selected group

$subscribers = $groupsApi->getSubscribers($groupId, 'unsubscribed'); // get unsubscribed subscribers who belongs to selected group

Use multiple APIs at once

Also `MailerLiteApi\MailerLite' object can be initiated before selecting API you want to use and it allows to achieve more.

$mailerliteClient = new \MailerLiteApi\MailerLite('your-api-key');

$groupsApi = $mailerliteClient->groups();
$groups = $groupsApi->get(); // returns array of groups

$fieldsApi = $mailerliteClient->fields();
$fields = $fieldsApi->get(); // returns array of fields

Use your preferred HTTP client

MailerLite SDK uses cURL as default HTTP client but it is easy to use your preferred client. It is achieved by using HTTPlug which is PSR-7 compliant HTTP client abstraction.

Here is an example how to use Guzzle instead of cURL:

$guzzle = new \GuzzleHttp\Client();
$guzzleClient = new \Http\Adapter\Guzzle6\Client($guzzle);

$mailerliteClient = new \MailerLiteApi\MailerLite('your-api-key', $guzzleClient);

Support and Feedback

In case you find any bugs, submit an issue directly here in GitHub.

You are welcome to create SDK for any other programming language.

If you have any troubles using our API or SDK free to contact our support by email [email protected]

Official documentation is at https://developers-classic.mailerlite.com/docs

mailerlite-api-v2-php-sdk's People

Contributors

cobrasphere-ib avatar domasweb avatar dominykasmailer avatar flowdee avatar jissereitsma avatar johnkelesidis avatar juliusb avatar karlkeefer avatar npetrunova avatar nuclearhead avatar tadaspaplauskas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mailerlite-api-v2-php-sdk's Issues

Calls to API are failing due to 301 moved error

MailerLite recently emailed asking everyone to update to HTTPS instead of HTTP for the calls to the API. Since then, the calls to the API using the files provided and code that worked fine before now fail. When querying the subscriber list for example, it throws a 301 moved error stating that the document has been moved to a new URL.

MailerLite have told me it's down to ME to change all these API files from GitHub which doesn't seem right to me. I don't particularly feel I should be the one tinkering to update files that MailerLite themselves have provided.

Is there any possible chance you can update the GitHub files so it now works with HTTPS and fixes this error?

Import request not returning the expected object

/groups/:id/subscribers/import is not returning the expected response of 200, instead, it returns a data object, with more stats.

Request:

$groupsApi = (new \MailerLiteApi\MailerLite('your-api-key'))->groups();

$groupId = 123;

$subscribers = [
  [
    'email' => '[email protected]',
  	'fields' => [
    	'name' => 'John',
    	'surname' => 'Doe',
    	'company' => 'MailerLite'
  	],
  ],
  [
    'email' => '[email protected]',
  	'fields' => [
    	'name' => 'John Jr.',
    	'surname' => 'Doe',
    	'company' => 'MailerLite'
  	]
  ]
];

$addedSubscribers = $groupsApi->importSubscribers($groupId, $subscribers); 

Expected Response:

{
  "imported": [
    {
      "id": 1343991205,
      "email": "[email protected]"
    }
  ],
  "updated": [],
  "unchanged": [
    {
      "id": 1343965485,
      "email": "[email protected]"
    }
  ],
  "errors": []
}

Response I'm getting instead:

^ {#1882
  +"data": {#1876
    +"id": "xxxxxxxxxxxx"
    +"total": 42
    +"processed": 42
    +"imported": 0
    +"updated": 0
    +"errored": 42
    +"percent": 100
    +"done": true
    +"invalid": []
    +"invalidCount": 0
    +"mistyped": []
    +"mistypedCount": 0
    +"changed": []
    +"changedCount": 0
    +"unchanged": array:5 [
      0 => {#1877
        +"id": "xxxxxxxxxxxxxxxxx"
        +"email": "xxxxxxxxxxxxxxxxx"
      }
      1 => {#1878
        +"id": "xxxxxxxxxxxxxxxxx"
        +"email": "xxxxxxxxxxxxxxxxx"
      }
      2 => {#1879
        +"id": "xxxxxxxxxxxxxxxxx"
        +"email": "xxxxxxxxxxxxxxxxx"
      }
      3 => {#1880
        +"id": "xxxxxxxxxxxxxxxxx"
        +"email": "xxxxxxxxxxxxxxxxx"
      }

https://developers.mailerlite.com/reference/add-many-subscribers

Error on removing subscription

Hello,

When trying to remove a subscription, having already identified it and using the id i am using the delete method passing the id as a parameter.
The result is the following error: "Endpoint not found"

Can you please provide some help?

I am using Laravel 8.

Regards,

Luis Dias

Call to undefined function GuzzleHttp\Psr7\stream_for

Hi,

I've been using mailerlite for almost a year and couple weeks ago it stopped working, throwing this PHP error:
Uncaught Error: Call to undefined function GuzzleHttp\Psr7\stream_for() in /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/guzzlehttp/psr7/src/Request.php:54 Stack trace: #0 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(96): GuzzleHttp\Psr7\Request->__construct('POST', Object(GuzzleHttp\Psr7\Uri), Array, '{"email":"test@...') #1 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(56): MailerLiteApi\Common\RestClient->send('POST', 'groups/11111...', Array) #2 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Groups.php(62): MailerLiteApi\Common\RestClient->post('groups/10301710...', Array) #3 /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/theme-users.php(133): MailerLiteAp in /home/www/clients/client3186/web7196/web/wp-content/themes/Heywood/functions/vendor/guzzlehttp/psr7/src/Request.php on line 54

Code I'm using:
require_once __DIR__ . '/vendor/autoload.php'; $groupId = 1111111111; groupsApi = (new MailerLiteApi\MailerLite("my-api-key"))->groups(); subscriber = ['email' => $user_email]; response = $groupsApi->addSubscriber($groupId, $subscriber);

I'm using v0.2.3 archive which is linked in the readme.md.

Please help.

Campaigns GET endpoint not found

When i want to fetch all campaigns through the API, i get the endpoint not found error.

    public function __construct()
    {
        $this->instance = new \MailerLiteApi\MailerLite('credentials');
    }

    public function getCampaigns()
    {
        $response = $this->instance->campaigns()->get();
    }

Tests are not working anymore

Hi all,

I am maintaining a python wrapper of the Mailerlite API

It seems that the public API key (here) does not work anymore. It returns {"error":{"code":302,"message":"API-Key Unauthorized"}}.

This is breaking all my tests and the tests in this repo also. I can not use my personal Developer API key.

Is there any alternative?

Thanks in advance for the feedback!

Can't install with php-http/curl-client 2.0

Composer requirements could not be resolved to an installable set of packages.
- Installation request for mailerlite/mailerlite-api-v2-php-sdk ^0.2.3 -> satisfiable by mailerlite/mailerlite-api-v2-php-sdk[0.2.3].
- Conclusion: remove php-http/curl-client 2.0.0
- Conclusion: don't install php-http/curl-client 2.0.0
- mailerlite/mailerlite-api-v2-php-sdk 0.2.3 requires php-http/curl-client ^1.4 -> satisfiable by php-http/curl-client[1.7.x-dev, v1.4.0, v1.4.1, v1.4.2, v1.5.0, v1.5.1, v1.6.0, v1.6.1, v1.6.2, v1.7.0, v1.7.1].

Please update requirements to support newer version of curl-client.

Many classes not found

Hi,
I'm using PHP 7.3

I have reinstalled this library with composer and now I have those errors... even if I have turned off PHP errors...
surprisingly, the api works by itself, but the annoying thing is that in addition to what it has to display (e.g. groups) it spits out these errors.

Class Phalcon/Http/Message/RequestFactory not foundClass Phalcon/Http/Message/RequestFactory not foundClass Symfony/Component/HttpClient/HttplugClient not foundClass Http/Adapter/Guzzle7/Client not foundClass Http/Adapter/Guzzle5/Client not foundClass Http/Client/Curl/Client not foundClass Http/Client/Socket/Client not foundClass Http/Adapter/Buzz/Client not foundClass Http/Adapter/React/Client not foundClass Http/Adapter/Cake/Client not foundClass Http/Adapter/Zend/Client not foundClass Http/Adapter/Artax/Client not foundClass Symfony/Component/HttpClient/Psr18Client not foundClass Symfony/Component/HttpClient/Psr18Client not foundClass Symfony/Component/HttpClient/Psr18Client not foundClass Buzz/Client/FileGetContents not foundClass Buzz/Client/FileGetContents not foundClass Buzz/Client/FileGetContents not found

I did composer require mailerlite/mailerlite-api-v2-php-sdk and composer require php-http/guzzle6-adapter - without second command there was 500 error with the same errors, now it's working without 500 error.

Fatal Error on adding new subscriber

When trying to add a subscriber, I got:

<b>Fatal error</b>:  Uncaught exception 'Http\Client\Exception\NetworkException' in /data/www/wp-content/plugins/cf-mailerlite/vendor/php-http/curl-client/src/Client.php:134

I had to change the BASE_URL constant to https://api.mailerlite.com/api/ to make this work, as otherwise the CURLE_SSL_CONNECT_ERROR was triggered.

Can't use this library with PHP 7.4 (or just 7.x)

What is the problem?

This repo says it requires at least PHP version 7.1. But after doing fresh install of this component, the Mailerlite's dependencies require at least PHP version 8.1

Is the 7.1 requirement for this Mailerlite API still valid?

How to reproduce:

  • Switch to PHP 7.x (7.4 in my use-case)
  • Do fresh install of this Mailerlite API v2 PHP SDK
  • Add a new subscriber to a group

Code that can be used for faster reproducing:

$mailerlite_api_key = '';
$mailerlite_group_id = '';

$mailerlite_group_api = ( new \MailerLiteApi\MailerLite( $mailerlite_api_key ) )->groups();

$mailerlite_subscriber = [
    'email'  => $this->email,
    'fields' => [
        'name' => $this->name,
    ],
];

$response = $mailerlite_group_api->addSubscriber( $mailerlite_group_id, $mailerlite_subscriber );

Uncaught exception 'Http\Client\Exception\RequestException' with message 'No URL set!'

Steps

  1. $ composer require mailerlite/mailerlite-api-v2-php-sdk
  2. Script: (using GUMP for sanitization)
require_once ('../vendor/autoload.php'); // composer autoloader
require_once ('../src/config.php');      // @param Array $config

// Initalize GUMP and MailerLite
$gump         = new GUMP();
$mailer       = new \MailerLiteApi\MailerLite($config['mailerlite']['api_key']);
$mailerGroups = $mailer->groups();

// Sanatize input and merge with defaults
$_REQUEST = $gump->xss_clean($gump->sanitize($_REQUEST));
$input    = array_merge($config['mailerlite']['defaults'], $_REQUEST);

// Set Validation and Filtering rules
$gump->validation_rules($config['mailerlite']['validation_rules']);
$gump->filter_rules($config['mailerlite']['filter_rules']);

// Run validation and filtering
$subscriberData = $gump->run($input);

// return errors if nessassary
if (!$subscriberData) {
  die(json_encode([
    'status'  => false,
    'data'    => $grump->get_errors_array(),
    'message' => $gump->get_readable_errors(true)
  ]));
}

// Fire Mailerlite addSubscriber() request via
//   Official mailerlite-api-v2-php-sdk SDK
//
// This causes a Fatal error:
//   Uncaught exception 'Http\Client\Exception\RequestException' with message 'No URL set!'
$response = $mailerGroups->addSubscriber(
  $config['mailerlite']['group_id'],
  $subscriberData
);

// Fatal error: Uncaught exception 'Http\Client\Exception\RequestException' with message 'No URL set!' in vendor/php-http/curl-client/src/Client.php:136
// Stack trace:
// #0 vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(97): Http\Client\Curl\Client->sendRequest(Object(GuzzleHttp\Psr7\Request))
// #1 vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(56): MailerLiteApi\Common\RestClient->send('POST', 'groups/6256321/...', Array)
// #2 vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Groups.php(45): MailerLiteApi\Common\RestClient->post('groups/6256321/...', Array)
// #3 public/mailerlite_add_subscriber.php(36): MailerLiteApi\Api\Groups- in vendor/php-http/curl-client/src/Client.php on line 136

// [Code Unreachable due to Fatal error above]
// End the script by echoing out JSON to let the caller know the status and any errors
die(json_encode([
  'status'  => (!!$response),
  'data'    => $grump->get_errors_array(),
  'message' => "Successfully subscribed {$input['name']} to mailerlite group '{$config['mailerlite']['group_id']}'"
]));

Error Message

Fatal error: Uncaught exception 'Http\Client\Exception\RequestException' with message 'No URL set!' in vendor/php-http/curl-client/src/Client.php:136
Stack trace:
#0 vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(97): Http\Client\Curl\Client->sendRequest(Object(GuzzleHttp\Psr7\Request))
#1 vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php(56): MailerLiteApi\Common\RestClient->send('POST', 'groups/6256321/...', Array)
#2 vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Groups.php(45): MailerLiteApi\Common\RestClient->post('groups/6256321/...', Array)
#3 public/mailerlite_add_subscriber.php(36): MailerLiteApi\Api\Groups- in vendor/php-http/curl-client/src/Client.php on line 136

[Feature Request] Transparency on testing status in newer PHP versions

Problem

When considering the compatibility of this library it's difficult to know for sure what it's actually compatible with and whether it can reliably be used in modern projects. The composer.json indicates it's compatible with PHP 7.X but the phpunit 5 testing library is not able to run tests against PHP 7.2-7.4.

Solution

It'd be really nice to see tests for this library run with something like Travis-CI or GitHub actions, so users can see what it's being tested against to get an idea of whether it's utilizing deprecated functionality for newer versions.

Class Request not found

Fatal error: Class 'MailerLiteApi\Common\Request' not found in \Common\RestClient.php on line 96

It looks like it's still using GuzzleHttp\Psr7\Request even if $this->httpClient has been defaulted to null.
Any ideas on this?

Thanks.

[Feature Request] More fluent syntax for common use cases

I'm a new user of the SDK, but it looks like this snippet is the best way to determine if an email is currently subscribed or not:

$subscription = $this->mailerLite->subscribers()->find($user->email);
if (property_exists($subscription, 'error') && $subscription->error->code === 123) {
   
}

This isn't very readable, and I was only able to obtain the 123 error code through trial & error as I didn't come across it in the documentation. It'd be great if there was a class constant representing this error code or if a shorthand helper method could be added such as if ($this->mailerLite->subscribers()->isSubscribed($email) that either returned a bool or threw an exception on error (e.g. 404).

Link to archive on README.md is broken

The link to the archive given under the "Manual (preferable for shared hostings)" section of "Getting Started" goes to a broken Google Drive link.

Is it possible to download the SDK anywhere else?

Without Composer

Hi:
Do you have example to do it without composer?

I dowload this file and put it in the root folder and it says:
Fatal error: Uncaught Error: Class 'MailerLiteApi\Common\RestClient' not found..

Regards

wrong response for groups subscriber belongs to

Thanks for great wrapper,
but it has a problem in returning groups subscribers belongs to, it should return an array of groups which is correct for MailerLite API ( I had to send request myself without the wrapper ) but wrapper's response is not what expected ( object of "account" returns instead )
MailerLite doc

Get more than 100 groups...

Hi,
I try to get more than 100 groups because we have it and... I have a problem.

  1. Why don't you give in groups array how many in total groups we have? I don't know what for(){} do.
  2. I tried
$mailerlite_groupsApi = $mailerliteClient->groups();
$mailerlite_groups = $mailerlite_groupsApi->get(['limit'=>100,'offset'=>100,'filters'=>null]); // returns array of groups
  1. I tried
 $mailerlite_groupsApi = $mailerliteClient->groups();
$mailerlite_groups = $mailerlite_groupsApi->get(['limit'=>200,'offset'=>100,'filters'=>null]); // returns array of groups

Still getting first 100 groups in 2 and 3 point.... why? how to do this correctly?

Endpoint not found error with the new MailerLite

Hi all,

We've recently moved to the new MailerLite from the Classic version, and some endpoints are not working with the new version.

For example, there is a problem with the webhooks endpoint.

Client error: GET https://api.mailerlite.com/api/v2/webhooks resulted in a 404 Not Found response:
{"error":{"message":"Endpoint not found"}}

We have the same problem wiht the unsubscription ($this->mailerLite->subscribers()->delete($subscriber->getEmail())).

Does anyone know the solution to this?

import limitation

Hi,
I want sync more than 30.000 email with mailerlite.
i read your document and find import method
now i have one question: how many email can i send through this method ?
thanks.

Where is the "group ID"

I feel like I'm missing something. I'm not getting successful subscription using the php sdk. There is no group ID available on the mailerlite website when I look under subscribers. Has the process changed or where do I find group ID?

No segments support

it looks like the segments api is not actually implemented (but the documentation gives examples)

$segmentsApi = (new \MailerLiteApi\MailerLite(api_key_here))->segments();

results in:

Call to undefined method MailerLiteApi\MailerLite::segments

createRequest is an undefined method

$request = $this->getRequestFactory()->createRequest($method, $endpointUrl);
I got the error Undefined method createRequest.
And the json_encode($request) is {}

V2 doc clarity.

Unable to find the upper limit of the number of subscribers in a single call via API in V2.

Is it still the same as in V1, 1000?

Items Protected

Just started to experiment with your API SDK but all my results are coming back protected. I also can't seem to find any documentation on this. Am I missing something?

My code:

$path = '/var/www/html/mailerlite/vendor/autoload.php';
require $path;
$mailerliteClient = new \MailerLiteApi\MailerLite($api_key);
$groupsApi = $mailerliteClient->groups();
$groups = $groupsApi->get(); // returns array of groups

Thanks for any suggestions!

How to get all active subscribers?

I am trying to get all active subscribers using this code:

    $mailerliteClient = new \MailerLiteApi\MailerLite($apiKey);
    $subscribersApi = $mailerliteClient->subscribers()
                                       ->where([
                                           'type' => 'active'
                                       ]);

But it returns all the subscribers, including unsubscribed.

How can I get all active subscribers?

Library doesn't catch all errors - error 500 in php because of that

Hi,
We have some clients which random has errors like "Too many requests" but there's error 500 in php even if we have in code try catch....

try {
$mailerliteClient = new \MailerLiteApi\MailerLite($mailerlite['mailerlite_key']);
  $data_contact = array('email' => $userdata['email'], 'name' => $userdata['firstname'], 'resubscribe' => true);
                                    $ml = explode('|', $fast_selling['mailerlite']);
 foreach ($ml as $mlk) {
                                        if (stripos($mlk, 'aps_') !== false) { //after pay subscribe
                                            $aps = explode('_', $mlk);
                                            $aps_id = $aps[1];
                                            $addedSubscriber = $mailerliteClient->groups()->addSubscriber($aps_id, $data_contact);
                                        }


                                        if (stripos($mlk, 'apu_') !== false) { // after pay unsubscribe
                                            $apu = explode('_', $mlk);
                                            $apu_id = $apu[1];
                                            $subscribers = $mailerliteClient->subscribers()->search($data_contact['email']); // returns array of subscriber objects that match query
                                            $s_id = $subscribers[0]->id;
                                            if (!empty($s_id)) {
                                                $groupId = $apu_id;
                                                $subscriberId = $s_id;
                                                $mailerliteClient->groups()->removeSubscriber($groupId, $subscriberId);
                                            }
                                        }
                                    }


} catch (\MailerLiteApi\Exceptions\MailerLiteSdkException $e) {

} catch (\Exception $e) {
}

Can you fix that as fast as it's possible?

Tests fails while adding subscriber

No changes added to code but, test (MlTestCase.php:38) throws "Trying to get property 'imported' of non-object"
Maybe it's demo account problem?

Documentation unclear: addContent() method

Can you please describe the expected format of $contentData in the following line?

public function addContent($campaignId, $contentData = [], $params = [])

It seems like it should be a html string yet the parameter is an array.

For context: My use case is to be able to create a new campaign and send emails when an external event is triggered

Also, does calling this method override any existing data?

Update to httplug 2.0

I am unable to use other composer packages because this SDK is restricted to use ^1.0. Would it be possible to update httplug to 2.0?

Access the rate limit headers

Hello,

It seems that the headers about the rate limit of the api are not accessible when doing a call like

$response =  $mailerliteClient->groups()->addSubscriber(...);

$response contains only the body, but the response_code and the response headers are then no usable by the code. Is there an alternative?

Thanks!!!

Double opt-in for API

How to use this option?

Right now when i add subscriber it's active but i want to user confirm email.

Thanks

PHP Version too low.

Hi,
I have composer.json with many libraries but your library is stopping me... when I try composer update I get

 Problem 1
    - Root composer.json requires mailerlite/mailerlite-api-v2-php-sdk ^0.2.3 -> satisfiable by mailerlite/mailerlite-api-v2-php-sdk[0.2.3].
    - mailerlite/mailerlite-api-v2-php-sdk 0.2.3 requires php ^5.5|^7.0 -> your php version (8.0.15) does not satisfy that requirement.

Can you do something with that as fast as possible? ;)

Issue with "Use your preferred HTTP client" section of readme.

$mailerliteClient = new \MailerLiteApi\Mailerlite('your-api-key', $guzzleClient);

There is a case sensitivity issue here, this should be:

$mailerliteClient = new \MailerLiteApi\MailerLite('your-api-key', $guzzleClient);

Copy/pasting this example as-is will work in a case-insensitive environment (e.g. Windows) but break once pushed to a case-sensitive environment for testing or production.

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.