Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Provide JSON-API for search #122

Open
stefan-niedermann opened this issue Feb 4, 2016 · 4 comments
Open

Provide JSON-API for search #122

stefan-niedermann opened this issue Feb 4, 2016 · 4 comments

Comments

@stefan-niedermann
Copy link

There should be an API for searching for addresses.
Otherwise every client would have to implement searching in contacts etc. itself. Providing an API would save every client much work.

@v1r0x
Copy link
Contributor

v1r0x commented Feb 4, 2016

There was an API, but didn't work for me anymore, so I removed it in #111 .
But bring it back could definitaly something for the 0.2 milestone. Currently we focus on the basic functionality, which IMO doesn't include such "advanced" stuff. Hope you can wait a bit for a solution.

@v1r0x v1r0x added this to the 0.2 – advanced stuff milestone Feb 4, 2016
@stefan-niedermann
Copy link
Author

No problem. I'd be interessted in developing an android client if the app is stable. (Does not make sense yet). I'll keep an eye on this project :) Happy coding

@Henni
Copy link
Contributor

Henni commented Feb 4, 2016

Maybe we can gather suggestions about what the API should offer.
@stefan-niedermann what should the API provide in your opinion?

@stefan-niedermann
Copy link
Author

Sure, this should be read as "WiP", just brainstorming.

Request

GET /search?q=<string>

Response

ownCloud Maps should search all reachable information in the ownCloud (especially from ownCloud Contacts, but maybe from ownCloud Calendar - Meetings in the near future?). And it should search osm via nominatim to get PoIs.
Mimetype: application/json

{
  /* Contacts from contacts app */
  contacts : [
      {
        firstname : <string>,
        lastname : <string>,
        address : {
          nr : <int>,
          street : <string>,
          plz : <int>,
          city : <string>
        },
        lat : <int>,
        long : <int>
      },
      ...
  ],
  /* Points of Interest (bars, clubs, toilets, buildings, ...) */
  poi : [
      {
        title : <string>,
        type : <string>, /* Enum? */
        address : {
          nr : <int>,
          street : <string>,
          plz : <int>,
          city : <string>
        },
        lat : <int>,
        long : <int>
      },
      ...
  ],
  /* Addresses from OSM search */
  addresses : [
    {
      /* Whatever the OSM JSON-API delivers ;-) */
    },
    ...
  ]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants