Skip to content

Add mimetype support to compare() so diff/patches can be fetched #103

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 1 commit into from
Jan 6, 2014

Conversation

skwashd
Copy link
Contributor

@skwashd skwashd commented Jan 2, 2014

The github API supports using mimetypes on patch/diff requests. This allows consumers to pull down a patch for a commit. This is documented at http://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests

This patch gives users access to this feature via the library.

@@ -15,9 +15,13 @@ public function all($username, $repository, array $params)
return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits', $params);
}

public function compare($username, $repository, $base, $head)
public function compare($username, $repository, $base, $head, $media_type = NULL)
Copy link
Contributor

Choose a reason for hiding this comment

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

please use camel cased variable

@skwashd
Copy link
Contributor Author

skwashd commented Jan 5, 2014

Fixed the variable name.

cursedcoder added a commit that referenced this pull request Jan 6, 2014
Add mimetype support to compare() so diff/patches can be fetched
@cursedcoder cursedcoder merged commit f88baac into KnpLabs:master Jan 6, 2014
@skwashd skwashd deleted the patch-mimetypes branch January 6, 2014 14:09
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.

2 participants