diff --git a/README.md b/README.md index 1d3a55c..a950189 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,10 @@ -# Jira Api Rest Client +# Jira Api Rest Client (Forked) -[![Build Status](https://secure.travis-ci.org/chobie/jira-api-restclient.png)](http://travis-ci.org/chobie/jira-api-restclient) +For usage, example and licence please see the original README : https://github.com/chobie/jira-api-restclient/blob/master/README.md +## Improvements -you know JIRA5 supports REST API. this is very useful to make some custom notifications and automated jobs. -(JIRA also supports email notification, but it's too much to custom templates, notification timing. unfortunately it requires Administration permission.) -this API library will help your problems regarding JIRA. hope you enjoy it. +* Curl Driver : Enable support for file upload (PHP >= 5.6) +* New example for Issue creation -# Usage -composer.json - -``` -composer require chobie/jira-api-restclient 2.0.* -``` - - -````php -push("project = YOURPROJECT AND (status != closed and status != resolved) ORDER BY priority DESC"); -foreach ($walker as $issue) { - var_dump($issue); - // send custom notification here. -} -```` - -# License - -MIT License - -# JIRA5 Rest API Documents - -https://developer.atlassian.com/static/rest/jira/6.0.html diff --git a/composer.json b/composer.json index 3388fd6..c1c05a4 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { - "name": "chobie/jira-api-restclient", - "description": "JIRA REST API.", + "name": "t-keller/jira-api-restclient", + "description": "Jira REST API Wrapper", "keywords": ["jira","rest","api"], "type": "library", "license": "MIT", @@ -9,6 +9,10 @@ "name": "Shuhei Tanuma", "homepage": "http://chobie.github.io/", "email": "chobieeee@php.net" + }, + { + "name": "Thomas Keller", + "homepage": "https://github.com/t-keller" } ], "minimum-stability": "dev", diff --git a/examples/create_issue.php b/examples/create_issue.php new file mode 100644 index 0000000..3a5ad74 --- /dev/null +++ b/examples/create_issue.php @@ -0,0 +1,7 @@ +createIssue('', '', '', array( + 'description' => '' +)); diff --git a/src/Jira/Api/Client/CurlClient.php b/src/Jira/Api/Client/CurlClient.php index 4a30d41..869ee3f 100644 --- a/src/Jira/Api/Client/CurlClient.php +++ b/src/Jira/Api/Client/CurlClient.php @@ -78,6 +78,7 @@ public function sendRequest($method, $url, $data = array(), $endpoint, Authentic if ($method == "POST") { curl_setopt($curl, CURLOPT_POST, 1); if ($isFile) { + curl_setopt($curl, CURLOPT_SAFE_UPLOAD, false); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } else { curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));