{"action":"created","comment":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/166675647","pull_request_review_id":94777380,"id":166675647,"diff_hunk":"@@ -0,0 +1,310 @@\n+<?php\n+/**\n+ * @copyright 2009-2018 Vanilla Forums Inc.\n+ * @license GPL-2.0\n+ */\n+\n+use Garden\\Schema\\Schema;\n+use Garden\\Web\\Exception\\NotFoundException;\n+use Vanilla\\ApiUtils;\n+use Vanilla\\ImageResizer;\n+use Vanilla\\UploadedFile;\n+use Vanilla\\UploadedFileSchema;\n+\n+/**\n+ * API Controller for `/media`.\n+ */\n+class MediaApiController extends AbstractApiController {\n+\n+    /** @var Schema */\n+    private $idParamSchema;\n+\n+    /** @var MediaModel */\n+    private $mediaModel;\n+\n+    /**\n+     * MediaApiController constructor.\n+     *\n+     * @param MediaModel $mediaModel\n+     */\n+    public function __construct(MediaModel $mediaModel) {\n+        $this->mediaModel = $mediaModel;\n+    }\n+\n+    /**\n+     * Delete a media item by ID.\n+     *\n+     * @param $id The media item's numeric ID.\n+     */\n+    public function delete($id) {\n+        $this->permission('Garden.SignIn.Allow');\n+\n+        $in = $this->idParamSchema()->setDescription('Delete a media item.');\n+        $out = $this->schema($this->fullSchema(), 'out');\n+\n+        $row = $this->mediaByID($id);\n+        if ($row['InsertUserID'] !== $this->getSession()->UserID) {\n+            $this->permission('Garden.Moderation.Manage');\n+        }\n+\n+        $this->mediaModel->deleteID($id);\n+    }\n+\n+    /**\n+     * Delete a media item by its URL.\n+     *\n+     * @param array $query The request query.\n+     */\n+    public function delete_byUrl(array $query) {\n+        $this->permission('Garden.SignIn.Allow');\n+\n+        $in = $this->schema(['url:s' => 'Full URL to the item.'], 'in')->setDescription('Delete a media item, using its URL.');\n+        $out = $this->schema([], 'out');\n+\n+        $in->validate($query);\n+\n+        $row = $this->mediaByUrl($query['url']);\n+        if ($row['InsertUserID'] !== $this->getSession()->UserID) {\n+            $this->permission('Garden.Moderation.Manage');\n+        }\n+\n+        $this->mediaModel->deleteID($row['MediaID']);\n+    }\n+\n+    /**\n+     * Process a user upload and insert into the media table.\n+     *\n+     * @param UploadedFile $upload An object representing an uploaded file.\n+     * @param string $type The upload type (e.g. \"image\").\n+     * @throws Exception if there was an error encountered when saving the upload.\n+     * @return array\n+     */\n+    private function doUpload(UploadedFile $upload, $type) {\n+        $file = $upload->getFile();\n+\n+        $media = [\n+            'Name' => $upload->getClientFilename(),\n+            'Type' => $upload->getClientMediaType(),\n+            'Size' => $upload->getSize(),\n+            'ForeignID' => $this->getSession()->UserID,\n+            'ForeignTable' => 'embed'\n+        ];\n+\n+        switch ($type) {\n+            case 'image':\n+                $imageSize = getimagesize($file);\n+                if (is_array($imageSize)) {\n+                    $media['ImageWidth'] = $imageSize[0];\n+                    $media['ImageHeight'] = $imageSize[1];\n+                }\n+        }\n+\n+        $ext = pathinfo(strtolower($upload->getClientFilename()), PATHINFO_EXTENSION);\n+        $destination = $this->generateUploadPath($ext, true);\n+        $uploadResult = $this->saveUpload($upload, $destination);\n+        $media['Path'] = $uploadResult['SaveName'];\n+\n+        $id = $this->mediaModel->save($media);\n+        $this->validateModel($this->mediaModel);\n+\n+        $result = $this->mediaByID($id);\n+        return $result;\n+    }\n+\n+    /**\n+     * Get a schema instance comprised of all available media fields.\n+     *\n+     * @return Schema\n+     */\n+    protected function fullSchema() {\n+        $schema = Schema::parse([\n+            'mediaID:i' => 'The ID of the record.',\n+            'url:s' => 'The URL of the file.',\n+            'name:s' => 'The original filename of the upload.',\n+            'type:s' => 'MIME type',\n+            'size:i' =>'File size in bytes',\n+            'width:i|n' => 'Image width',\n+            'height:i|n' => 'Image height',\n+            'dateInserted:dt' => 'When the media item was created.',\n+            'insertUserID:i' => 'The user that created the media item.',\n+            'foreignType:s|n' => 'Table the media is linked to.',\n+            'foreignID:i|n' => 'The ID of the table.'\n+        ]);\n+        return $schema;\n+    }\n+\n+    /**\n+     * Get a media item's information by ID.\n+     *\n+     * @param int $id The media item's numeric ID.\n+     * @return array\n+     * @throws NotFoundException if the media item could not be found.\n+     */\n+    public function get($id) {\n+        $this->permission('Garden.SignIn.Allow');\n+\n+        $in = $this->idParamSchema()->setDescription('Get a media item.');\n+        $out = $this->schema($this->fullSchema(), 'out');\n+\n+        $row = $this->mediaByID($id);\n+        if ($row['InsertUserID'] !== $this->getSession()->UserID) {\n+            $this->permission('Garden.Moderation.Manage');\n+        }\n+\n+        $row = $this->normalizeOutput($row);\n+        $result = $out->validate($row);\n+        return $result;\n+    }\n+\n+    /**\n+     * Get a media item's information by its URL.\n+     *\n+     * @param $query The request query.\n+     * @return array\n+     * @throws NotFoundException if the media item could not be found.\n+     */\n+    public function get_byUrl(array $query) {\n+        $this->permission('Garden.SignIn.Allow');\n+\n+        $in = $this->schema(['url:s' => 'Full URL to the item.'], 'in')->setDescription('Get a media item, using its URL.');\n+        $out = $this->schema($this->fullSchema(), 'out');\n+\n+        $query = $in->validate($query);\n+\n+        $row = $this->mediaByUrl($query['url']);\n+        if ($row['InsertUserID'] !== $this->getSession()->UserID) {\n+            $this->permission('Garden.Moderation.Manage');\n+        }\n+\n+        $row = $this->normalizeOutput($row);\n+        $result = $out->validate($row);\n+        return $result;\n+    }\n+\n+    /**\n+     * Get an ID-only media record schema.\n+     *\n+     * @param string $type The type of schema.\n+     * @return Schema Returns a schema object.\n+     */\n+    public function idParamSchema($type = 'in') {\n+        if ($this->idParamSchema === null) {\n+            $this->idParamSchema = $this->schema(\n+                Schema::parse(['id:i' => 'The media ID.']),\n+                $type\n+            );\n+        }\n+        return $this->schema($this->idParamSchema, $type);\n+    }\n+\n+    /**\n+     * Get a media row by its numeric ID.\n+     *\n+     * @param int $id The media ID.\n+     * @throws NotFoundException if the media item could not be found.\n+     * @return array\n+     */\n+    public function mediaByID($id) {\n+        $row = $this->mediaModel->getID($id, DATASET_TYPE_ARRAY);\n+        if (!$row) {\n+            throw new NotFoundException('Media');\n+        }\n+        return $row;\n+    }\n+\n+    /**\n+     * Get a media row by its full URL.\n+     *\n+     * @param string $url The full media URL.\n+     * @throws NotFoundException if the media item could not be found.\n+     * @return array\n+     */\n+    public function mediaByUrl($url) {\n+        $uploadPaths = Gdn_Upload::urls();\n+\n+        $testPaths = [];\n+        foreach ($uploadPaths as $type => $urlPrefix) {\n+            if (stringBeginsWith($url, $urlPrefix)) {\n+                $path = trim(stringBeginsWith($url, $urlPrefix, true, true), '\\\\/');\n+                if (!empty($type)) {\n+                    $path = \"$type/$path\";\n+                }\n+                $testPaths[] = $path;\n+            }\n+        }\n+\n+        if (empty($testPaths)) {\n+            throw new NotFoundException('Media');\n+        }\n+\n+        // Any matches?.\n+        $row = $this->mediaModel->getWhere(\n+            ['Path' => $testPaths],\n+            '',\n+            'asc',\n+            1\n+        )->firstRow(DATASET_TYPE_ARRAY);\n+\n+        // Couldn't find a match.\n+        if (empty($row)) {\n+            throw new NotFoundException('Media');\n+        }\n+\n+        return $row;\n+    }\n+\n+    /**\n+     * Normalize a database record to match the Schema definition.\n+     *\n+     * @param array $row Database record.\n+     * @return array Return a record, normalized for output.\n+     */\n+    public function normalizeOutput(array $row) {\n+        $row['foreignID'] = $row['ForeignID'] ?? null;\n+        $row['foreignType'] = $row['ForeignTable'] ?? null;\n+        $row['height'] = $row['ImageHeight'] ?? null;\n+        $row['width'] = $row['ImageWidth'] ?? null;\n+\n+        if (array_key_exists('Path', $row)) {\n+            $parsed = Gdn_Upload::parse($row['Path']);\n+            $row['url'] = $parsed['Url'];\n+        } else {\n+            $row['url'] = null;\n+        }\n+\n+        $schemaRecord = ApiUtils::convertOutputKeys($row);\n+        return $schemaRecord;\n+    }\n+\n+    /**\n+     * Upload a file and store it in GDN_Media against the current user with \"embed\" as the table.\n+     * Return information from the media row along with a full URL to the file.\n+     *\n+     * @param array $body The request body.\n+     * @return array\n+     */\n+    public function post(array $body) {\n+        $this->permission('Garden.SignIn.Allow');\n+\n+        $uploadSchema = new UploadedFileSchema([\n+            'allowedExtensions' => array_values(ImageResizer::getTypeExt())\n+        ]);\n+\n+        $in = $this->schema([\n+            'file' => $uploadSchema,\n+            'type:s' => [\n+                'description' => 'The upload type.',","path":"applications/dashboard/controllers/api/MediaController.php","position":296,"original_position":296,"commit_id":"3604c1d1406a3605d9c4208be7eb8df718a3d28a","original_commit_id":"3604c1d1406a3605d9c4208be7eb8df718a3d28a","user":{"login":"DaazKu","id":2412909,"avatar_url":"https://avatars0.githubusercontent.com/u/2412909?v=4","gravatar_id":"","url":"https://api.github.com/users/DaazKu","html_url":"https://github.com/DaazKu","followers_url":"https://api.github.com/users/DaazKu/followers","following_url":"https://api.github.com/users/DaazKu/following{/other_user}","gists_url":"https://api.github.com/users/DaazKu/gists{/gist_id}","starred_url":"https://api.github.com/users/DaazKu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaazKu/subscriptions","organizations_url":"https://api.github.com/users/DaazKu/orgs","repos_url":"https://api.github.com/users/DaazKu/repos","events_url":"https://api.github.com/users/DaazKu/events{/privacy}","received_events_url":"https://api.github.com/users/DaazKu/received_events","type":"User","site_admin":false},"body":"It's actually the MIME type","created_at":"2018-02-07T16:34:31Z","updated_at":"2018-02-07T16:34:31Z","html_url":"https://github.com/vanilla/vanilla/pull/6581#discussion_r166675647","pull_request_url":"https://api.github.com/repos/vanilla/vanilla/pulls/6581","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/166675647"},"html":{"href":"https://github.com/vanilla/vanilla/pull/6581#discussion_r166675647"},"pull_request":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/6581"}}},"pull_request":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/6581","id":167526279,"html_url":"https://github.com/vanilla/vanilla/pull/6581","diff_url":"https://github.com/vanilla/vanilla/pull/6581.diff","patch_url":"https://github.com/vanilla/vanilla/pull/6581.patch","issue_url":"https://api.github.com/repos/vanilla/vanilla/issues/6581","number":6581,"state":"open","locked":false,"title":"Add file uploads to media endpoint","user":{"login":"initvector","id":1390241,"avatar_url":"https://avatars0.githubusercontent.com/u/1390241?v=4","gravatar_id":"","url":"https://api.github.com/users/initvector","html_url":"https://github.com/initvector","followers_url":"https://api.github.com/users/initvector/followers","following_url":"https://api.github.com/users/initvector/following{/other_user}","gists_url":"https://api.github.com/users/initvector/gists{/gist_id}","starred_url":"https://api.github.com/users/initvector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/initvector/subscriptions","organizations_url":"https://api.github.com/users/initvector/orgs","repos_url":"https://api.github.com/users/initvector/repos","events_url":"https://api.github.com/users/initvector/events{/privacy}","received_events_url":"https://api.github.com/users/initvector/received_events","type":"User","site_admin":false},"body":"This update adds file uploading and querying to the media endpoint. The spec for this endpoint can be found here: [File Uploads](https://github.com/vanilla/roadmap/blob/master/rich-editor/implementation.md#file-uploads)\r\n\r\nCloses #6510","created_at":"2018-02-06T20:52:03Z","updated_at":"2018-02-07T16:34:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80ff1fd2d71e880840e685a0ef2f176b3d06d27a","assignee":{"login":"DaazKu","id":2412909,"avatar_url":"https://avatars0.githubusercontent.com/u/2412909?v=4","gravatar_id":"","url":"https://api.github.com/users/DaazKu","html_url":"https://github.com/DaazKu","followers_url":"https://api.github.com/users/DaazKu/followers","following_url":"https://api.github.com/users/DaazKu/following{/other_user}","gists_url":"https://api.github.com/users/DaazKu/gists{/gist_id}","starred_url":"https://api.github.com/users/DaazKu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaazKu/subscriptions","organizations_url":"https://api.github.com/users/DaazKu/orgs","repos_url":"https://api.github.com/users/DaazKu/repos","events_url":"https://api.github.com/users/DaazKu/events{/privacy}","received_events_url":"https://api.github.com/users/DaazKu/received_events","type":"User","site_admin":false},"assignees":[{"login":"DaazKu","id":2412909,"avatar_url":"https://avatars0.githubusercontent.com/u/2412909?v=4","gravatar_id":"","url":"https://api.github.com/users/DaazKu","html_url":"https://github.com/DaazKu","followers_url":"https://api.github.com/users/DaazKu/followers","following_url":"https://api.github.com/users/DaazKu/following{/other_user}","gists_url":"https://api.github.com/users/DaazKu/gists{/gist_id}","starred_url":"https://api.github.com/users/DaazKu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaazKu/subscriptions","organizations_url":"https://api.github.com/users/DaazKu/orgs","repos_url":"https://api.github.com/users/DaazKu/repos","events_url":"https://api.github.com/users/DaazKu/events{/privacy}","received_events_url":"https://api.github.com/users/DaazKu/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":{"url":"https://api.github.com/repos/vanilla/vanilla/milestones/72","html_url":"https://github.com/vanilla/vanilla/milestone/72","labels_url":"https://api.github.com/repos/vanilla/vanilla/milestones/72/labels","id":3064034,"number":72,"title":"2018-02-07","description":"","creator":{"login":"linc","id":117672,"avatar_url":"https://avatars1.githubusercontent.com/u/117672?v=4","gravatar_id":"","url":"https://api.github.com/users/linc","html_url":"https://github.com/linc","followers_url":"https://api.github.com/users/linc/followers","following_url":"https://api.github.com/users/linc/following{/other_user}","gists_url":"https://api.github.com/users/linc/gists{/gist_id}","starred_url":"https://api.github.com/users/linc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linc/subscriptions","organizations_url":"https://api.github.com/users/linc/orgs","repos_url":"https://api.github.com/users/linc/repos","events_url":"https://api.github.com/users/linc/events{/privacy}","received_events_url":"https://api.github.com/users/linc/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":43,"state":"open","created_at":"2018-01-25T15:20:19Z","updated_at":"2018-02-07T16:22:31Z","due_on":"2018-02-07T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/vanilla/vanilla/pulls/6581/commits","review_comments_url":"https://api.github.com/repos/vanilla/vanilla/pulls/6581/comments","review_comment_url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vanilla/vanilla/issues/6581/comments","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/3604c1d1406a3605d9c4208be7eb8df718a3d28a","head":{"label":"vanilla:feature/media-api-file","ref":"feature/media-api-file","sha":"3604c1d1406a3605d9c4208be7eb8df718a3d28a","user":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2018-02-07T12:55:40Z","pushed_at":"2018-02-07T16:22:32Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":58790,"stargazers_count":1778,"watchers_count":1778,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":626,"mirror_url":null,"archived":false,"open_issues_count":475,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":626,"open_issues":475,"watchers":1778,"default_branch":"master"}},"base":{"label":"vanilla:master","ref":"master","sha":"d374575879e45bdd7c1cdd2b3a32d29d92efe2f5","user":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2018-02-07T12:55:40Z","pushed_at":"2018-02-07T16:22:32Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":58790,"stargazers_count":1778,"watchers_count":1778,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":626,"mirror_url":null,"archived":false,"open_issues_count":475,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":626,"open_issues":475,"watchers":1778,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/6581"},"html":{"href":"https://github.com/vanilla/vanilla/pull/6581"},"issue":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/6581"},"comments":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/6581/comments"},"review_comments":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/6581/comments"},"review_comment":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/6581/commits"},"statuses":{"href":"https://api.github.com/repos/vanilla/vanilla/statuses/3604c1d1406a3605d9c4208be7eb8df718a3d28a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"DaazKu"}}