{"action":"created","comment":{"url":"https://api.github.com/repos/nodesagency/blog/pulls/comments/87809646","pull_request_review_id":8405602,"id":87809646,"diff_hunk":"@@ -0,0 +1,368 @@\n+---\n+title: 6 simple steps to get your first Vapor JSON response\n+date: 2016-11-08 12:42:00\n+tags: vapor,setup\n+authorId: olha\n+categories:\n+- Vapor\n+---\n+\n+6 simple steps to setup your first Vapor JSON response. We will cover the initial setup and how to make both POST and GET with controllers and models. \n+\n+This tutorial will assume that you already have installed [Vapor](https://vapor.github.io/documentation/getting-started/install-swift-3-macos.html) and [Xcode 8](https://developer.apple.com/xcode/) and are familiar with Swift 3.\n+\n+### 1. Creating your project\n+\n+Now open your terminal and cd into the place you want your project.\n+\n+Now run (also in the terminal, of course change the ProjectName to your actual project name)\n+\n+```javascript\n+vapor new ProjectName\n+```\n+You should now see an ASCII art of the Vapor logo. Like so:\n+\n+```javascript\n+\n+    \t\t\t\t\t\t\t\t\t\t\t\t**\n+                                                 **~~**\n+                                               **~~~~~~**\n+                                             **~~~~~~~~~~**\n+                                           **~~~~~~~~~~~~~~**\n+                                         **~~~~~~~~~~~~~~~~~~**\n+                                       **~~~~~~~~~~~~~~~~~~~~~~**\n+                                      **~~~~~~~~~~~~~~~~~~~~~~~~**\n+                                     **~~~~~~~~~~~~~~~~~~~~~~~~~~**\n+                                    **~~~~~~~~~~~~~~~~~~~~~~~~~~~~**\n+                                    **~~~~~~~~~~~~~~~~~~~~~~~~~~~~**\n+                                    **~~~~~~~~~~~~~~~~~~~~~++++~~~**\n+                                     **~~~~~~~~~~~~~~~~~~~++++~~~**\n+                                      ***~~~~~~~~~~~~~~~++++~~~***\n+                                        ****~~~~~~~~~~++++~~****\n+                                           *****~~~~~~~~~*****\n+                                              *************\n+                                     \n+                                     _       __    ___   ___   ___\n+                                    \\ \\  /  / /\\  | |_) / / \\ | |_)\n+                                     \\_\\/  /_/--\\ |_|   \\_\\_/ |_| \\\n+                                       a web framework for Swift\n+\n+                                 Project \"ProjectName\" has been created.\n+                          Type `cd ProjectName ` to enter the project directory.\n+                                                 Enjoy!\n+\n+```\n+\n+Congratulations you have succesfully created your first Vapor project. Let's now try to run the project. First cd into your project (```cd ProjectName```) and after run:\n+\n+```javascript\n+vapor xcode\n+```\n+\n+Vapor will then fetch the dependencies and run the project. Vapor will now ask you if you want to open the project, and yes, yes we do! (So type y to open)\n+\n+```javascript\n+Select the `App` scheme to run.\n+Open Xcode project?\n+y/n>\n+```\n+\n+You should now have your Xcode project open. Let's check if we have everything running correctly.\n+So in Xcode press the 'Run' button in the top left corner of the UI (or cmd+r). You should now see this in your console in Xcode (Make sure that you switch target from the framework to App, just next to the stop button)\n+\n+```javascript\n+No command supplied, defaulting to serve...\n+No preparations.\n+Server 'default' starting at 0.0.0.0:8080\n+```\n+\n+Now c+p ```0.0.0.0:8080``` into your browser. If you see the 'It works.' screen then you have successfully run your first local Vapor \n+\n+Note: Beacuse Vapor is constantly updating and new versions pushed out frequently then you might have this error in your Xcode project after running for the first time.\n+\n+```jconsole\n+ld: library not found for -lCLibreSSL for architecture x86_64\n+clang: error: linker command failed with exit code 1 (use -v to see invocation)\n+```\n+\n+If you didn't get that error then just go to section two of this article. If you did then open your terminal and first run \n+```vapor build --clean```, after that run a ```vapor xcode``` that should do the trick. (This basically cleans the project and compiles it again)\n+\n+And hopefully you should be ready to rock and roll.\n+\n+### 2. Creating a model\n+\n+Open the terminal again, and run \n+```touch Sources/App/Models/Car.swift```\n+\n+After that run ```vapor xcode``` this will make sure that you get the correct path for the model. If you open Xcode then you should be able to see your model in the Models folder.\n+\n+Fill the model with the code below:\n+\n+```swift\n+final class Car {\n+    \n+    //Add your properties like you normally would in iOS\n+    var name:String\n+    var color:String\n+    var milesDriven:Int\n+    \n+    //Convinience method for instanciation of our object\n+    init(name:String, color:String, milesDriven: Int) {\n+        self.name = name\n+        self.color = color\n+        self.milesDriven = milesDriven\n+    }\n+}\n+```\n+### 3. Returning some JSON baby\n+\n+Vapor is using a class called ```Droplet```, the Droplet is the main entry point on the server (If you are familiar with iOS development then this would be our AppDelegate class or your entry point in Storyboard). The Droplet instance will contain all providers, routes and making sure that everything has been linked correctly to run the different functionalities in the run time. The line ```drop.run()``` in the ```main.swift``` is where the server actually gets booted, so everything you need to add have to be before this line.\n+\n+Now open the ```main.swift``` file and add the following code right above the ```drop.run()```\n+\n+```swift\n+//Declaring our first route, this will be a 'get' (could also be 'post' etc..)\n+drop.get(\"get_a_car\") { request in\n+    \n+    //Creating our object\n+    let car = Car(name: \"Toyota\", color: \"Red\", milesDriven: 0)\n+    \n+    //Formating it into JSON\n+    return try JSON(node: [\n+        \"name\" : car.name,\n+        \"color\" : car.color,\n+        \"miles_driven\" : car.milesDriven\n+        ])\n+}\n+\n+```\n+Now Run your Xcode project. You should now see this in your console in Xcode (Make sure that you switch target from the framework to App, just next to the stop button) \n+\n+```jconsole\n+No command supplied, defaulting to serve...\n+No preparations.\n+Server 'default' starting at 0.0.0.0:8080\n+```\n+Now open your browser and type in ```0.0.0.0:8080/get_a_car```, you should now have returned your first JSON feed! \n+\n+Of course, Vapor is way smarter than this. So please go ahead an delete the code you added in step 3.\n+\n+### 4. Creating a Controller\n+\n+Now go back to your terminal and run ```touch Sources/App/Controllers/CarController.swift``` and again ```vapor xcode```, the Controllers folder should now contain your newly created CarController.swift\n+\n+Before we can make any good use of our new Controller then we have to update our ```Car.swift``` model to actually get some of Vapors awesome magic.\n+\n+So jump back into the ```Car.swift``` file and update the file to have the following:\n+\n+```swift\n+//Importing the Vapor framework to make the model support dependencies\n+import Vapor\n+//Importing Fluent which is Vapors powering of databases and tables\n+import Fluent\n+\n+//Subclassing our Car model from 'Model' (Vapors magic model object)\n+final class Car: Model {\n+    \n+    //Vapor uses 'Node' as their Model ids. This is the datatype that they use to make lookup and look at the primary key in the DB's.\n+    var id:Node?\n+    \n+    var name:String\n+    var color:String\n+    var milesDriven:Int\n+    \n+    init(name:String, color:String, milesDriven: Int) {\n+        self.name = name\n+        self.color = color\n+        self.milesDriven = milesDriven\n+    }\n+    \n+    //Adding one of Vapors protocols to conform to the 'Model' object. This basically makes sure that data is mapped correctly when getting extracted from a data source such as a DB.  \n+    init(node: Node, in context: Context) throws {\n+        id = try node.extract(\"id\")\n+        name = try node.extract(\"name\")\n+        color = try node.extract(\"color\")\n+        //We are making this underscored because that's how we normally name attributes in a database table\n+        milesDriven = try node.extract(\"miles_driven\")\n+    }\n+    \n+    //makeNode makes sure that data can be saved into the given database (this is made super dynamic)\n+    func makeNode(context: Context) throws -> Node {\n+        return try Node(node: [\n+            \"id\": id,\n+            \"name\": name,\n+            \"color\": color,\n+            //We are making this underscored because that's how we normally name attributes in a database table\n+            \"miles_driven\": milesDriven\n+        ])\n+    }\n+}\n+\n+//This is Vapor way of making migrations, leave them empty for now. We will add it later\n+extension Car: Preparation {\n+    static func prepare(_ database: Database) throws {\n+        //\n+    }\n+    \n+    static func revert(_ database: Database) throws {\n+        //\n+    }\n+}\n+```\n+So now our model should be ready for some cool controller action. Please now open our ```CarController.swift``` and add the following code:\n+\n+```swift\n+import Vapor\n+//Import HTTP for getting all our response types, codes, etc..\n+import HTTP\n+\n+//Subclass our Controller from ResourceRepresentable\n+final class CarController: ResourceRepresentable {\n+    \n+    //This will get called if the index in 'makeResource()' below will be called.\n+    func index(request: Request) throws -> ResponseRepresentable {\n+        \n+        //Create static object\n+        let car = Car(name: \"Fiat\", color: \"SpaceGrey\", milesDriven: 1000)\n+        return try car.converted(to: JSON.self)\n+    }\n+    \n+    //This is the function the figure out what method that should be called depending on the HTTP request type. We will here start with the get.\n+    func makeResource() -> Resource<Car> {\n+        return Resource(\n+            index: index\n+        )\n+    }\n+}\n+```\n+This is how some of the simplest controllers will look in Vapor. Now let's try to see how we will use them in our 'DropLet'.\n+\n+### 5. Grouped routes and Controller bindings\n+\n+Are you ready to see some magic? Ok, now open the ```main.swift``` let's start by doing some house cleaning, delete the following lines from the file:\n+\n+```swift\n+drop.get { req in\n+    return try drop.view.make(\"welcome\", [\n+    \t\"message\": drop.localization[req.lang, \"welcome\", \"title\"]\n+    ])\n+}\n+\n+drop.resource(\"posts\", PostController())\n+```\n+\n+and add the following lines of code:\n+\n+```swift\n+//Creating a route group, in this way you won't have to add the same slugs over and over again\n+drop.group(\"api\") { api in\n+    //Adding a sub slug to our URL and redirecting all requests to the CarController we just build..","path":"source/_posts/2016-11-08-Vapor-setup.md","position":260,"original_position":260,"commit_id":"2f41194ec885d3c109efa417683837b38de7dcee","original_commit_id":"cfb1e0637ebc91c91ce07cedfbac535eaf79f330","user":{"login":"nickskull","id":1776969,"avatar_url":"https://avatars.githubusercontent.com/u/1776969?v=3","gravatar_id":"","url":"https://api.github.com/users/nickskull","html_url":"https://github.com/nickskull","followers_url":"https://api.github.com/users/nickskull/followers","following_url":"https://api.github.com/users/nickskull/following{/other_user}","gists_url":"https://api.github.com/users/nickskull/gists{/gist_id}","starred_url":"https://api.github.com/users/nickskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickskull/subscriptions","organizations_url":"https://api.github.com/users/nickskull/orgs","repos_url":"https://api.github.com/users/nickskull/repos","events_url":"https://api.github.com/users/nickskull/events{/privacy}","received_events_url":"https://api.github.com/users/nickskull/received_events","type":"User","site_admin":false},"body":"s/build/built","created_at":"2016-11-14T14:26:14Z","updated_at":"2016-11-14T14:26:14Z","html_url":"https://github.com/nodesagency/blog/pull/40#discussion_r87809646","pull_request_url":"https://api.github.com/repos/nodesagency/blog/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/nodesagency/blog/pulls/comments/87809646"},"html":{"href":"https://github.com/nodesagency/blog/pull/40#discussion_r87809646"},"pull_request":{"href":"https://api.github.com/repos/nodesagency/blog/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/nodesagency/blog/pulls/40","id":93568559,"html_url":"https://github.com/nodesagency/blog/pull/40","diff_url":"https://github.com/nodesagency/blog/pull/40.diff","patch_url":"https://github.com/nodesagency/blog/pull/40.patch","issue_url":"https://api.github.com/repos/nodesagency/blog/issues/40","number":40,"state":"open","locked":false,"title":"Feature/6 simple steps to first vapor response","user":{"login":"OliverWangHansen","id":2588746,"avatar_url":"https://avatars.githubusercontent.com/u/2588746?v=3","gravatar_id":"","url":"https://api.github.com/users/OliverWangHansen","html_url":"https://github.com/OliverWangHansen","followers_url":"https://api.github.com/users/OliverWangHansen/followers","following_url":"https://api.github.com/users/OliverWangHansen/following{/other_user}","gists_url":"https://api.github.com/users/OliverWangHansen/gists{/gist_id}","starred_url":"https://api.github.com/users/OliverWangHansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OliverWangHansen/subscriptions","organizations_url":"https://api.github.com/users/OliverWangHansen/orgs","repos_url":"https://api.github.com/users/OliverWangHansen/repos","events_url":"https://api.github.com/users/OliverWangHansen/events{/privacy}","received_events_url":"https://api.github.com/users/OliverWangHansen/received_events","type":"User","site_admin":false},"body":"Please review, have updated spelling mistakes and made it a little easier to follow for noobs. :)","created_at":"2016-11-14T13:44:43Z","updated_at":"2016-11-14T14:26:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2fe9fd8fd453371356687f08555bd48c1fd88eb3","assignee":{"login":"nickskull","id":1776969,"avatar_url":"https://avatars.githubusercontent.com/u/1776969?v=3","gravatar_id":"","url":"https://api.github.com/users/nickskull","html_url":"https://github.com/nickskull","followers_url":"https://api.github.com/users/nickskull/followers","following_url":"https://api.github.com/users/nickskull/following{/other_user}","gists_url":"https://api.github.com/users/nickskull/gists{/gist_id}","starred_url":"https://api.github.com/users/nickskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickskull/subscriptions","organizations_url":"https://api.github.com/users/nickskull/orgs","repos_url":"https://api.github.com/users/nickskull/repos","events_url":"https://api.github.com/users/nickskull/events{/privacy}","received_events_url":"https://api.github.com/users/nickskull/received_events","type":"User","site_admin":false},"assignees":[{"login":"nickskull","id":1776969,"avatar_url":"https://avatars.githubusercontent.com/u/1776969?v=3","gravatar_id":"","url":"https://api.github.com/users/nickskull","html_url":"https://github.com/nickskull","followers_url":"https://api.github.com/users/nickskull/followers","following_url":"https://api.github.com/users/nickskull/following{/other_user}","gists_url":"https://api.github.com/users/nickskull/gists{/gist_id}","starred_url":"https://api.github.com/users/nickskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickskull/subscriptions","organizations_url":"https://api.github.com/users/nickskull/orgs","repos_url":"https://api.github.com/users/nickskull/repos","events_url":"https://api.github.com/users/nickskull/events{/privacy}","received_events_url":"https://api.github.com/users/nickskull/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nodesagency/blog/pulls/40/commits","review_comments_url":"https://api.github.com/repos/nodesagency/blog/pulls/40/comments","review_comment_url":"https://api.github.com/repos/nodesagency/blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodesagency/blog/issues/40/comments","statuses_url":"https://api.github.com/repos/nodesagency/blog/statuses/2f41194ec885d3c109efa417683837b38de7dcee","head":{"label":"nodesagency:feature/6-simple-steps-to-first-vapor-response","ref":"feature/6-simple-steps-to-first-vapor-response","sha":"2f41194ec885d3c109efa417683837b38de7dcee","user":{"login":"nodesagency","id":868688,"avatar_url":"https://avatars.githubusercontent.com/u/868688?v=3","gravatar_id":"","url":"https://api.github.com/users/nodesagency","html_url":"https://github.com/nodesagency","followers_url":"https://api.github.com/users/nodesagency/followers","following_url":"https://api.github.com/users/nodesagency/following{/other_user}","gists_url":"https://api.github.com/users/nodesagency/gists{/gist_id}","starred_url":"https://api.github.com/users/nodesagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodesagency/subscriptions","organizations_url":"https://api.github.com/users/nodesagency/orgs","repos_url":"https://api.github.com/users/nodesagency/repos","events_url":"https://api.github.com/users/nodesagency/events{/privacy}","received_events_url":"https://api.github.com/users/nodesagency/received_events","type":"Organization","site_admin":false},"repo":{"id":63684972,"name":"blog","full_name":"nodesagency/blog","owner":{"login":"nodesagency","id":868688,"avatar_url":"https://avatars.githubusercontent.com/u/868688?v=3","gravatar_id":"","url":"https://api.github.com/users/nodesagency","html_url":"https://github.com/nodesagency","followers_url":"https://api.github.com/users/nodesagency/followers","following_url":"https://api.github.com/users/nodesagency/following{/other_user}","gists_url":"https://api.github.com/users/nodesagency/gists{/gist_id}","starred_url":"https://api.github.com/users/nodesagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodesagency/subscriptions","organizations_url":"https://api.github.com/users/nodesagency/orgs","repos_url":"https://api.github.com/users/nodesagency/repos","events_url":"https://api.github.com/users/nodesagency/events{/privacy}","received_events_url":"https://api.github.com/users/nodesagency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodesagency/blog","description":"Nodes Engineering blog","fork":false,"url":"https://api.github.com/repos/nodesagency/blog","forks_url":"https://api.github.com/repos/nodesagency/blog/forks","keys_url":"https://api.github.com/repos/nodesagency/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodesagency/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodesagency/blog/teams","hooks_url":"https://api.github.com/repos/nodesagency/blog/hooks","issue_events_url":"https://api.github.com/repos/nodesagency/blog/issues/events{/number}","events_url":"https://api.github.com/repos/nodesagency/blog/events","assignees_url":"https://api.github.com/repos/nodesagency/blog/assignees{/user}","branches_url":"https://api.github.com/repos/nodesagency/blog/branches{/branch}","tags_url":"https://api.github.com/repos/nodesagency/blog/tags","blobs_url":"https://api.github.com/repos/nodesagency/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodesagency/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodesagency/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodesagency/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodesagency/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/nodesagency/blog/languages","stargazers_url":"https://api.github.com/repos/nodesagency/blog/stargazers","contributors_url":"https://api.github.com/repos/nodesagency/blog/contributors","subscribers_url":"https://api.github.com/repos/nodesagency/blog/subscribers","subscription_url":"https://api.github.com/repos/nodesagency/blog/subscription","commits_url":"https://api.github.com/repos/nodesagency/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodesagency/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodesagency/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodesagency/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodesagency/blog/contents/{+path}","compare_url":"https://api.github.com/repos/nodesagency/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodesagency/blog/merges","archive_url":"https://api.github.com/repos/nodesagency/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodesagency/blog/downloads","issues_url":"https://api.github.com/repos/nodesagency/blog/issues{/number}","pulls_url":"https://api.github.com/repos/nodesagency/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/nodesagency/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/nodesagency/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodesagency/blog/labels{/name}","releases_url":"https://api.github.com/repos/nodesagency/blog/releases{/id}","deployments_url":"https://api.github.com/repos/nodesagency/blog/deployments","created_at":"2016-07-19T10:34:58Z","updated_at":"2016-10-27T15:00:22Z","pushed_at":"2016-11-14T14:23:54Z","git_url":"git://github.com/nodesagency/blog.git","ssh_url":"git@github.com:nodesagency/blog.git","clone_url":"https://github.com/nodesagency/blog.git","svn_url":"https://github.com/nodesagency/blog","homepage":null,"size":2860,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":1,"default_branch":"master"}},"base":{"label":"nodesagency:develop","ref":"develop","sha":"fb2c7f663c213bb8b2029689a6b7dc9c76bbc274","user":{"login":"nodesagency","id":868688,"avatar_url":"https://avatars.githubusercontent.com/u/868688?v=3","gravatar_id":"","url":"https://api.github.com/users/nodesagency","html_url":"https://github.com/nodesagency","followers_url":"https://api.github.com/users/nodesagency/followers","following_url":"https://api.github.com/users/nodesagency/following{/other_user}","gists_url":"https://api.github.com/users/nodesagency/gists{/gist_id}","starred_url":"https://api.github.com/users/nodesagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodesagency/subscriptions","organizations_url":"https://api.github.com/users/nodesagency/orgs","repos_url":"https://api.github.com/users/nodesagency/repos","events_url":"https://api.github.com/users/nodesagency/events{/privacy}","received_events_url":"https://api.github.com/users/nodesagency/received_events","type":"Organization","site_admin":false},"repo":{"id":63684972,"name":"blog","full_name":"nodesagency/blog","owner":{"login":"nodesagency","id":868688,"avatar_url":"https://avatars.githubusercontent.com/u/868688?v=3","gravatar_id":"","url":"https://api.github.com/users/nodesagency","html_url":"https://github.com/nodesagency","followers_url":"https://api.github.com/users/nodesagency/followers","following_url":"https://api.github.com/users/nodesagency/following{/other_user}","gists_url":"https://api.github.com/users/nodesagency/gists{/gist_id}","starred_url":"https://api.github.com/users/nodesagency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodesagency/subscriptions","organizations_url":"https://api.github.com/users/nodesagency/orgs","repos_url":"https://api.github.com/users/nodesagency/repos","events_url":"https://api.github.com/users/nodesagency/events{/privacy}","received_events_url":"https://api.github.com/users/nodesagency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodesagency/blog","description":"Nodes Engineering blog","fork":false,"url":"https://api.github.com/repos/nodesagency/blog","forks_url":"https://api.github.com/repos/nodesagency/blog/forks","keys_url":"https://api.github.com/repos/nodesagency/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodesagency/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodesagency/blog/teams","hooks_url":"https://api.github.com/repos/nodesagency/blog/hooks","issue_events_url":"https://api.github.com/repos/nodesagency/blog/issues/events{/number}","events_url":"https://api.github.com/repos/nodesagency/blog/events","assignees_url":"https://api.github.com/repos/nodesagency/blog/assignees{/user}","branches_url":"https://api.github.com/repos/nodesagency/blog/branches{/branch}","tags_url":"https://api.github.com/repos/nodesagency/blog/tags","blobs_url":"https://api.github.com/repos/nodesagency/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodesagency/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodesagency/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodesagency/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodesagency/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/nodesagency/blog/languages","stargazers_url":"https://api.github.com/repos/nodesagency/blog/stargazers","contributors_url":"https://api.github.com/repos/nodesagency/blog/contributors","subscribers_url":"https://api.github.com/repos/nodesagency/blog/subscribers","subscription_url":"https://api.github.com/repos/nodesagency/blog/subscription","commits_url":"https://api.github.com/repos/nodesagency/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodesagency/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodesagency/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodesagency/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodesagency/blog/contents/{+path}","compare_url":"https://api.github.com/repos/nodesagency/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodesagency/blog/merges","archive_url":"https://api.github.com/repos/nodesagency/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodesagency/blog/downloads","issues_url":"https://api.github.com/repos/nodesagency/blog/issues{/number}","pulls_url":"https://api.github.com/repos/nodesagency/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/nodesagency/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/nodesagency/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodesagency/blog/labels{/name}","releases_url":"https://api.github.com/repos/nodesagency/blog/releases{/id}","deployments_url":"https://api.github.com/repos/nodesagency/blog/deployments","created_at":"2016-07-19T10:34:58Z","updated_at":"2016-10-27T15:00:22Z","pushed_at":"2016-11-14T14:23:54Z","git_url":"git://github.com/nodesagency/blog.git","ssh_url":"git@github.com:nodesagency/blog.git","clone_url":"https://github.com/nodesagency/blog.git","svn_url":"https://github.com/nodesagency/blog","homepage":null,"size":2860,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodesagency/blog/pulls/40"},"html":{"href":"https://github.com/nodesagency/blog/pull/40"},"issue":{"href":"https://api.github.com/repos/nodesagency/blog/issues/40"},"comments":{"href":"https://api.github.com/repos/nodesagency/blog/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/nodesagency/blog/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/nodesagency/blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodesagency/blog/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/nodesagency/blog/statuses/2f41194ec885d3c109efa417683837b38de7dcee"}}}}
{"actor":{"display_login":"nickskull"}}