1. 07 Apr, 2016 1 commit
  2. 29 Dec, 2015 1 commit
  3. 11 Nov, 2015 1 commit
  4. 05 Aug, 2015 2 commits
  5. 02 Aug, 2015 1 commit
  6. 01 Aug, 2015 1 commit
  7. 28 Jun, 2015 3 commits
    • David T. Sadler's avatar
      0.1.4 release · 88ae55a5
      David T. Sadler authored
      88ae55a5
    • David T. Sadler's avatar
      feature: Allow access to the `Guzzle` object used by the default HTTP client instance. · a0d08076
      David T. Sadler authored
      You can now call the `guzzle` method on any instances of
      \DTS\eBaySDK\HttpClient\HttpClient This will return a Guzzle 3 \Guzzle\Http\Client instance.
      
      ```php
      $service = new Services\TradingService(array(
        'apiVersion' => 925,
        'siteId' => Constants\SiteIds::US
      ));
      
      $guzzle = $service->httpClient()->guzzle();
      
      $guzzle->getConfig()->setPath('curl.options', array(
          'CURLOPT_VERBOSE' => 1
      ));
      ```
      a0d08076
    • David T. Sadler's avatar
      feature: allow client code to access the HttpClient object used to send requests · 304ea795
      David T. Sadler authored
      You can now call the `httpClient` method on a service object. This will return
      an object that implments the \DTS\eBaySDK\Interfaces\HttpClientInterface.
      This object is responsible for the HTTP request to the API. By default the SDK
      will use a \DTS\eBaySDK\HttpClient\HttpClient object.
      
      ```php
      $service = new Services\TradingService(array(
        'apiVersion' => 925,
        'siteId' => Constants\SiteIds::US
      ));
      
      $httpClient = $service->httpClient();
      ```
      
      If you provide your own HTTP client then calling `httpClient` will
      return the same instance.
      
      ```php
      class MockClient implements
      \DTS\eBaySDK\Interfaces\HttpClientInterface
      {
        public function post($url, $headers, $body)
        {
            print_r($headers);
            print($body);
        }
      }
      
      $mock = new MockClient();
      
      $service = new Services\TradingService(array(
        'apiVersion' => 925,
        'siteId' => Constants\SiteIds::US
      ), $mock);
      
      assert('$mock === $service->httpClient()');
      ```
      304ea795
  8. 20 Jun, 2015 4 commits
  9. 25 Aug, 2014 3 commits
    • David T. Sadler's avatar
      doc: update CHANGELOG · 4e16d7d1
      David T. Sadler authored
      4e16d7d1
    • David T. Sadler's avatar
      feature: allow attachments to be sent and received · 8dc869ff
      David T. Sadler authored
      The SDK now allows attachments to be sent as part of the request.
      Likewise attachments are handled if they appear in the response.
      
      To add an attachment to the request object simply call the `attachment`
      method passing in the binary data of the attachment as the first
      parameter. Note that you do not have to base64 encode the data!
      
      ```php
      $request->attachment(file_get_contents(__DIR__.'/picture.jpg'));
      ```
      
      To get the attachment from a response simply call the same method with
      no parmaters. The method will return an associative array with two keys.
      The key 'data' is the binary data of the attachment while the key
      'mimeType' returns the mime type.
      
      ```php
      $response = $service->downloadFile($request);
      
      $attachment = $response->attachment();
      
      $fp = fopen('attachment', 'wb');
      fwrite($fp, $attachment['data']);
      fclose($fp);
      ```
      8dc869ff
    • David T. Sadler's avatar
      6175c53f
  10. 14 Aug, 2014 2 commits
  11. 05 Jul, 2014 8 commits
  12. 25 Jun, 2014 7 commits
  13. 20 Jun, 2014 1 commit
  14. 12 Jun, 2014 5 commits