{"action":"created","comment":{"url":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/comments/79404582","id":79404582,"diff_hunk":"@@ -1,52 +1,97 @@\n-These are example JSONs we expect to receive\n+# API suggested specs\n \n-##Fairphone\n+These are JSON-like specs for the data we expect to receive.\n \n-```JSON\n+JSON properties are written in the following format: `\"key\" [quantifier]: valueType`.\n+\n+- `\"key\"`: literal key name, lowercaseCamelCase\n+- `quantifier`:\n+  - [absence]: property is **obligatory**\n+  - `*`: 0 or more array items; property is optional\n+  - `+`: 1 or more array items; property is **obligatory**\n+  - `?`: 0 or 1; property is optional\n+  - `{n}`: exactly _n_ ocurrences; property is **obligatory**\n+- `valueType`:\n+  - `UppercaseCamelCase`: data type\n+  - `lowercase_snake_case`: String format\n+\n+\n+## Fairphone\n+\n+### Angels endpoint\n+\n+```JavaScript\n {\n-  \"meetups\" :\n-  [\n+  \"angels\" *: [\n     {\n-      \"eventName\" : \"The example party\",\n-      \"startDate\" : \"2016-10-13T14:00+02:00\",\n-      \"endDate\" : \"2016-10-13T18:00+02:00\",\n-      \"lat_lng\" : [48.210033,16.363449],\n-      \"website\" : \"https://fairphone.com/meetups/The-example-party/12\"\n+      \"cityName\": String,\n+      \"countryName\" ?: String,\n+      \"coordinates\": {\n+        \"latitude\": Float,\n+        \"longitude\": Float\n+      },\n+      \"email\": email,\n+      \"people\" *: [\n+        {\n+          \"name\" ?: String,\n+          \"forumNick\" ?: String\n+        },\n+        {...}\n+      ]\n     },\n-    {}  \n-  ],\n-  \"angels\" :\n-  [\n+    {...}\n+  ]\n+}\n+```\n+\n+\n+### Meetups endpoint\n+\n+```JavaScript\n+{\n+  \"meetups\" *: [\n     {\n-      \"cityName\" : \"Foo City\",\n-      \"lat_lng\" : [48.210033,16.363449],\n-      \"website\" : \"https://fairphone.com/angels/foo-city/36\"\n+      \"eventName\": String,\n+      \"startDate\": unix_time,\n+      \"endDate\": unix_time,\n+      \"coordinates\": {\n+        \"latitude\": Float,\n+        \"longitude\": Float\n+      },\n+      \"website\": url\n     },\n-    {}\n+    {...}\n   ]\n }\n ```\n-##T-Mobile\n-```JSON\n+\n+\n+## T-Mobile\n+\n+### Shops endpoint\n+```JavaScript\n {\n-  \"shops\" :\n-  [\n+  \"shops\" *: [\n     {\n-      \"shopName\" : \"Example Shop\",\n-      \"lat_lng\" : [48.210033,16.363449],\n-      \"openingHours\" :\n-      {\n-        \"monday\" : \"9:15/18:30\",\n-        \"tuesday\" : \"9:15/18:30\",\n-        \"wednesday\" : \"9:15/18:30\",\n-        \"thursday\" : \"9:15/18:30\",\n-        \"friday\" : \"9:15/18:30\",\n-        \"saturday\" : \"9:15/18:30\",\n-        \"sunday\" : \"\"\n+      \"shopName\": String,\n+      \"shopAddress\" ?: String,","path":"README.md","position":110,"original_position":110,"commit_id":"f02c9e567af99565ae6685d1af9ce514e0d03a87","original_commit_id":"e47ada8ef299ccfe5b777f74fd8f1b0e7337dd8d","user":{"login":"StefanBrand","id":8948865,"avatar_url":"https://avatars.githubusercontent.com/u/8948865?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanBrand","html_url":"https://github.com/StefanBrand","followers_url":"https://api.github.com/users/StefanBrand/followers","following_url":"https://api.github.com/users/StefanBrand/following{/other_user}","gists_url":"https://api.github.com/users/StefanBrand/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanBrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanBrand/subscriptions","organizations_url":"https://api.github.com/users/StefanBrand/orgs","repos_url":"https://api.github.com/users/StefanBrand/repos","events_url":"https://api.github.com/users/StefanBrand/events{/privacy}","received_events_url":"https://api.github.com/users/StefanBrand/received_events","type":"User","site_admin":false},"body":"Reverse Geocoding could turn an address automatically into coordinates. Or we could use it to transform coordinates to an address in order to have it displayed.\r\n","created_at":"2016-09-19T14:33:23Z","updated_at":"2016-09-19T14:33:24Z","html_url":"https://github.com/WeAreFairphone/fprsdb/pull/1#discussion_r79404582","pull_request_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/comments/79404582"},"html":{"href":"https://github.com/WeAreFairphone/fprsdb/pull/1#discussion_r79404582"},"pull_request":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1","id":85726736,"html_url":"https://github.com/WeAreFairphone/fprsdb/pull/1","diff_url":"https://github.com/WeAreFairphone/fprsdb/pull/1.diff","patch_url":"https://github.com/WeAreFairphone/fprsdb/pull/1.patch","issue_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/issues/1","number":1,"state":"open","locked":false,"title":"Update README.md","user":{"login":"Roboe","id":7013797,"avatar_url":"https://avatars.githubusercontent.com/u/7013797?v=3","gravatar_id":"","url":"https://api.github.com/users/Roboe","html_url":"https://github.com/Roboe","followers_url":"https://api.github.com/users/Roboe/followers","following_url":"https://api.github.com/users/Roboe/following{/other_user}","gists_url":"https://api.github.com/users/Roboe/gists{/gist_id}","starred_url":"https://api.github.com/users/Roboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roboe/subscriptions","organizations_url":"https://api.github.com/users/Roboe/orgs","repos_url":"https://api.github.com/users/Roboe/repos","events_url":"https://api.github.com/users/Roboe/events{/privacy}","received_events_url":"https://api.github.com/users/Roboe/received_events","type":"User","site_admin":false},"body":"Pick the rich-diff on the \"Files changed\" tab or read it here: https://github.com/Roboe/fprsdb/blob/master/README.md\r\n\r\n- Separate angels and meetups endpoints because with each on its own we can benefit from JavaScript's async (`fetch()` both and process them at the same time)\r\n- Add quantifiers to make properties optional\r\n- Split `lat_lng` properties to a `coordinates` object. We need an array for Leaflet, but this way it is more flexible and `[coordinates.latitude, coordinates.longitude]` doesn't seem hard to write in JS, :wink:. Also, if we use GeoJSON sometime, the array is inverted: `[coordinates.longitude, coordinates.latitude]`\r\n- Expand shrinked properties. JSON aims to be a human-readable format. Switching from eg. `\"telNr\"` to `\"phoneNumber\"` has an impact in code's semantic too.\r\n- Change `openingHours` to an array of objects: I'm thinking about future map localization too. Mainly German people will benefit from that, I guess.\r\n\r\nWhat do you think, @StefanBrand?","created_at":"2016-09-18T23:23:59Z","updated_at":"2016-09-19T14:33:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c61abe758f4d56cededb6fa186a4438108dd036","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1/commits","review_comments_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1/comments","review_comment_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/issues/1/comments","statuses_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/statuses/f02c9e567af99565ae6685d1af9ce514e0d03a87","head":{"label":"Roboe:master","ref":"master","sha":"f02c9e567af99565ae6685d1af9ce514e0d03a87","user":{"login":"Roboe","id":7013797,"avatar_url":"https://avatars.githubusercontent.com/u/7013797?v=3","gravatar_id":"","url":"https://api.github.com/users/Roboe","html_url":"https://github.com/Roboe","followers_url":"https://api.github.com/users/Roboe/followers","following_url":"https://api.github.com/users/Roboe/following{/other_user}","gists_url":"https://api.github.com/users/Roboe/gists{/gist_id}","starred_url":"https://api.github.com/users/Roboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roboe/subscriptions","organizations_url":"https://api.github.com/users/Roboe/orgs","repos_url":"https://api.github.com/users/Roboe/repos","events_url":"https://api.github.com/users/Roboe/events{/privacy}","received_events_url":"https://api.github.com/users/Roboe/received_events","type":"User","site_admin":false},"repo":{"id":68543458,"name":"fprsdb","full_name":"Roboe/fprsdb","owner":{"login":"Roboe","id":7013797,"avatar_url":"https://avatars.githubusercontent.com/u/7013797?v=3","gravatar_id":"","url":"https://api.github.com/users/Roboe","html_url":"https://github.com/Roboe","followers_url":"https://api.github.com/users/Roboe/followers","following_url":"https://api.github.com/users/Roboe/following{/other_user}","gists_url":"https://api.github.com/users/Roboe/gists{/gist_id}","starred_url":"https://api.github.com/users/Roboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roboe/subscriptions","organizations_url":"https://api.github.com/users/Roboe/orgs","repos_url":"https://api.github.com/users/Roboe/repos","events_url":"https://api.github.com/users/Roboe/events{/privacy}","received_events_url":"https://api.github.com/users/Roboe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Roboe/fprsdb","description":"Suggested specs concerning data for the Fairphone Community Map","fork":true,"url":"https://api.github.com/repos/Roboe/fprsdb","forks_url":"https://api.github.com/repos/Roboe/fprsdb/forks","keys_url":"https://api.github.com/repos/Roboe/fprsdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Roboe/fprsdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Roboe/fprsdb/teams","hooks_url":"https://api.github.com/repos/Roboe/fprsdb/hooks","issue_events_url":"https://api.github.com/repos/Roboe/fprsdb/issues/events{/number}","events_url":"https://api.github.com/repos/Roboe/fprsdb/events","assignees_url":"https://api.github.com/repos/Roboe/fprsdb/assignees{/user}","branches_url":"https://api.github.com/repos/Roboe/fprsdb/branches{/branch}","tags_url":"https://api.github.com/repos/Roboe/fprsdb/tags","blobs_url":"https://api.github.com/repos/Roboe/fprsdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Roboe/fprsdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Roboe/fprsdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/Roboe/fprsdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Roboe/fprsdb/statuses/{sha}","languages_url":"https://api.github.com/repos/Roboe/fprsdb/languages","stargazers_url":"https://api.github.com/repos/Roboe/fprsdb/stargazers","contributors_url":"https://api.github.com/repos/Roboe/fprsdb/contributors","subscribers_url":"https://api.github.com/repos/Roboe/fprsdb/subscribers","subscription_url":"https://api.github.com/repos/Roboe/fprsdb/subscription","commits_url":"https://api.github.com/repos/Roboe/fprsdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/Roboe/fprsdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/Roboe/fprsdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/Roboe/fprsdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/Roboe/fprsdb/contents/{+path}","compare_url":"https://api.github.com/repos/Roboe/fprsdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Roboe/fprsdb/merges","archive_url":"https://api.github.com/repos/Roboe/fprsdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Roboe/fprsdb/downloads","issues_url":"https://api.github.com/repos/Roboe/fprsdb/issues{/number}","pulls_url":"https://api.github.com/repos/Roboe/fprsdb/pulls{/number}","milestones_url":"https://api.github.com/repos/Roboe/fprsdb/milestones{/number}","notifications_url":"https://api.github.com/repos/Roboe/fprsdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Roboe/fprsdb/labels{/name}","releases_url":"https://api.github.com/repos/Roboe/fprsdb/releases{/id}","deployments_url":"https://api.github.com/repos/Roboe/fprsdb/deployments","created_at":"2016-09-18T19:45:06Z","updated_at":"2016-09-16T19:05:35Z","pushed_at":"2016-09-19T14:30:11Z","git_url":"git://github.com/Roboe/fprsdb.git","ssh_url":"git@github.com:Roboe/fprsdb.git","clone_url":"https://github.com/Roboe/fprsdb.git","svn_url":"https://github.com/Roboe/fprsdb","homepage":"https://github.com/WeAreFairphone/fprsmap","size":16,"stargazers_count":0,"watchers_count":0,"language":null,"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":"WeAreFairphone:master","ref":"master","sha":"3afb56a8f351596003204a8654dc00f3cca131c9","user":{"login":"WeAreFairphone","id":22130441,"avatar_url":"https://avatars.githubusercontent.com/u/22130441?v=3","gravatar_id":"","url":"https://api.github.com/users/WeAreFairphone","html_url":"https://github.com/WeAreFairphone","followers_url":"https://api.github.com/users/WeAreFairphone/followers","following_url":"https://api.github.com/users/WeAreFairphone/following{/other_user}","gists_url":"https://api.github.com/users/WeAreFairphone/gists{/gist_id}","starred_url":"https://api.github.com/users/WeAreFairphone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeAreFairphone/subscriptions","organizations_url":"https://api.github.com/users/WeAreFairphone/orgs","repos_url":"https://api.github.com/users/WeAreFairphone/repos","events_url":"https://api.github.com/users/WeAreFairphone/events{/privacy}","received_events_url":"https://api.github.com/users/WeAreFairphone/received_events","type":"Organization","site_admin":false},"repo":{"id":68049151,"name":"fprsdb","full_name":"WeAreFairphone/fprsdb","owner":{"login":"WeAreFairphone","id":22130441,"avatar_url":"https://avatars.githubusercontent.com/u/22130441?v=3","gravatar_id":"","url":"https://api.github.com/users/WeAreFairphone","html_url":"https://github.com/WeAreFairphone","followers_url":"https://api.github.com/users/WeAreFairphone/followers","following_url":"https://api.github.com/users/WeAreFairphone/following{/other_user}","gists_url":"https://api.github.com/users/WeAreFairphone/gists{/gist_id}","starred_url":"https://api.github.com/users/WeAreFairphone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeAreFairphone/subscriptions","organizations_url":"https://api.github.com/users/WeAreFairphone/orgs","repos_url":"https://api.github.com/users/WeAreFairphone/repos","events_url":"https://api.github.com/users/WeAreFairphone/events{/privacy}","received_events_url":"https://api.github.com/users/WeAreFairphone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WeAreFairphone/fprsdb","description":"Suggested specs concerning data for the Fairphone Community Map","fork":false,"url":"https://api.github.com/repos/WeAreFairphone/fprsdb","forks_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/forks","keys_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/teams","hooks_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/hooks","issue_events_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/issues/events{/number}","events_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/events","assignees_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/assignees{/user}","branches_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/branches{/branch}","tags_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/tags","blobs_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/statuses/{sha}","languages_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/languages","stargazers_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/stargazers","contributors_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/contributors","subscribers_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/subscribers","subscription_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/subscription","commits_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/contents/{+path}","compare_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/merges","archive_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/downloads","issues_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/issues{/number}","pulls_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls{/number}","milestones_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/milestones{/number}","notifications_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/labels{/name}","releases_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/releases{/id}","deployments_url":"https://api.github.com/repos/WeAreFairphone/fprsdb/deployments","created_at":"2016-09-12T21:20:13Z","updated_at":"2016-09-16T19:05:35Z","pushed_at":"2016-09-19T14:30:12Z","git_url":"git://github.com/WeAreFairphone/fprsdb.git","ssh_url":"git@github.com:WeAreFairphone/fprsdb.git","clone_url":"https://github.com/WeAreFairphone/fprsdb.git","svn_url":"https://github.com/WeAreFairphone/fprsdb","homepage":"https://github.com/WeAreFairphone/fprsmap","size":17,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1"},"html":{"href":"https://github.com/WeAreFairphone/fprsdb/pull/1"},"issue":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/issues/1"},"comments":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/WeAreFairphone/fprsdb/statuses/f02c9e567af99565ae6685d1af9ce514e0d03a87"}}}}
{"actor":{"display_login":"StefanBrand"}}