{"action":"created","comment":{"url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/comments/48460692","id":48460692,"diff_hunk":"@@ -115,44 +146,126 @@ class AdminOperations {\n     }\n     \n     static func createSchool(school: School, completion: ((School) -> Void)?, failure: (String) -> Void){\n+        let params = [\"school\":\n+            [\n+                SchoolConstants.kName: school.name!,\n+                SchoolConstants.kLat: school.location!.coordinate.latitude,\n+                SchoolConstants.kLong: school.location!.coordinate.longitude,\n+                SchoolConstants.kAddress: school.address!,\n+                SchoolConstants.kDirectorID: school.director!.id\n+            ]\n+        ]\n+        \n         let manager = BaseOperation.manager()\n-        // TODO: make a network request\n+        \n+        manager.POST(StringConstants.kEndpointCreateSchool, parameters: params, success: { (operation, data) -> Void in\n+            let schoolDict = data[\"school\"] as! [String: AnyObject]\n+            let school = School(propertyDictionary: schoolDict)\n+            completion!(school)\n+            }) { (operation, error) -> Void in\n+                failure(error.localizedDescription)\n+        }\n     }\n     \n     static func editSchool(school: School, completion: ((School) -> Void)?, failure: (String) -> Void){\n         let manager = BaseOperation.manager()\n-        // TODO: make a network request\n+        \n+        let params = [\"school\": [\n+                SchoolConstants.kLat: school.location!.coordinate.latitude,\n+                SchoolConstants.kLong: school.location!.coordinate.longitude,\n+                SchoolConstants.kName: school.name!,\n+                SchoolConstants.kDirectorID: school.director!.id\n+            ]\n+        ]\n+        let schoolURLString = StringConstants.kSchoolAdminDetailURL(school.id)\n+        \n+        manager.PATCH(schoolURLString, parameters: params, success: { (operation, data) -> Void in\n+            completion!(school)\n+            }) { (operation, error) -> Void in\n+                failure(\"Could not edit school.\")\n+        }\n     }\n     \n     static func editAnnouncement(announcement: Announcement, completion: ((Announcement) -> Void)?, failure: (String) -> Void){\n         let manager = BaseOperation.manager()\n-        // TODO: make a network request\n+        let params = [\n+                AnnouncementConstants.kTitle: announcement.title!,\n+                AnnouncementConstants.kText: announcement.text!,\n+                AnnouncementConstants.kSchoolID: announcement.school!.id,\n+        ]\n+        let announcementURLString = StringConstants.kAnnouncementAdminDetailURL(announcement.id!)\n+        manager.PATCH(announcementURLString, parameters: params, success: { (operation, data) -> Void in\n+            completion!(announcement)\n+            }) { (operation, error) -> Void in\n+                failure(\"Could not edit announcement.\")\n+        }\n     }\n     \n     static func approveCheckin(checkin: Checkin, completion: (() -> Void)?, failure: (String) -> Void) {\n         let manager = BaseOperation.manager()\n-        // TODO: make a network request\n+        \n+        let checkinURLString = StringConstants.kCheckinAdminVerifyURL(checkin.id)\n+        \n+        manager.POST(checkinURLString, parameters: nil, success: { (operation, data) -> Void in\n+            completion?()\n+            }) { (operation, error) -> Void in\n+                failure(\"Could not approve checkin.\")\n+        }\n     }\n     \n     static func removeCheckin(checkin: Checkin, completion: (() -> Void)?, failure: (String) -> Void) {\n         let manager = BaseOperation.manager()\n-        // TODO: make a network request\n+        let checkinURLString = StringConstants.kCheckinAdminDetailURL(checkin.id)\n+        \n+        manager.DELETE(checkinURLString, parameters: nil, success: { (operation, data) -> Void in\n+            completion?()\n+            }) { (operation, error) -> Void in\n+                failure(\"Could not remove checkin.\")\n+        }\n+\n     }\n     \n     static func verifyUser(user: User, completion: (() -> Void)?, failure: (String) -> Void) {\n+        // TODO: fix, currently doesn't verify\n         let manager = BaseOperation.manager()\n-        // TODO: make a network request\n+\n+        let userURLString = StringConstants.kUserAdminVerifyURL(user.id)\n+        manager.POST(userURLString, parameters: nil, success: { (operation, data) -> Void in\n+            completion?()\n+            }) { (operation, error) -> Void in\n+                failure(\"Couldn't verify user.\")\n+        }\n     }\n     \n     static func removeUser(user: User, completion: (() -> Void)?, failure: (String) -> Void) {\n         let manager = BaseOperation.manager()\n-        // TODO: make a network request\n+        let userURLString = StringConstants.kUserDetailURL(user.id)\n+        manager.DELETE(userURLString, parameters: nil, success: { (operation, data) -> Void in\n+            completion?()\n+            }) { (operation, error) -> Void in\n+                failure(\"Could not remove user.\")\n+        }\n     }\n     \n     static func createAnnouncement(announcement: Announcement, completion: (Announcement) -> Void, failure: (String) -> Void) {\n         let manager = BaseOperation.manager()\n-        let announcementDict = announcement.toDictionary()\n-        // TODO: Create Announcement\n+        let params = [\"announcement\":\n+            [\n+                AnnouncementConstants.kTitle: announcement.title!,\n+                AnnouncementConstants.kText: announcement.text!,\n+                AnnouncementConstants.kSchoolID: announcement.school!.id,\n+                AnnouncementConstants.kUserID: LoginOperations.getUser()!.id,\n+                AnnouncementConstants.kCategory: \"school\"","path":"sage-ios/SAGE/SAGE/AdminOperations.swift","position":182,"original_position":182,"commit_id":"4d754fa55d7fa182aa91f8025802e0ac7cba66c1","original_commit_id":"4d754fa55d7fa182aa91f8025802e0ac7cba66c1","user":{"login":"amillman","id":4883505,"avatar_url":"https://avatars.githubusercontent.com/u/4883505?v=3","gravatar_id":"","url":"https://api.github.com/users/amillman","html_url":"https://github.com/amillman","followers_url":"https://api.github.com/users/amillman/followers","following_url":"https://api.github.com/users/amillman/following{/other_user}","gists_url":"https://api.github.com/users/amillman/gists{/gist_id}","starred_url":"https://api.github.com/users/amillman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amillman/subscriptions","organizations_url":"https://api.github.com/users/amillman/orgs","repos_url":"https://api.github.com/users/amillman/repos","events_url":"https://api.github.com/users/amillman/events{/privacy}","received_events_url":"https://api.github.com/users/amillman/received_events","type":"User","site_admin":false},"body":"id think just not passing a school id is the move...but idk about the category part","created_at":"2015-12-28T02:00:50Z","updated_at":"2015-12-28T02:00:50Z","html_url":"https://github.com/calblueprint/sage-mobile/pull/73#discussion_r48460692","pull_request_url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73","_links":{"self":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/comments/48460692"},"html":{"href":"https://github.com/calblueprint/sage-mobile/pull/73#discussion_r48460692"},"pull_request":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73","id":53182051,"html_url":"https://github.com/calblueprint/sage-mobile/pull/73","diff_url":"https://github.com/calblueprint/sage-mobile/pull/73.diff","patch_url":"https://github.com/calblueprint/sage-mobile/pull/73.patch","issue_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues/73","number":73,"state":"open","locked":false,"title":"Sameera/networkrequests","user":{"login":"sameerav","id":7706852,"avatar_url":"https://avatars.githubusercontent.com/u/7706852?v=3","gravatar_id":"","url":"https://api.github.com/users/sameerav","html_url":"https://github.com/sameerav","followers_url":"https://api.github.com/users/sameerav/followers","following_url":"https://api.github.com/users/sameerav/following{/other_user}","gists_url":"https://api.github.com/users/sameerav/gists{/gist_id}","starred_url":"https://api.github.com/users/sameerav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sameerav/subscriptions","organizations_url":"https://api.github.com/users/sameerav/orgs","repos_url":"https://api.github.com/users/sameerav/repos","events_url":"https://api.github.com/users/sameerav/events{/privacy}","received_events_url":"https://api.github.com/users/sameerav/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-09T21:41:41Z","updated_at":"2015-12-28T02:00:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ac6e43889ac39e6d0c8ae1996c5b7e9a49e44fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73/commits","review_comments_url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73/comments","review_comment_url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues/73/comments","statuses_url":"https://api.github.com/repos/calblueprint/sage-mobile/statuses/4d754fa55d7fa182aa91f8025802e0ac7cba66c1","head":{"label":"calblueprint:sameera/networkrequests","ref":"sameera/networkrequests","sha":"4d754fa55d7fa182aa91f8025802e0ac7cba66c1","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":42952348,"name":"sage-mobile","full_name":"calblueprint/sage-mobile","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/sage-mobile","description":"Mobile repo for SAGE","fork":false,"url":"https://api.github.com/repos/calblueprint/sage-mobile","forks_url":"https://api.github.com/repos/calblueprint/sage-mobile/forks","keys_url":"https://api.github.com/repos/calblueprint/sage-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/sage-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/sage-mobile/teams","hooks_url":"https://api.github.com/repos/calblueprint/sage-mobile/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/sage-mobile/events","assignees_url":"https://api.github.com/repos/calblueprint/sage-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/sage-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/sage-mobile/tags","blobs_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/sage-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/sage-mobile/languages","stargazers_url":"https://api.github.com/repos/calblueprint/sage-mobile/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/sage-mobile/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/sage-mobile/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/sage-mobile/subscription","commits_url":"https://api.github.com/repos/calblueprint/sage-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/sage-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/sage-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/sage-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/sage-mobile/merges","archive_url":"https://api.github.com/repos/calblueprint/sage-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/sage-mobile/downloads","issues_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/sage-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/sage-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/sage-mobile/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/sage-mobile/releases{/id}","created_at":"2015-09-22T18:19:43Z","updated_at":"2015-12-23T00:17:54Z","pushed_at":"2015-12-25T07:56:54Z","git_url":"git://github.com/calblueprint/sage-mobile.git","ssh_url":"git@github.com:calblueprint/sage-mobile.git","clone_url":"https://github.com/calblueprint/sage-mobile.git","svn_url":"https://github.com/calblueprint/sage-mobile","homepage":null,"size":11315,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"base":{"label":"calblueprint:master","ref":"master","sha":"a63b1e8ee28dcf32a830adb1821aee1c4e4a511f","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":42952348,"name":"sage-mobile","full_name":"calblueprint/sage-mobile","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/sage-mobile","description":"Mobile repo for SAGE","fork":false,"url":"https://api.github.com/repos/calblueprint/sage-mobile","forks_url":"https://api.github.com/repos/calblueprint/sage-mobile/forks","keys_url":"https://api.github.com/repos/calblueprint/sage-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/sage-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/sage-mobile/teams","hooks_url":"https://api.github.com/repos/calblueprint/sage-mobile/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/sage-mobile/events","assignees_url":"https://api.github.com/repos/calblueprint/sage-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/sage-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/sage-mobile/tags","blobs_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/sage-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/sage-mobile/languages","stargazers_url":"https://api.github.com/repos/calblueprint/sage-mobile/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/sage-mobile/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/sage-mobile/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/sage-mobile/subscription","commits_url":"https://api.github.com/repos/calblueprint/sage-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/sage-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/sage-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/sage-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/sage-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/sage-mobile/merges","archive_url":"https://api.github.com/repos/calblueprint/sage-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/sage-mobile/downloads","issues_url":"https://api.github.com/repos/calblueprint/sage-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/sage-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/sage-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/sage-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/sage-mobile/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/sage-mobile/releases{/id}","created_at":"2015-09-22T18:19:43Z","updated_at":"2015-12-23T00:17:54Z","pushed_at":"2015-12-25T07:56:54Z","git_url":"git://github.com/calblueprint/sage-mobile.git","ssh_url":"git@github.com:calblueprint/sage-mobile.git","clone_url":"https://github.com/calblueprint/sage-mobile.git","svn_url":"https://github.com/calblueprint/sage-mobile","homepage":null,"size":11315,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73"},"html":{"href":"https://github.com/calblueprint/sage-mobile/pull/73"},"issue":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/issues/73"},"comments":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/calblueprint/sage-mobile/statuses/4d754fa55d7fa182aa91f8025802e0ac7cba66c1"}}}}