{"action":"created","comment":{"url":"https://api.github.com/repos/fedordead/pet-detectr/pulls/comments/77438131","id":77438131,"diff_hunk":"@@ -0,0 +1,136 @@\n+<?php\n+\n+/**\n+*\n+*\n+*\n+* Posts Class\n+*\n+*\n+*\n+*/\n+class Posts\n+{\n+\n+    function __construct()\n+    {\n+        // Config\n+        include_once 'core/database.php';\n+\n+        // Connect to Database\n+        try {\n+            // Store database as db property of class\n+            $this->db = new PDO('mysql:host='.$servername.';dbname='.$dbname, $username, $password);\n+            // set the PDO error mode to exception\n+            $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n+            }\n+        catch(PDOException $e)\n+            {\n+            echo 'Connection failed: ' . $e->getMessage();\n+            }\n+    }\n+\n+    // Get All Posts\n+    function get_all() \n+    {\n+         // URL Parameters\n+        $url_params = $_GET;\n+\n+        // if URL parameters process query\n+        if($url_params){","path":"app/core/classes/class.Posts.inc.php","position":40,"original_position":40,"commit_id":"3c00f0566b20ac8c111b6ca05e9098d32ff5621d","original_commit_id":"3c00f0566b20ac8c111b6ca05e9098d32ff5621d","user":{"login":"DaveOrDead","id":1312905,"avatar_url":"https://avatars.githubusercontent.com/u/1312905?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveOrDead","html_url":"https://github.com/DaveOrDead","followers_url":"https://api.github.com/users/DaveOrDead/followers","following_url":"https://api.github.com/users/DaveOrDead/following{/other_user}","gists_url":"https://api.github.com/users/DaveOrDead/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveOrDead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveOrDead/subscriptions","organizations_url":"https://api.github.com/users/DaveOrDead/orgs","repos_url":"https://api.github.com/users/DaveOrDead/repos","events_url":"https://api.github.com/users/DaveOrDead/events{/privacy}","received_events_url":"https://api.github.com/users/DaveOrDead/received_events","type":"User","site_admin":false},"body":"Again with the { feels like we should decide on one convention","created_at":"2016-09-03T15:21:51Z","updated_at":"2016-09-03T15:21:51Z","html_url":"https://github.com/fedordead/pet-detectr/pull/35#discussion_r77438131","pull_request_url":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/fedordead/pet-detectr/pulls/comments/77438131"},"html":{"href":"https://github.com/fedordead/pet-detectr/pull/35#discussion_r77438131"},"pull_request":{"href":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35","id":83895867,"html_url":"https://github.com/fedordead/pet-detectr/pull/35","diff_url":"https://github.com/fedordead/pet-detectr/pull/35.diff","patch_url":"https://github.com/fedordead/pet-detectr/pull/35.patch","issue_url":"https://api.github.com/repos/fedordead/pet-detectr/issues/35","number":35,"state":"open","locked":false,"title":"Initial move to MySQL","user":{"login":"55sketch","id":7382191,"avatar_url":"https://avatars.githubusercontent.com/u/7382191?v=3","gravatar_id":"","url":"https://api.github.com/users/55sketch","html_url":"https://github.com/55sketch","followers_url":"https://api.github.com/users/55sketch/followers","following_url":"https://api.github.com/users/55sketch/following{/other_user}","gists_url":"https://api.github.com/users/55sketch/gists{/gist_id}","starred_url":"https://api.github.com/users/55sketch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/55sketch/subscriptions","organizations_url":"https://api.github.com/users/55sketch/orgs","repos_url":"https://api.github.com/users/55sketch/repos","events_url":"https://api.github.com/users/55sketch/events{/privacy}","received_events_url":"https://api.github.com/users/55sketch/received_events","type":"User","site_admin":false},"body":"Moved existing data and functionality from Firebase to MySQL. Database\ndetails are in database.php - if these need to change for your\nenvironment add that file to .gitignore. Seed data is at\nhttps://www.dropbox.com/s/tq0spualzrmhpz9/seed_data.sql?dl=0","created_at":"2016-09-03T13:37:05Z","updated_at":"2016-09-03T15:21:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9410372587ee8114743274f602686b8f4eeb82ab","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35/commits","review_comments_url":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35/comments","review_comment_url":"https://api.github.com/repos/fedordead/pet-detectr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fedordead/pet-detectr/issues/35/comments","statuses_url":"https://api.github.com/repos/fedordead/pet-detectr/statuses/3c00f0566b20ac8c111b6ca05e9098d32ff5621d","head":{"label":"fedordead:mysql","ref":"mysql","sha":"3c00f0566b20ac8c111b6ca05e9098d32ff5621d","user":{"login":"fedordead","id":16823663,"avatar_url":"https://avatars.githubusercontent.com/u/16823663?v=3","gravatar_id":"","url":"https://api.github.com/users/fedordead","html_url":"https://github.com/fedordead","followers_url":"https://api.github.com/users/fedordead/followers","following_url":"https://api.github.com/users/fedordead/following{/other_user}","gists_url":"https://api.github.com/users/fedordead/gists{/gist_id}","starred_url":"https://api.github.com/users/fedordead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedordead/subscriptions","organizations_url":"https://api.github.com/users/fedordead/orgs","repos_url":"https://api.github.com/users/fedordead/repos","events_url":"https://api.github.com/users/fedordead/events{/privacy}","received_events_url":"https://api.github.com/users/fedordead/received_events","type":"Organization","site_admin":false},"repo":{"id":58798436,"name":"pet-detectr","full_name":"fedordead/pet-detectr","owner":{"login":"fedordead","id":16823663,"avatar_url":"https://avatars.githubusercontent.com/u/16823663?v=3","gravatar_id":"","url":"https://api.github.com/users/fedordead","html_url":"https://github.com/fedordead","followers_url":"https://api.github.com/users/fedordead/followers","following_url":"https://api.github.com/users/fedordead/following{/other_user}","gists_url":"https://api.github.com/users/fedordead/gists{/gist_id}","starred_url":"https://api.github.com/users/fedordead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedordead/subscriptions","organizations_url":"https://api.github.com/users/fedordead/orgs","repos_url":"https://api.github.com/users/fedordead/repos","events_url":"https://api.github.com/users/fedordead/events{/privacy}","received_events_url":"https://api.github.com/users/fedordead/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedordead/pet-detectr","description":"Repo for pet finder web app","fork":false,"url":"https://api.github.com/repos/fedordead/pet-detectr","forks_url":"https://api.github.com/repos/fedordead/pet-detectr/forks","keys_url":"https://api.github.com/repos/fedordead/pet-detectr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedordead/pet-detectr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedordead/pet-detectr/teams","hooks_url":"https://api.github.com/repos/fedordead/pet-detectr/hooks","issue_events_url":"https://api.github.com/repos/fedordead/pet-detectr/issues/events{/number}","events_url":"https://api.github.com/repos/fedordead/pet-detectr/events","assignees_url":"https://api.github.com/repos/fedordead/pet-detectr/assignees{/user}","branches_url":"https://api.github.com/repos/fedordead/pet-detectr/branches{/branch}","tags_url":"https://api.github.com/repos/fedordead/pet-detectr/tags","blobs_url":"https://api.github.com/repos/fedordead/pet-detectr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedordead/pet-detectr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedordead/pet-detectr/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedordead/pet-detectr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedordead/pet-detectr/statuses/{sha}","languages_url":"https://api.github.com/repos/fedordead/pet-detectr/languages","stargazers_url":"https://api.github.com/repos/fedordead/pet-detectr/stargazers","contributors_url":"https://api.github.com/repos/fedordead/pet-detectr/contributors","subscribers_url":"https://api.github.com/repos/fedordead/pet-detectr/subscribers","subscription_url":"https://api.github.com/repos/fedordead/pet-detectr/subscription","commits_url":"https://api.github.com/repos/fedordead/pet-detectr/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedordead/pet-detectr/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedordead/pet-detectr/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedordead/pet-detectr/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedordead/pet-detectr/contents/{+path}","compare_url":"https://api.github.com/repos/fedordead/pet-detectr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedordead/pet-detectr/merges","archive_url":"https://api.github.com/repos/fedordead/pet-detectr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedordead/pet-detectr/downloads","issues_url":"https://api.github.com/repos/fedordead/pet-detectr/issues{/number}","pulls_url":"https://api.github.com/repos/fedordead/pet-detectr/pulls{/number}","milestones_url":"https://api.github.com/repos/fedordead/pet-detectr/milestones{/number}","notifications_url":"https://api.github.com/repos/fedordead/pet-detectr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedordead/pet-detectr/labels{/name}","releases_url":"https://api.github.com/repos/fedordead/pet-detectr/releases{/id}","deployments_url":"https://api.github.com/repos/fedordead/pet-detectr/deployments","created_at":"2016-05-14T08:47:32Z","updated_at":"2016-05-14T20:55:43Z","pushed_at":"2016-09-03T13:37:05Z","git_url":"git://github.com/fedordead/pet-detectr.git","ssh_url":"git@github.com:fedordead/pet-detectr.git","clone_url":"https://github.com/fedordead/pet-detectr.git","svn_url":"https://github.com/fedordead/pet-detectr","homepage":null,"size":131,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"fedordead:master","ref":"master","sha":"4265b840f422f085e19f76a4ae021f78dd4c4e9a","user":{"login":"fedordead","id":16823663,"avatar_url":"https://avatars.githubusercontent.com/u/16823663?v=3","gravatar_id":"","url":"https://api.github.com/users/fedordead","html_url":"https://github.com/fedordead","followers_url":"https://api.github.com/users/fedordead/followers","following_url":"https://api.github.com/users/fedordead/following{/other_user}","gists_url":"https://api.github.com/users/fedordead/gists{/gist_id}","starred_url":"https://api.github.com/users/fedordead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedordead/subscriptions","organizations_url":"https://api.github.com/users/fedordead/orgs","repos_url":"https://api.github.com/users/fedordead/repos","events_url":"https://api.github.com/users/fedordead/events{/privacy}","received_events_url":"https://api.github.com/users/fedordead/received_events","type":"Organization","site_admin":false},"repo":{"id":58798436,"name":"pet-detectr","full_name":"fedordead/pet-detectr","owner":{"login":"fedordead","id":16823663,"avatar_url":"https://avatars.githubusercontent.com/u/16823663?v=3","gravatar_id":"","url":"https://api.github.com/users/fedordead","html_url":"https://github.com/fedordead","followers_url":"https://api.github.com/users/fedordead/followers","following_url":"https://api.github.com/users/fedordead/following{/other_user}","gists_url":"https://api.github.com/users/fedordead/gists{/gist_id}","starred_url":"https://api.github.com/users/fedordead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedordead/subscriptions","organizations_url":"https://api.github.com/users/fedordead/orgs","repos_url":"https://api.github.com/users/fedordead/repos","events_url":"https://api.github.com/users/fedordead/events{/privacy}","received_events_url":"https://api.github.com/users/fedordead/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedordead/pet-detectr","description":"Repo for pet finder web app","fork":false,"url":"https://api.github.com/repos/fedordead/pet-detectr","forks_url":"https://api.github.com/repos/fedordead/pet-detectr/forks","keys_url":"https://api.github.com/repos/fedordead/pet-detectr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedordead/pet-detectr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedordead/pet-detectr/teams","hooks_url":"https://api.github.com/repos/fedordead/pet-detectr/hooks","issue_events_url":"https://api.github.com/repos/fedordead/pet-detectr/issues/events{/number}","events_url":"https://api.github.com/repos/fedordead/pet-detectr/events","assignees_url":"https://api.github.com/repos/fedordead/pet-detectr/assignees{/user}","branches_url":"https://api.github.com/repos/fedordead/pet-detectr/branches{/branch}","tags_url":"https://api.github.com/repos/fedordead/pet-detectr/tags","blobs_url":"https://api.github.com/repos/fedordead/pet-detectr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedordead/pet-detectr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedordead/pet-detectr/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedordead/pet-detectr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedordead/pet-detectr/statuses/{sha}","languages_url":"https://api.github.com/repos/fedordead/pet-detectr/languages","stargazers_url":"https://api.github.com/repos/fedordead/pet-detectr/stargazers","contributors_url":"https://api.github.com/repos/fedordead/pet-detectr/contributors","subscribers_url":"https://api.github.com/repos/fedordead/pet-detectr/subscribers","subscription_url":"https://api.github.com/repos/fedordead/pet-detectr/subscription","commits_url":"https://api.github.com/repos/fedordead/pet-detectr/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedordead/pet-detectr/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedordead/pet-detectr/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedordead/pet-detectr/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedordead/pet-detectr/contents/{+path}","compare_url":"https://api.github.com/repos/fedordead/pet-detectr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedordead/pet-detectr/merges","archive_url":"https://api.github.com/repos/fedordead/pet-detectr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedordead/pet-detectr/downloads","issues_url":"https://api.github.com/repos/fedordead/pet-detectr/issues{/number}","pulls_url":"https://api.github.com/repos/fedordead/pet-detectr/pulls{/number}","milestones_url":"https://api.github.com/repos/fedordead/pet-detectr/milestones{/number}","notifications_url":"https://api.github.com/repos/fedordead/pet-detectr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedordead/pet-detectr/labels{/name}","releases_url":"https://api.github.com/repos/fedordead/pet-detectr/releases{/id}","deployments_url":"https://api.github.com/repos/fedordead/pet-detectr/deployments","created_at":"2016-05-14T08:47:32Z","updated_at":"2016-05-14T20:55:43Z","pushed_at":"2016-09-03T13:37:05Z","git_url":"git://github.com/fedordead/pet-detectr.git","ssh_url":"git@github.com:fedordead/pet-detectr.git","clone_url":"https://github.com/fedordead/pet-detectr.git","svn_url":"https://github.com/fedordead/pet-detectr","homepage":null,"size":131,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35"},"html":{"href":"https://github.com/fedordead/pet-detectr/pull/35"},"issue":{"href":"https://api.github.com/repos/fedordead/pet-detectr/issues/35"},"comments":{"href":"https://api.github.com/repos/fedordead/pet-detectr/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/fedordead/pet-detectr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fedordead/pet-detectr/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/fedordead/pet-detectr/statuses/3c00f0566b20ac8c111b6ca05e9098d32ff5621d"}}}}
{"actor":{"display_login":"DaveOrDead"}}