In this post I will discuss how to access unfuddle api service with help of guzzle api. Guzzle is very popular framework for web service. The Guzzle provides a lightweight framework for creating web service clients. Most web service clients follow a specific pattern: create a client class, create methods for each action, create and execute a cURL handle, parse the response, implement error handling, and return the result. Guzzle takes the redundancy out of this process and gives you the tools you need to quickly build a web service client.”. First we will create client object of unfuddle server, then we will create guzzle request.
Checkout other Framework Tutorials,
- Simple Restful service using Guzzle
- How to call web service with help of Curl
- Top 6 RESTful API Frameworks for PHP
In below script i am developing a sample code which will create client using guzzle and access unfuddle access.
Simple Example : How to access any webservice using guzzle
$client = new Client(‘https://mydomain.unfuddle.com/api/v1′);
$request = $client->get(‘projects/xxx/tickets’);
$response = $request->send();
You can download guzzle and fuddle from below link.