{"action":"created","issue":{"url":"https://api.github.com/repos/pg-irc/pathways-backend/issues/170","repository_url":"https://api.github.com/repos/pg-irc/pathways-backend","labels_url":"https://api.github.com/repos/pg-irc/pathways-backend/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/pg-irc/pathways-backend/issues/170/comments","events_url":"https://api.github.com/repos/pg-irc/pathways-backend/issues/170/events","html_url":"https://github.com/pg-irc/pathways-backend/issues/170","id":288636657,"number":170,"title":"Service search: sort by proximity","user":{"login":"rasmus-storjohann-PG","id":32307781,"avatar_url":"https://avatars0.githubusercontent.com/u/32307781?v=4","gravatar_id":"","url":"https://api.github.com/users/rasmus-storjohann-PG","html_url":"https://github.com/rasmus-storjohann-PG","followers_url":"https://api.github.com/users/rasmus-storjohann-PG/followers","following_url":"https://api.github.com/users/rasmus-storjohann-PG/following{/other_user}","gists_url":"https://api.github.com/users/rasmus-storjohann-PG/gists{/gist_id}","starred_url":"https://api.github.com/users/rasmus-storjohann-PG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasmus-storjohann-PG/subscriptions","organizations_url":"https://api.github.com/users/rasmus-storjohann-PG/orgs","repos_url":"https://api.github.com/users/rasmus-storjohann-PG/repos","events_url":"https://api.github.com/users/rasmus-storjohann-PG/events{/privacy}","received_events_url":"https://api.github.com/users/rasmus-storjohann-PG/received_events","type":"User","site_admin":false},"labels":[{"id":657179743,"url":"https://api.github.com/repos/pg-irc/pathways-backend/labels/Mapping%20and%20Searching","name":"Mapping and Searching","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"bensinjin","id":3228323,"avatar_url":"https://avatars2.githubusercontent.com/u/3228323?v=4","gravatar_id":"","url":"https://api.github.com/users/bensinjin","html_url":"https://github.com/bensinjin","followers_url":"https://api.github.com/users/bensinjin/followers","following_url":"https://api.github.com/users/bensinjin/following{/other_user}","gists_url":"https://api.github.com/users/bensinjin/gists{/gist_id}","starred_url":"https://api.github.com/users/bensinjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensinjin/subscriptions","organizations_url":"https://api.github.com/users/bensinjin/orgs","repos_url":"https://api.github.com/users/bensinjin/repos","events_url":"https://api.github.com/users/bensinjin/events{/privacy}","received_events_url":"https://api.github.com/users/bensinjin/received_events","type":"User","site_admin":false},"assignees":[{"login":"bensinjin","id":3228323,"avatar_url":"https://avatars2.githubusercontent.com/u/3228323?v=4","gravatar_id":"","url":"https://api.github.com/users/bensinjin","html_url":"https://github.com/bensinjin","followers_url":"https://api.github.com/users/bensinjin/followers","following_url":"https://api.github.com/users/bensinjin/following{/other_user}","gists_url":"https://api.github.com/users/bensinjin/gists{/gist_id}","starred_url":"https://api.github.com/users/bensinjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensinjin/subscriptions","organizations_url":"https://api.github.com/users/bensinjin/orgs","repos_url":"https://api.github.com/users/bensinjin/repos","events_url":"https://api.github.com/users/bensinjin/events{/privacy}","received_events_url":"https://api.github.com/users/bensinjin/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/pg-irc/pathways-backend/milestones/19","html_url":"https://github.com/pg-irc/pathways-backend/milestone/19","labels_url":"https://api.github.com/repos/pg-irc/pathways-backend/milestones/19/labels","id":3151955,"number":19,"title":"Sprint 28","description":"","creator":{"login":"rasmus-storjohann-PG","id":32307781,"avatar_url":"https://avatars0.githubusercontent.com/u/32307781?v=4","gravatar_id":"","url":"https://api.github.com/users/rasmus-storjohann-PG","html_url":"https://github.com/rasmus-storjohann-PG","followers_url":"https://api.github.com/users/rasmus-storjohann-PG/followers","following_url":"https://api.github.com/users/rasmus-storjohann-PG/following{/other_user}","gists_url":"https://api.github.com/users/rasmus-storjohann-PG/gists{/gist_id}","starred_url":"https://api.github.com/users/rasmus-storjohann-PG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasmus-storjohann-PG/subscriptions","organizations_url":"https://api.github.com/users/rasmus-storjohann-PG/orgs","repos_url":"https://api.github.com/users/rasmus-storjohann-PG/repos","events_url":"https://api.github.com/users/rasmus-storjohann-PG/events{/privacy}","received_events_url":"https://api.github.com/users/rasmus-storjohann-PG/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2018-02-28T22:49:39Z","updated_at":"2018-02-28T22:50:08Z","due_on":"2018-03-07T08:00:00Z","closed_at":null},"comments":6,"created_at":"2018-01-15T15:43:22Z","updated_at":"2018-03-07T21:35:18Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"See main story #163\r\n\r\nWe assume that the client needs information about services, ranked by the services' respective locations' distance to a reference point provided in the query. There is a many2many relationship between services and locations, meaning that there are many proximity values for a given service. Also, the client is probably interested in information about both the services and the locations. It follows that the return type from this end point should not be an array of Services, but rather a array of objects that contain information from both a service and a location. This leads naturally to a distinct service end point supporting proximity search.\r\n\r\n`/services_at_location/` supports proximity sorting as well as all the same filter functionality as `/services/`. However, sorting by proximity and some other field using `sort_by` in the same request is not supported: It does not make sense to sort both by proximity and any other field, since the probability that any two locations will have exactly the same proximity value is low. (Except when multiple services are offered at the same location, hmmm.) This API returns a list of ServiceAtLocation objects that contains data from both the service and location records. \r\n\r\nACs:\r\n* `/services_at_location/?proximity=-123.456,+23.45`, returns an array of ServiceAtLocation with the service name and location name in the default language\r\n* Support filtering consistent with the `/services/` endpoint: `/services_at_location/?proximity=-123.456,+23.45&search=foobar&taxonomy=foo.bar&page=2&per_page=25`. This will probably involve porting the existing taxonomy work to be a filter\r\n* `/locations/{id}/services_at_location/` returns all the services at a given location, sorting by proximity doesn't make sense in this context, but is it invalid? It's similar to `/locations/{id}/services/` but except that it returns ServiceAtLocation.\r\n* `/services/{id}/services_at_location/?proximity=-123.456,+23.45` returns all the locations for a given service, here sorting by proximity does make sense. It is similar to `/services/{id}/locations/`, except that it returns ServiceAtLocation and supports proximity sort.\r\n* `/locations/{id}/services/{id}/services_at_location/` and `/services/{id}/locations/{id}/services_at_location/` return information about a given service at a given location. It returns one object of type ServiceAtLocation, not an array. It is similar to `/locations/{id}/services/{id}` and `/services/{id}/locations/{id}` except for the return type.\r\n"},"comment":{"url":"https://api.github.com/repos/pg-irc/pathways-backend/issues/comments/371293167","html_url":"https://github.com/pg-irc/pathways-backend/issues/170#issuecomment-371293167","issue_url":"https://api.github.com/repos/pg-irc/pathways-backend/issues/170","id":371293167,"user":{"login":"bensinjin","id":3228323,"avatar_url":"https://avatars2.githubusercontent.com/u/3228323?v=4","gravatar_id":"","url":"https://api.github.com/users/bensinjin","html_url":"https://github.com/bensinjin","followers_url":"https://api.github.com/users/bensinjin/followers","following_url":"https://api.github.com/users/bensinjin/following{/other_user}","gists_url":"https://api.github.com/users/bensinjin/gists{/gist_id}","starred_url":"https://api.github.com/users/bensinjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensinjin/subscriptions","organizations_url":"https://api.github.com/users/bensinjin/orgs","repos_url":"https://api.github.com/users/bensinjin/repos","events_url":"https://api.github.com/users/bensinjin/events{/privacy}","received_events_url":"https://api.github.com/users/bensinjin/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T21:35:18Z","updated_at":"2018-03-07T21:35:18Z","author_association":"CONTRIBUTOR","body":"Right - is there a sensible way to test our Swagger documentation?"}}
{"actor":{"display_login":"bensinjin"}}