Skip to content

Conversation

misantron
Copy link
Contributor

No description provided.

@thinkingserious
Copy link
Contributor

This is awesome @misantron!

Could you please sign our CLA so we can get it merged? https://github.com/sendgrid/php-http-client/blob/master/CONTRIBUTING.md#cla

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap status: cla needed labels Jul 8, 2016
@misantron
Copy link
Contributor Author

Thanks for quick response.
Do i need an electronic signature for sign your CLA?

@misantron
Copy link
Contributor Author

Any problems with PR merge?

@thinkingserious
Copy link
Contributor

No problems @misantron,

Just waiting for it to rise up through the queue for implementation.

It can move up the queue faster if others +1 or comment on this thread.

Thanks for checking in!

@thinkingserious
Copy link
Contributor

@misantron,

Finally made it back to this ticket :)

Could you please take a moment to check out the merge conflicts?

@misantron
Copy link
Contributor Author

Branch is up to date now and has no conflicts

@thinkingserious
Copy link
Contributor

Awesome, thanks! There are just a few more tickets ahead of this one now.

@thinkingserious
Copy link
Contributor

Hello @misantron,

I am trying to test out this code before I merge and I have run into an issue.

First I ran composer install

In the root directory, I created a test.php file with the folloiwng code:

<?php
include('./lib/Client.php');
$apiKey = getenv('SENDGRID_API_KEY');
$headers = ['Authorization: Bearer ' . $apiKey];
$client = new SendGrid\Client('https://api.sendgrid.com', $headers, '/v3');

// GET Collection
$response = $client->api_keys()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();

When I try to run with php test.php I get the following error:

Fatal error: Class 'SendGrid\Response' not found in /Users/thinkingserious/Workspace/sendgrid/php-http-client/lib/Client.php on line 128

@misantron
Copy link
Contributor Author

You must include SendGrid\Response class file too or use class autoloader generated via Composer.

include('./lib/Response.php');

or

require 'vendor/autoload.php';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants