{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/comments/22600740","id":22600740,"diff_hunk":"@@ -0,0 +1,239 @@\n+<?php\n+/**\n+ * Copyright 2014 Facebook, Inc.\n+ *\n+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to\n+ * use, copy, modify, and distribute this software in source code or binary\n+ * form for use in connection with the web services and APIs provided by\n+ * Facebook.\n+ *\n+ * As with any software that integrates with the Facebook platform, your use\n+ * of this software is subject to the Facebook Developer Principles and\n+ * Policies [http://developers.facebook.com/policy/]. This copyright notice\n+ * shall be included in all copies or substantial portions of the software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n+ * DEALINGS IN THE SOFTWARE.\n+ *\n+ */\n+\n+namespace FacebookAds\\Http\\Adapter;\n+\n+use FacebookAds\\Exception\\Exception;\n+use FacebookAds\\Http\\Client;\n+use FacebookAds\\Http\\Headers;\n+use FacebookAds\\Http\\Parameters;\n+use FacebookAds\\Http\\RequestInterface;\n+use FacebookAds\\Http\\ResponseInterface;\n+\n+class StreamHttpAdapter extends AbstractAdapter {\n+\n+  /**\n+   * @var string\n+   */\n+  const EOL = \"\\r\\n\";\n+\n+  /**\n+   * @var resource\n+   */\n+  protected $handle;\n+\n+  /**\n+   * @var \\ArrayObject\n+   */\n+  protected $opts;\n+\n+  /**\n+   * @var StreamHttp Procedural stream wrapper as object\n+   */\n+  protected static $stream_http;  \n+\n+  /**\n+   * @var MIME Boundary\n+   */\n+  protected static $mime_boundary;  \n+\n+  /**\n+   * @param Client $client\n+   */\n+  public function __construct(Client $client) {\n+    parent::__construct($client);\n+\n+    self::$stream_http = new StreamHttp();\n+\n+    static::generateMimeBoundary();\n+  }\n+\n+  protected static function generateMimeBoundary() {\n+    static::$mime_boundary = md5(time());\n+  }\n+\n+  /**\n+   * @return string\n+   */\n+  protected function getCaBundlePath() {\n+    return dirname(__FILE__).DIRECTORY_SEPARATOR\n+    .'..'.DIRECTORY_SEPARATOR\n+    .'..'.DIRECTORY_SEPARATOR\n+    .'..'.DIRECTORY_SEPARATOR\n+    .'..'.DIRECTORY_SEPARATOR\n+    .'fb_ca_chain_bundle.crt';\n+  }\n+\n+  /**\n+   * @return \\ArrayObject\n+   */\n+  public function getOpts() {\n+    return array();\n+  }\n+\n+  /**\n+   * @param \\ArrayObject $opts\n+   */\n+  public function setOpts(\\ArrayObject $opts) {\n+    return;\n+  }\n+\n+  /**\n+   * @param Headers $headers\n+   * @param string $raw_headers\n+   */\n+  protected function parseHeaders(Headers $headers, $raw_headers) {\n+    // There will be multiple headers if a 301 was followed\n+    // or a proxy was followed, etc\n+    $last_request = 0;\n+    foreach($raw_headers as $key => $raw_header) {\n+      if (strpos($raw_header, ': ') === false) {\n+        $last_request = $key;\n+      }\n+    }\n+\n+    // We just want the last response (at the end)\n+    $header_components = array_slice($raw_headers, $last_request);\n+\n+    foreach ($header_components as $line) {\n+      if (strpos($line, ': ') === false) {\n+        $headers['http_code'] = $line;\n+      } else {\n+        list ($key, $value) = explode(': ', $line);\n+        $headers[$key] = $value;\n+      }\n+    }\n+  }\n+\n+  /**\n+   * @param Parameters $body_params\n+   * @return array\n+   */\n+  protected function prepareBodyPostfields(Parameters $body_params) {\n+    $postfields = array();\n+    foreach ($body_params as $key => $value) {\n+      $data = '';    \n+      $data .= '--' . static::$mime_boundary . self::EOL;\n+      $data .= 'Content-Disposition: form-data; name=\"' . $key . '\"' . self::EOL . self::EOL;\n+      $data .= (is_scalar($value) ? $value : json_encode($value)) . self::EOL;\n+\n+      $postfields[$key] = $data;\n+    }\n+\n+    return $postfields;\n+  }\n+\n+  /**\n+   * @param Parameters $file_params\n+   * @return array\n+   */\n+  protected function prepareFilePostfields(Parameters $file_params) {\n+    $postfields = array();\n+    foreach ($file_params as $key => $value) {\n+      $data = '';    \n+      $data .= '--' . static::$mime_boundary . self::EOL;\n+      $data .= 'Content-Disposition: form-data; name=\"' . $key . '\"; filename=\"' . basename($value) . '\"' . self::EOL;\n+      $data .= 'Content-Type: application/octet-stream' . self::EOL . self::EOL;\n+      $data .= file_get_contents($value) . self::EOL;\n+\n+      $postfields[$key] = $data;\n+    }\n+\n+    return $postfields;\n+  }\n+\n+  /**\n+   * @param RequestInterface $request\n+   * @return ResponseInterface\n+   * @throws Exception\n+   */\n+  public function sendRequest(RequestInterface $request) {\n+    $response = $this->getClient()->createResponse();\n+    $url = $request->getUrl();\n+    $method = $request->getMethod();\n+\n+    $options = array(\n+      'http' => array(\n+        'method' => $method,\n+        'timeout' => 60,\n+        'ignore_errors' => true\n+      ),\n+      'ssl' => array(\n+        'verify_peer' => true,\n+        'cafile' => $this->getCaBundlePath(),\n+      ),\n+    );\n+\n+    $postfields = array();\n+    if ($method === RequestInterface::METHOD_POST\n+      && $request->getFileParams()->count()\n+    ) {\n+      $postfields = array_merge(\n+        $postfields, $this->prepareFilePostfields($request->getFileParams()));\n+    }    \n+    if ($method !== RequestInterface::METHOD_GET\n+      && $request->getBodyParams()->count()) {\n+      $postfields = array_merge(\n+        $postfields, $this->prepareBodyPostfields($request->getBodyParams()));\n+    }    \n+\n+    $options['http']['content'] = implode('', $postfields) . \"--\" . self::$mime_boundary . \"--\" . self::EOL . self::EOL;\n+\n+    $request->getHeaders()['Content-Type'] = 'multipart/form-data; boundary=' . static::$mime_boundary . self::EOL;\n+\n+    if ($request->getHeaders()->count()) {\n+      $headers = array();\n+      foreach ($request->getHeaders() as $header => $value) {\n+        $headers[] = \"{$header}: {$value}\";\n+      }\n+\n+      $options['http']['header'] = implode(self::EOL, $headers);\n+    }    \n+\n+    self::$stream_http->streamContextCreate($options);\n+    $raw_response = self::$stream_http->fileGetContents($url);\n+    $raw_headers = self::$stream_http->getResponseHeaders();\n+\n+    $this->parseHeaders($response->getHeaders(), $raw_headers);\n+    $response->setBody($raw_response);   \n+\n+    $status_code = $this->getStatusCodeFromHeader($response->getHeaders()['http_code']);\n+    $response->setStatusCode($status_code);   \n+\n+    return $response;\n+  }\n+\n+  /**\n+   * Pulls out the HTTP status code from a response header\n+   *\n+   * @param string $header\n+   *\n+   * @return int\n+   */\n+  public static function getStatusCodeFromHeader($header)","path":"src/FacebookAds/Http/Adapter/StreamHttpAdapter.php","position":234,"original_position":234,"commit_id":"f6411971707915014e308733c30ba6d893ebdc19","original_commit_id":"f6411971707915014e308733c30ba6d893ebdc19","user":{"login":"pruno","id":1735022,"avatar_url":"https://avatars.githubusercontent.com/u/1735022?v=3","gravatar_id":"","url":"https://api.github.com/users/pruno","html_url":"https://github.com/pruno","followers_url":"https://api.github.com/users/pruno/followers","following_url":"https://api.github.com/users/pruno/following{/other_user}","gists_url":"https://api.github.com/users/pruno/gists{/gist_id}","starred_url":"https://api.github.com/users/pruno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pruno/subscriptions","organizations_url":"https://api.github.com/users/pruno/orgs","repos_url":"https://api.github.com/users/pruno/repos","events_url":"https://api.github.com/users/pruno/events{/privacy}","received_events_url":"https://api.github.com/users/pruno/received_events","type":"User","site_admin":false},"body":"Why this is public static?","created_at":"2015-01-07T17:32:41Z","updated_at":"2015-01-07T17:32:41Z","html_url":"https://github.com/facebook/facebook-php-ads-sdk/pull/45#discussion_r22600740","pull_request_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/comments/22600740"},"html":{"href":"https://github.com/facebook/facebook-php-ads-sdk/pull/45#discussion_r22600740"},"pull_request":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45","id":25229955,"html_url":"https://github.com/facebook/facebook-php-ads-sdk/pull/45","diff_url":"https://github.com/facebook/facebook-php-ads-sdk/pull/45.diff","patch_url":"https://github.com/facebook/facebook-php-ads-sdk/pull/45.patch","issue_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/issues/45","number":45,"state":"open","locked":false,"title":"Added HTTP client implementaions for stream wrapper.","user":{"login":"mkubenka","id":933201,"avatar_url":"https://avatars.githubusercontent.com/u/933201?v=3","gravatar_id":"","url":"https://api.github.com/users/mkubenka","html_url":"https://github.com/mkubenka","followers_url":"https://api.github.com/users/mkubenka/followers","following_url":"https://api.github.com/users/mkubenka/following{/other_user}","gists_url":"https://api.github.com/users/mkubenka/gists{/gist_id}","starred_url":"https://api.github.com/users/mkubenka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkubenka/subscriptions","organizations_url":"https://api.github.com/users/mkubenka/orgs","repos_url":"https://api.github.com/users/mkubenka/repos","events_url":"https://api.github.com/users/mkubenka/events{/privacy}","received_events_url":"https://api.github.com/users/mkubenka/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-11-30T02:22:53Z","updated_at":"2015-01-07T17:32:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7289c29daca991920e5dc8270db21e9e5c9741e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45/commits","review_comments_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45/comments","review_comment_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/comments/{number}","comments_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/issues/45/comments","statuses_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/statuses/f6411971707915014e308733c30ba6d893ebdc19","head":{"label":"mkubenka:stream_http_adapter","ref":"stream_http_adapter","sha":"f6411971707915014e308733c30ba6d893ebdc19","user":{"login":"mkubenka","id":933201,"avatar_url":"https://avatars.githubusercontent.com/u/933201?v=3","gravatar_id":"","url":"https://api.github.com/users/mkubenka","html_url":"https://github.com/mkubenka","followers_url":"https://api.github.com/users/mkubenka/followers","following_url":"https://api.github.com/users/mkubenka/following{/other_user}","gists_url":"https://api.github.com/users/mkubenka/gists{/gist_id}","starred_url":"https://api.github.com/users/mkubenka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkubenka/subscriptions","organizations_url":"https://api.github.com/users/mkubenka/orgs","repos_url":"https://api.github.com/users/mkubenka/repos","events_url":"https://api.github.com/users/mkubenka/events{/privacy}","received_events_url":"https://api.github.com/users/mkubenka/received_events","type":"User","site_admin":false},"repo":{"id":27241626,"name":"facebook-php-ads-sdk","full_name":"mkubenka/facebook-php-ads-sdk","owner":{"login":"mkubenka","id":933201,"avatar_url":"https://avatars.githubusercontent.com/u/933201?v=3","gravatar_id":"","url":"https://api.github.com/users/mkubenka","html_url":"https://github.com/mkubenka","followers_url":"https://api.github.com/users/mkubenka/followers","following_url":"https://api.github.com/users/mkubenka/following{/other_user}","gists_url":"https://api.github.com/users/mkubenka/gists{/gist_id}","starred_url":"https://api.github.com/users/mkubenka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkubenka/subscriptions","organizations_url":"https://api.github.com/users/mkubenka/orgs","repos_url":"https://api.github.com/users/mkubenka/repos","events_url":"https://api.github.com/users/mkubenka/events{/privacy}","received_events_url":"https://api.github.com/users/mkubenka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkubenka/facebook-php-ads-sdk","description":"An SDK built to facilitate application development for Facebook Ads API.","fork":true,"url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk","forks_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/forks","keys_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/teams","hooks_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/hooks","issue_events_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/events","assignees_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/tags","blobs_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/languages","stargazers_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/stargazers","contributors_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/contributors","subscribers_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/subscribers","subscription_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/subscription","commits_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/issues/comments/{number}","contents_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/merges","archive_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/downloads","issues_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/labels{/name}","releases_url":"https://api.github.com/repos/mkubenka/facebook-php-ads-sdk/releases{/id}","created_at":"2014-11-27T21:17:47Z","updated_at":"2014-11-27T21:17:48Z","pushed_at":"2014-12-01T11:55:01Z","git_url":"git://github.com/mkubenka/facebook-php-ads-sdk.git","ssh_url":"git@github.com:mkubenka/facebook-php-ads-sdk.git","clone_url":"https://github.com/mkubenka/facebook-php-ads-sdk.git","svn_url":"https://github.com/mkubenka/facebook-php-ads-sdk","homepage":"","size":627,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"329dcc0eb7962a20586be19bb168b671700d7b0e","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":20878334,"name":"facebook-php-ads-sdk","full_name":"facebook/facebook-php-ads-sdk","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/facebook-php-ads-sdk","description":"An SDK built to facilitate application development for Facebook Ads API.","fork":false,"url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk","forks_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/forks","keys_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/teams","hooks_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/hooks","issue_events_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/events","assignees_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/tags","blobs_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/languages","stargazers_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/stargazers","contributors_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/contributors","subscribers_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/subscribers","subscription_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/subscription","commits_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/issues/comments/{number}","contents_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/merges","archive_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/downloads","issues_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/labels{/name}","releases_url":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/releases{/id}","created_at":"2014-06-16T08:48:26Z","updated_at":"2015-01-07T15:32:40Z","pushed_at":"2015-01-07T15:32:40Z","git_url":"git://github.com/facebook/facebook-php-ads-sdk.git","ssh_url":"git@github.com:facebook/facebook-php-ads-sdk.git","clone_url":"https://github.com/facebook/facebook-php-ads-sdk.git","svn_url":"https://github.com/facebook/facebook-php-ads-sdk","homepage":"","size":1123,"stargazers_count":70,"watchers_count":70,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":7,"forks":45,"open_issues":7,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45"},"html":{"href":"https://github.com/facebook/facebook-php-ads-sdk/pull/45"},"issue":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/issues/45"},"comments":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/facebook-php-ads-sdk/statuses/f6411971707915014e308733c30ba6d893ebdc19"}}}}