{"action":"created","comment":{"url":"https://api.github.com/repos/dit-rohm/textbook/pulls/comments/45604424","id":45604424,"diff_hunk":"@@ -0,0 +1,354 @@\n+# 新規登録のエラーチェック\n+\n+本稿では、新規登録の機能にエラーチェックを追加します。新規登録のフォームには、プレースホルダーで\"3文字以上15文字以下\"のように書かれていますが、実際にそのチェックをしていませんでした。要求されている条件に合わないの文字数などで新規登録をしてみてください。エラーなく登録が出来てしまいますね。これを直していきましょう。\n+\n+## 完成図\n+\n+![errorCheck](./gif/errorCheck.gif)\n+\n+ほとんど見た目は変わりません。条件に合わない場合は登録が失敗するようにし、それぞれのエラーの内容を表示するようにします。\n+\n+## 実装手順\n+\n+1. エラーチェックの追加（PHP）\n+1. エラーを表示させる（HTML, PHP）\n+\n+## 1. エラーチェックの追加（PHP）\n+\n+ユーザが入力した情報をDBに登録する前に、条件に合っているかチェックするためのif文を追加します。**もし文字数が〇〇以上だったら登録OK、以下だったらエラー**という風に書いていきます。`signup.php`を書き換えましょう。大きく書き換えがあるので、気をつけて下さい。また、新たな関数を`functions.php`に追加します。\n+\n+### コード\n+\n+#### signup.php\n+\n+```php\n+\n+<?php\n+require_once 'init.php';\n+\n+// 以下を追記\n+// 変数の初期化\n+$error = [];\n+$user_name = '';\n+$screen_name = '';\n+$email = '';\n+$password = '';\n+$comment = '';\n+\n+if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n+  \n+  // ここにあったif文を削除\n+\n+  $user_name = $_POST['user_name'];\n+  $screen_name = $_POST['screen_name'];\n+  $email = $_POST['email'];\n+  $password = $_POST['password'];\n+  $comment = $_POST['comment'];\n+\n+  $db = connectDb();\n+\n+  // 以下を追記\n+\n+  // ユーザ名の文字数チェック\n+  if (mb_strlen($user_name) < 3 || mb_strlen($user_name) > 15) {\n+    $error['user_name'] = '3文字以上15文字以下にしてください';\n+  }\n+  // スクリーン名の文字数チェック\n+  if (strlen($screen_name) < 3 || strlen($screen_name) > 15) {\n+    $error['screen_name'] = '3文字以上15文字以下にしてください';\n+  // スクリーン名は英数字になっているかチェック\n+  } elseif (!preg_match('/^[a-zA-Z0-9]+$/', $screen_name)) {\n+    $error['screen_name'] = '英数字にしてください';\n+  // スクリーン名が既に登録されているかどうかチェック\n+  } elseif (getUserIdByScreenName($db, $screen_name)) {\n+    $error['screen_name'] = 'このidは既に登録されています';\n+  }\n+  // メールアドレスが入力されているかどうかチェック \n+  if ($email === '') {\n+    $error['email'] = 'メールアドレスを入力してください';\n+  // メールアドレスの形式が正しいかどうかチェック \n+  } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n+    $error['email'] = 'メールアドレスの形式が正しくないです';\n+  // メールアドレスが既に登録されているかどうかチェック\n+  } elseif (emailExists($email, $db)) {\n+    $error['email'] = 'このメールアドレスは既に登録されています';\n+  }\n+  // パスワードが英数字になっているかチェック\n+  if (!preg_match('/^[a-zA-Z0-9]+$/', $password)) {\n+    $error['password'] = '英数字にしてください';\n+  // パスワードの文字数チェック\n+  } elseif (strlen($password) < 4 || strlen($password) > 8) {\n+    $error['password'] = 'パスワードは4文字以上8文字以下にしてください';\n+  }\n+  // コメントの文字数チェック\n+  if (mb_strlen($comment) > 150) {\n+    $error['comment'] = '150文字以下にしてください';\n+  // エラーがなければデータベースに挿入する\n+  } elseif (empty($error)) {\n+  \n+    // 以下はそのまま \n+    \n+    $hash = password_hash($password, PASSWORD_DEFAULT);\n+    $sql = 'INSERT INTO users (screen_name, user_name, email, password, comment) VALUES (:screen_name, :user_name, :email, :password, :comment)';\n+    $statement = $db->prepare($sql);\n+\n+    $statement->bindValue(':screen_name', $screen_name, PDO::PARAM_STR);\n+    $statement->bindValue(':user_name', $user_name, PDO::PARAM_STR);\n+    $statement->bindValue(':email', $email, PDO::PARAM_STR);\n+    $statement->bindValue(':password', $hash, PDO::PARAM_STR);\n+    $statement->bindValue(':comment', $comment, PDO::PARAM_STR);\n+\n+    if($statement->execute()) {\n+      $signin_url = \"signin.php\";\n+      header(\"Location: {$signin_url}\");\n+      exit;\n+    } else {\n+      print \"データベースへの挿入に失敗しました\";\n+    }\n+  }\n+}\n+\n+?>\n+```\n+\n+#### functions.php\n+\n+```php\n+function emailExists($email, PDO $pdo)\n+{\n+  $sql = 'SELECT * FROM users WHERE email = :email';\n+  $statement = $pdo->prepare($sql);\n+  $statement->bindValue(':email', $email, PDO::PARAM_STR);\n+  $statement->execute();\n+  $row = $statement->fetch();\n+  return $row ? true : false;\n+}\n+```\n+\n+### コードの解説\n+\n+追加した条件を見ていきましょう。エラーがなければDBに保存、エラーがあれば`$error`という配列にエラーの内容を代入しておきます。\n+\n+#### ユーザ名のエラーチェック\n+\n+1点をチェックします。\n+\n+* 文字数が3文字以上15文字以下であること\n+\n+```php\n+// ユーザ名の文字数チェック\n+if (mb_strlen($user_name) < 3 || mb_strlen($user_name) > 15) {\n+  $error['user_name'] = '3文字以上15文字以下にしてください';\n+}\n+```\n+\n+[mb_strlen](http://php.net/manual/ja/function.mb-strlen.php)は、マルチバイト文字の1文字を1として、文字列の長さを得るための関数です。マルチバイト文字とは、2バイト以上のデータで表現される文字のことで、ひらがなや漢字などの全角文字は多バイト文字となるので、この関数はひらがなや漢字1文字を1として数えます。ここでは、`$user_name`の長さを取得し、3文字より小さく、15文字より大きければエラーとなり、**3文字以上15文字以下にしてください**という文を`$error['user_name']`に保存します。\n+\n+#### スクリーン名のエラーチェック\n+\n+3点をチェックします。","path":"autumn/errorCheck/errorCheck.md","position":149,"original_position":149,"commit_id":"5a0a47847c6aeb8e83e2b6c4ab6168f7f5099603","original_commit_id":"5a0a47847c6aeb8e83e2b6c4ab6168f7f5099603","user":{"login":"Tamrin007","id":10954404,"avatar_url":"https://avatars.githubusercontent.com/u/10954404?v=3","gravatar_id":"","url":"https://api.github.com/users/Tamrin007","html_url":"https://github.com/Tamrin007","followers_url":"https://api.github.com/users/Tamrin007/followers","following_url":"https://api.github.com/users/Tamrin007/following{/other_user}","gists_url":"https://api.github.com/users/Tamrin007/gists{/gist_id}","starred_url":"https://api.github.com/users/Tamrin007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tamrin007/subscriptions","organizations_url":"https://api.github.com/users/Tamrin007/orgs","repos_url":"https://api.github.com/users/Tamrin007/repos","events_url":"https://api.github.com/users/Tamrin007/events{/privacy}","received_events_url":"https://api.github.com/users/Tamrin007/received_events","type":"User","site_admin":false},"body":"「以下の3点を…」の方が自然かと","created_at":"2015-11-23T13:53:30Z","updated_at":"2015-11-23T13:53:30Z","html_url":"https://github.com/dit-rohm/textbook/pull/160#discussion_r45604424","pull_request_url":"https://api.github.com/repos/dit-rohm/textbook/pulls/160","_links":{"self":{"href":"https://api.github.com/repos/dit-rohm/textbook/pulls/comments/45604424"},"html":{"href":"https://github.com/dit-rohm/textbook/pull/160#discussion_r45604424"},"pull_request":{"href":"https://api.github.com/repos/dit-rohm/textbook/pulls/160"}}},"pull_request":{"url":"https://api.github.com/repos/dit-rohm/textbook/pulls/160","id":51430351,"html_url":"https://github.com/dit-rohm/textbook/pull/160","diff_url":"https://github.com/dit-rohm/textbook/pull/160.diff","patch_url":"https://github.com/dit-rohm/textbook/pull/160.patch","issue_url":"https://api.github.com/repos/dit-rohm/textbook/issues/160","number":160,"state":"open","locked":false,"title":"新規登録のエラーチェック","user":{"login":"chikam","id":8417896,"avatar_url":"https://avatars.githubusercontent.com/u/8417896?v=3","gravatar_id":"","url":"https://api.github.com/users/chikam","html_url":"https://github.com/chikam","followers_url":"https://api.github.com/users/chikam/followers","following_url":"https://api.github.com/users/chikam/following{/other_user}","gists_url":"https://api.github.com/users/chikam/gists{/gist_id}","starred_url":"https://api.github.com/users/chikam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikam/subscriptions","organizations_url":"https://api.github.com/users/chikam/orgs","repos_url":"https://api.github.com/users/chikam/repos","events_url":"https://api.github.com/users/chikam/events{/privacy}","received_events_url":"https://api.github.com/users/chikam/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-21T02:06:28Z","updated_at":"2015-11-23T13:53:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a4a22d377ec581108194990f6e67bdf1a392384","assignee":{"login":"chikam","id":8417896,"avatar_url":"https://avatars.githubusercontent.com/u/8417896?v=3","gravatar_id":"","url":"https://api.github.com/users/chikam","html_url":"https://github.com/chikam","followers_url":"https://api.github.com/users/chikam/followers","following_url":"https://api.github.com/users/chikam/following{/other_user}","gists_url":"https://api.github.com/users/chikam/gists{/gist_id}","starred_url":"https://api.github.com/users/chikam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikam/subscriptions","organizations_url":"https://api.github.com/users/chikam/orgs","repos_url":"https://api.github.com/users/chikam/repos","events_url":"https://api.github.com/users/chikam/events{/privacy}","received_events_url":"https://api.github.com/users/chikam/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dit-rohm/textbook/milestones/6","html_url":"https://github.com/dit-rohm/textbook/milestones/11/24%EF%BC%88%E7%81%AB%EF%BC%89%E5%8B%89%E5%BC%B7%E4%BC%9A%E3%81%BE%E3%81%A7","labels_url":"https://api.github.com/repos/dit-rohm/textbook/milestones/6/labels","id":1393321,"number":6,"title":"11/24（火）勉強会まで","description":"新規登録時のエラーチェック（ちい）","creator":{"login":"mikoim","id":3958340,"avatar_url":"https://avatars.githubusercontent.com/u/3958340?v=3","gravatar_id":"","url":"https://api.github.com/users/mikoim","html_url":"https://github.com/mikoim","followers_url":"https://api.github.com/users/mikoim/followers","following_url":"https://api.github.com/users/mikoim/following{/other_user}","gists_url":"https://api.github.com/users/mikoim/gists{/gist_id}","starred_url":"https://api.github.com/users/mikoim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikoim/subscriptions","organizations_url":"https://api.github.com/users/mikoim/orgs","repos_url":"https://api.github.com/users/mikoim/repos","events_url":"https://api.github.com/users/mikoim/events{/privacy}","received_events_url":"https://api.github.com/users/mikoim/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-11-04T10:25:19Z","updated_at":"2015-11-21T02:16:15Z","due_on":"2015-11-23T15:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/dit-rohm/textbook/pulls/160/commits","review_comments_url":"https://api.github.com/repos/dit-rohm/textbook/pulls/160/comments","review_comment_url":"https://api.github.com/repos/dit-rohm/textbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dit-rohm/textbook/issues/160/comments","statuses_url":"https://api.github.com/repos/dit-rohm/textbook/statuses/5a0a47847c6aeb8e83e2b6c4ab6168f7f5099603","head":{"label":"chikam:add/errorcheck","ref":"add/errorcheck","sha":"5a0a47847c6aeb8e83e2b6c4ab6168f7f5099603","user":{"login":"chikam","id":8417896,"avatar_url":"https://avatars.githubusercontent.com/u/8417896?v=3","gravatar_id":"","url":"https://api.github.com/users/chikam","html_url":"https://github.com/chikam","followers_url":"https://api.github.com/users/chikam/followers","following_url":"https://api.github.com/users/chikam/following{/other_user}","gists_url":"https://api.github.com/users/chikam/gists{/gist_id}","starred_url":"https://api.github.com/users/chikam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikam/subscriptions","organizations_url":"https://api.github.com/users/chikam/orgs","repos_url":"https://api.github.com/users/chikam/repos","events_url":"https://api.github.com/users/chikam/events{/privacy}","received_events_url":"https://api.github.com/users/chikam/received_events","type":"User","site_admin":false},"repo":{"id":36969722,"name":"textbook","full_name":"chikam/textbook","owner":{"login":"chikam","id":8417896,"avatar_url":"https://avatars.githubusercontent.com/u/8417896?v=3","gravatar_id":"","url":"https://api.github.com/users/chikam","html_url":"https://github.com/chikam","followers_url":"https://api.github.com/users/chikam/followers","following_url":"https://api.github.com/users/chikam/following{/other_user}","gists_url":"https://api.github.com/users/chikam/gists{/gist_id}","starred_url":"https://api.github.com/users/chikam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikam/subscriptions","organizations_url":"https://api.github.com/users/chikam/orgs","repos_url":"https://api.github.com/users/chikam/repos","events_url":"https://api.github.com/users/chikam/events{/privacy}","received_events_url":"https://api.github.com/users/chikam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chikam/textbook","description":"Web development tutorials for beginners","fork":true,"url":"https://api.github.com/repos/chikam/textbook","forks_url":"https://api.github.com/repos/chikam/textbook/forks","keys_url":"https://api.github.com/repos/chikam/textbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chikam/textbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chikam/textbook/teams","hooks_url":"https://api.github.com/repos/chikam/textbook/hooks","issue_events_url":"https://api.github.com/repos/chikam/textbook/issues/events{/number}","events_url":"https://api.github.com/repos/chikam/textbook/events","assignees_url":"https://api.github.com/repos/chikam/textbook/assignees{/user}","branches_url":"https://api.github.com/repos/chikam/textbook/branches{/branch}","tags_url":"https://api.github.com/repos/chikam/textbook/tags","blobs_url":"https://api.github.com/repos/chikam/textbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chikam/textbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chikam/textbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/chikam/textbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chikam/textbook/statuses/{sha}","languages_url":"https://api.github.com/repos/chikam/textbook/languages","stargazers_url":"https://api.github.com/repos/chikam/textbook/stargazers","contributors_url":"https://api.github.com/repos/chikam/textbook/contributors","subscribers_url":"https://api.github.com/repos/chikam/textbook/subscribers","subscription_url":"https://api.github.com/repos/chikam/textbook/subscription","commits_url":"https://api.github.com/repos/chikam/textbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/chikam/textbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/chikam/textbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/chikam/textbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/chikam/textbook/contents/{+path}","compare_url":"https://api.github.com/repos/chikam/textbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chikam/textbook/merges","archive_url":"https://api.github.com/repos/chikam/textbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chikam/textbook/downloads","issues_url":"https://api.github.com/repos/chikam/textbook/issues{/number}","pulls_url":"https://api.github.com/repos/chikam/textbook/pulls{/number}","milestones_url":"https://api.github.com/repos/chikam/textbook/milestones{/number}","notifications_url":"https://api.github.com/repos/chikam/textbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chikam/textbook/labels{/name}","releases_url":"https://api.github.com/repos/chikam/textbook/releases{/id}","created_at":"2015-06-06T06:15:11Z","updated_at":"2015-11-04T10:52:56Z","pushed_at":"2015-11-23T07:00:56Z","git_url":"git://github.com/chikam/textbook.git","ssh_url":"git@github.com:chikam/textbook.git","clone_url":"https://github.com/chikam/textbook.git","svn_url":"https://github.com/chikam/textbook","homepage":"","size":31621,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"dit-rohm:master","ref":"master","sha":"925fac4c0dbbbb969fd4a071dfb6bd55356add57","user":{"login":"dit-rohm","id":11853796,"avatar_url":"https://avatars.githubusercontent.com/u/11853796?v=3","gravatar_id":"","url":"https://api.github.com/users/dit-rohm","html_url":"https://github.com/dit-rohm","followers_url":"https://api.github.com/users/dit-rohm/followers","following_url":"https://api.github.com/users/dit-rohm/following{/other_user}","gists_url":"https://api.github.com/users/dit-rohm/gists{/gist_id}","starred_url":"https://api.github.com/users/dit-rohm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dit-rohm/subscriptions","organizations_url":"https://api.github.com/users/dit-rohm/orgs","repos_url":"https://api.github.com/users/dit-rohm/repos","events_url":"https://api.github.com/users/dit-rohm/events{/privacy}","received_events_url":"https://api.github.com/users/dit-rohm/received_events","type":"Organization","site_admin":false},"repo":{"id":34437006,"name":"textbook","full_name":"dit-rohm/textbook","owner":{"login":"dit-rohm","id":11853796,"avatar_url":"https://avatars.githubusercontent.com/u/11853796?v=3","gravatar_id":"","url":"https://api.github.com/users/dit-rohm","html_url":"https://github.com/dit-rohm","followers_url":"https://api.github.com/users/dit-rohm/followers","following_url":"https://api.github.com/users/dit-rohm/following{/other_user}","gists_url":"https://api.github.com/users/dit-rohm/gists{/gist_id}","starred_url":"https://api.github.com/users/dit-rohm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dit-rohm/subscriptions","organizations_url":"https://api.github.com/users/dit-rohm/orgs","repos_url":"https://api.github.com/users/dit-rohm/repos","events_url":"https://api.github.com/users/dit-rohm/events{/privacy}","received_events_url":"https://api.github.com/users/dit-rohm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dit-rohm/textbook","description":"Web development tutorials for beginners","fork":false,"url":"https://api.github.com/repos/dit-rohm/textbook","forks_url":"https://api.github.com/repos/dit-rohm/textbook/forks","keys_url":"https://api.github.com/repos/dit-rohm/textbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dit-rohm/textbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dit-rohm/textbook/teams","hooks_url":"https://api.github.com/repos/dit-rohm/textbook/hooks","issue_events_url":"https://api.github.com/repos/dit-rohm/textbook/issues/events{/number}","events_url":"https://api.github.com/repos/dit-rohm/textbook/events","assignees_url":"https://api.github.com/repos/dit-rohm/textbook/assignees{/user}","branches_url":"https://api.github.com/repos/dit-rohm/textbook/branches{/branch}","tags_url":"https://api.github.com/repos/dit-rohm/textbook/tags","blobs_url":"https://api.github.com/repos/dit-rohm/textbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dit-rohm/textbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dit-rohm/textbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/dit-rohm/textbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dit-rohm/textbook/statuses/{sha}","languages_url":"https://api.github.com/repos/dit-rohm/textbook/languages","stargazers_url":"https://api.github.com/repos/dit-rohm/textbook/stargazers","contributors_url":"https://api.github.com/repos/dit-rohm/textbook/contributors","subscribers_url":"https://api.github.com/repos/dit-rohm/textbook/subscribers","subscription_url":"https://api.github.com/repos/dit-rohm/textbook/subscription","commits_url":"https://api.github.com/repos/dit-rohm/textbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/dit-rohm/textbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/dit-rohm/textbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/dit-rohm/textbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/dit-rohm/textbook/contents/{+path}","compare_url":"https://api.github.com/repos/dit-rohm/textbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dit-rohm/textbook/merges","archive_url":"https://api.github.com/repos/dit-rohm/textbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dit-rohm/textbook/downloads","issues_url":"https://api.github.com/repos/dit-rohm/textbook/issues{/number}","pulls_url":"https://api.github.com/repos/dit-rohm/textbook/pulls{/number}","milestones_url":"https://api.github.com/repos/dit-rohm/textbook/milestones{/number}","notifications_url":"https://api.github.com/repos/dit-rohm/textbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dit-rohm/textbook/labels{/name}","releases_url":"https://api.github.com/repos/dit-rohm/textbook/releases{/id}","created_at":"2015-04-23T06:03:32Z","updated_at":"2015-10-28T10:20:32Z","pushed_at":"2015-11-23T07:00:57Z","git_url":"git://github.com/dit-rohm/textbook.git","ssh_url":"git@github.com:dit-rohm/textbook.git","clone_url":"https://github.com/dit-rohm/textbook.git","svn_url":"https://github.com/dit-rohm/textbook","homepage":"","size":32810,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dit-rohm/textbook/pulls/160"},"html":{"href":"https://github.com/dit-rohm/textbook/pull/160"},"issue":{"href":"https://api.github.com/repos/dit-rohm/textbook/issues/160"},"comments":{"href":"https://api.github.com/repos/dit-rohm/textbook/issues/160/comments"},"review_comments":{"href":"https://api.github.com/repos/dit-rohm/textbook/pulls/160/comments"},"review_comment":{"href":"https://api.github.com/repos/dit-rohm/textbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dit-rohm/textbook/pulls/160/commits"},"statuses":{"href":"https://api.github.com/repos/dit-rohm/textbook/statuses/5a0a47847c6aeb8e83e2b6c4ab6168f7f5099603"}}}}