Skip to content

Add Integrations::configure #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 9, 2017
Merged

Add Integrations::configure #581

merged 5 commits into from
May 9, 2017

Conversation

m1guelpf
Copy link
Contributor

@m1guelpf m1guelpf commented May 8, 2017

Fix #580

public function configure($bodyType = null)
{
if ('raw' === $bodyType) {
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.raw', $this->client->getApiVersion());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just set the required header and leave the additional checks away. See: https://github.com/KnpLabs/php-github-api/blob/master/lib/Github/Api/Project/Cards.php#L20

use AcceptHeaderTrait;

/**
* Configure the accept header for Early Access to the projects api
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integrations api instead of projects

/**
* Configure the accept header for Early Access to the projects api
*
* @see https://developer.github.com/v3/repos/projects/#projects
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@acrobat acrobat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor comments

@m1guelpf
Copy link
Contributor Author

m1guelpf commented May 8, 2017

@acrobat Copy-paste errors... fixed now.

Copy link
Collaborator

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@Nyholm Nyholm merged commit 25ea264 into KnpLabs:master May 9, 2017
@m1guelpf m1guelpf deleted the patch-1 branch May 9, 2017 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants