{"action":"created","comment":{"url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/comments/44425694","id":44425694,"diff_hunk":"@@ -105,6 +106,29 @@ def generate_token(space, options = {})\n         token\n       end\n \n+      def generate_json(space_id, options = {})\n+        filename = options.fetch(:filename, space_id)\n+        access_token = options.fetch(:access_token)\n+\n+        if access_token.nil?\n+          puts \"Access Token not specified\"\n+          puts \"Exiting!\"\n+          exit\n+        end\n+\n+        puts \"Generating JSON Template '#{filename}' for Space: '#{space_id}'\"\n+        puts \"If you've indicated a filename, JSON will be automatically saved to that file\"\n+        puts","path":"lib/contentful/bootstrap/commands.rb","position":24,"original_position":24,"commit_id":"ec5437eff1f57fcd4b889a22660093641fc2f739","original_commit_id":"ec5437eff1f57fcd4b889a22660093641fc2f739","user":{"login":"neonichu","id":118992,"avatar_url":"https://avatars.githubusercontent.com/u/118992?v=3","gravatar_id":"","url":"https://api.github.com/users/neonichu","html_url":"https://github.com/neonichu","followers_url":"https://api.github.com/users/neonichu/followers","following_url":"https://api.github.com/users/neonichu/following{/other_user}","gists_url":"https://api.github.com/users/neonichu/gists{/gist_id}","starred_url":"https://api.github.com/users/neonichu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neonichu/subscriptions","organizations_url":"https://api.github.com/users/neonichu/orgs","repos_url":"https://api.github.com/users/neonichu/repos","events_url":"https://api.github.com/users/neonichu/events{/privacy}","received_events_url":"https://api.github.com/users/neonichu/received_events","type":"User","site_admin":false},"body":"I think it would be preferable to have different messages when writing to a file or to stdout.","created_at":"2015-11-10T16:12:19Z","updated_at":"2015-11-10T16:12:19Z","html_url":"https://github.com/contentful-labs/contentful-bootstrap.rb/pull/14#discussion_r44425694","pull_request_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/comments/44425694"},"html":{"href":"https://github.com/contentful-labs/contentful-bootstrap.rb/pull/14#discussion_r44425694"},"pull_request":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14","id":49864413,"html_url":"https://github.com/contentful-labs/contentful-bootstrap.rb/pull/14","diff_url":"https://github.com/contentful-labs/contentful-bootstrap.rb/pull/14.diff","patch_url":"https://github.com/contentful-labs/contentful-bootstrap.rb/pull/14.patch","issue_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/14","number":14,"state":"open","locked":false,"title":"Generate template","user":{"login":"neonichu","id":118992,"avatar_url":"https://avatars.githubusercontent.com/u/118992?v=3","gravatar_id":"","url":"https://api.github.com/users/neonichu","html_url":"https://github.com/neonichu","followers_url":"https://api.github.com/users/neonichu/followers","following_url":"https://api.github.com/users/neonichu/following{/other_user}","gists_url":"https://api.github.com/users/neonichu/gists{/gist_id}","starred_url":"https://api.github.com/users/neonichu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neonichu/subscriptions","organizations_url":"https://api.github.com/users/neonichu/orgs","repos_url":"https://api.github.com/users/neonichu/repos","events_url":"https://api.github.com/users/neonichu/events{/privacy}","received_events_url":"https://api.github.com/users/neonichu/received_events","type":"User","site_admin":false},"body":"- The code for the conversion is pretty much done, it requires contentful/contentful.rb#76 and contentful/contentful.rb#75, though, so `contentful.rb` master at this point. \r\n\r\n- The spec requires network at the moment :cry: \r\n\r\n- There's no way to access the functionality from the CLI. Currently, the assumption that one parameter is required is hardcoded, the generator needs two, though (space id and access token)\r\n\r\nTODO:\r\n\r\n- [x] Wait for release of contentful.rb with required fixes\r\n- [x] Make spec not use the network\r\n- [x] Integrate into CLI\r\n\r\n@dlitvakb maybe you want to finish this? ;)","created_at":"2015-11-05T18:53:05Z","updated_at":"2015-11-10T16:12:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bcf484651079a4b620ad0c73b7ccabfc4d3b6ab5","assignee":{"login":"dlitvakb","id":1032706,"avatar_url":"https://avatars.githubusercontent.com/u/1032706?v=3","gravatar_id":"","url":"https://api.github.com/users/dlitvakb","html_url":"https://github.com/dlitvakb","followers_url":"https://api.github.com/users/dlitvakb/followers","following_url":"https://api.github.com/users/dlitvakb/following{/other_user}","gists_url":"https://api.github.com/users/dlitvakb/gists{/gist_id}","starred_url":"https://api.github.com/users/dlitvakb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlitvakb/subscriptions","organizations_url":"https://api.github.com/users/dlitvakb/orgs","repos_url":"https://api.github.com/users/dlitvakb/repos","events_url":"https://api.github.com/users/dlitvakb/events{/privacy}","received_events_url":"https://api.github.com/users/dlitvakb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14/commits","review_comments_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14/comments","review_comment_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/14/comments","statuses_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/statuses/ec5437eff1f57fcd4b889a22660093641fc2f739","head":{"label":"contentful-labs:generate-template","ref":"generate-template","sha":"ec5437eff1f57fcd4b889a22660093641fc2f739","user":{"login":"contentful-labs","id":10671121,"avatar_url":"https://avatars.githubusercontent.com/u/10671121?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful-labs","html_url":"https://github.com/contentful-labs","followers_url":"https://api.github.com/users/contentful-labs/followers","following_url":"https://api.github.com/users/contentful-labs/following{/other_user}","gists_url":"https://api.github.com/users/contentful-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful-labs/subscriptions","organizations_url":"https://api.github.com/users/contentful-labs/orgs","repos_url":"https://api.github.com/users/contentful-labs/repos","events_url":"https://api.github.com/users/contentful-labs/events{/privacy}","received_events_url":"https://api.github.com/users/contentful-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":45053656,"name":"contentful-bootstrap.rb","full_name":"contentful-labs/contentful-bootstrap.rb","owner":{"login":"contentful-labs","id":10671121,"avatar_url":"https://avatars.githubusercontent.com/u/10671121?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful-labs","html_url":"https://github.com/contentful-labs","followers_url":"https://api.github.com/users/contentful-labs/followers","following_url":"https://api.github.com/users/contentful-labs/following{/other_user}","gists_url":"https://api.github.com/users/contentful-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful-labs/subscriptions","organizations_url":"https://api.github.com/users/contentful-labs/orgs","repos_url":"https://api.github.com/users/contentful-labs/repos","events_url":"https://api.github.com/users/contentful-labs/events{/privacy}","received_events_url":"https://api.github.com/users/contentful-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contentful-labs/contentful-bootstrap.rb","description":"Contentful CLI tool for getting started with Contentful","fork":false,"url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb","forks_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/forks","keys_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/teams","hooks_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/hooks","issue_events_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/events{/number}","events_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/events","assignees_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/assignees{/user}","branches_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/branches{/branch}","tags_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/tags","blobs_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/statuses/{sha}","languages_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/languages","stargazers_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/stargazers","contributors_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/contributors","subscribers_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/subscribers","subscription_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/subscription","commits_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/contents/{+path}","compare_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/merges","archive_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/downloads","issues_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues{/number}","pulls_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls{/number}","milestones_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/milestones{/number}","notifications_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/labels{/name}","releases_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/releases{/id}","created_at":"2015-10-27T16:19:25Z","updated_at":"2015-11-05T18:00:27Z","pushed_at":"2015-11-09T18:39:45Z","git_url":"git://github.com/contentful-labs/contentful-bootstrap.rb.git","ssh_url":"git@github.com:contentful-labs/contentful-bootstrap.rb.git","clone_url":"https://github.com/contentful-labs/contentful-bootstrap.rb.git","svn_url":"https://github.com/contentful-labs/contentful-bootstrap.rb","homepage":"","size":444,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":4,"default_branch":"master"}},"base":{"label":"contentful-labs:master","ref":"master","sha":"c83adfd561d8e002136dee2147a3aa2050ead3d3","user":{"login":"contentful-labs","id":10671121,"avatar_url":"https://avatars.githubusercontent.com/u/10671121?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful-labs","html_url":"https://github.com/contentful-labs","followers_url":"https://api.github.com/users/contentful-labs/followers","following_url":"https://api.github.com/users/contentful-labs/following{/other_user}","gists_url":"https://api.github.com/users/contentful-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful-labs/subscriptions","organizations_url":"https://api.github.com/users/contentful-labs/orgs","repos_url":"https://api.github.com/users/contentful-labs/repos","events_url":"https://api.github.com/users/contentful-labs/events{/privacy}","received_events_url":"https://api.github.com/users/contentful-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":45053656,"name":"contentful-bootstrap.rb","full_name":"contentful-labs/contentful-bootstrap.rb","owner":{"login":"contentful-labs","id":10671121,"avatar_url":"https://avatars.githubusercontent.com/u/10671121?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful-labs","html_url":"https://github.com/contentful-labs","followers_url":"https://api.github.com/users/contentful-labs/followers","following_url":"https://api.github.com/users/contentful-labs/following{/other_user}","gists_url":"https://api.github.com/users/contentful-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful-labs/subscriptions","organizations_url":"https://api.github.com/users/contentful-labs/orgs","repos_url":"https://api.github.com/users/contentful-labs/repos","events_url":"https://api.github.com/users/contentful-labs/events{/privacy}","received_events_url":"https://api.github.com/users/contentful-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contentful-labs/contentful-bootstrap.rb","description":"Contentful CLI tool for getting started with Contentful","fork":false,"url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb","forks_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/forks","keys_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/teams","hooks_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/hooks","issue_events_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/events{/number}","events_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/events","assignees_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/assignees{/user}","branches_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/branches{/branch}","tags_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/tags","blobs_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/statuses/{sha}","languages_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/languages","stargazers_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/stargazers","contributors_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/contributors","subscribers_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/subscribers","subscription_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/subscription","commits_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/contents/{+path}","compare_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/merges","archive_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/downloads","issues_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues{/number}","pulls_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls{/number}","milestones_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/milestones{/number}","notifications_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/labels{/name}","releases_url":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/releases{/id}","created_at":"2015-10-27T16:19:25Z","updated_at":"2015-11-05T18:00:27Z","pushed_at":"2015-11-09T18:39:45Z","git_url":"git://github.com/contentful-labs/contentful-bootstrap.rb.git","ssh_url":"git@github.com:contentful-labs/contentful-bootstrap.rb.git","clone_url":"https://github.com/contentful-labs/contentful-bootstrap.rb.git","svn_url":"https://github.com/contentful-labs/contentful-bootstrap.rb","homepage":"","size":444,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14"},"html":{"href":"https://github.com/contentful-labs/contentful-bootstrap.rb/pull/14"},"issue":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/14"},"comments":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/contentful-labs/contentful-bootstrap.rb/statuses/ec5437eff1f57fcd4b889a22660093641fc2f739"}}}}