Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TF-AP/Thing API] ThingFilter server attribute #50

Closed
ClaesNilsson opened this issue Dec 16, 2015 · 3 comments
Closed

[TF-AP/Thing API] ThingFilter server attribute #50

ClaesNilsson opened this issue Dec 16, 2015 · 3 comments

Comments

@ClaesNilsson
Copy link
Contributor

dictionary ThingFilter {
    attribute DOMString? type;
    attribute ThingProximity? proximity;
    attribute DOMString? id;
    attribute DOMString? server; 
};

So this is the address, URL, of a server containing a directory of "things", e.g. an IETF CoRE Resource Directory?

@ClaesNilsson ClaesNilsson changed the title ThingFilter server attribute [TF-AP/Thing API] ThingFilter server attribute Dec 16, 2015
@louaybassbouss
Copy link
Contributor

@ClaesNilsson after Nice F2F Meeting, we need to refine this more. We agreed that the filter parameters are different for various discovery technologies. I see these options on how we can proceed on this:

  • A new Filter class for each discovery Technology. This class may extend an abstract ThingFilter where we define generic parameters. Example: BleThingFilter, UPnPThingFilter, MdnsThingFilter, etc. and each of them defines its own filter parameters. The ThingRequest will still accept any subclass of the ThingFilter as Input.
  • A generic ThingFilter with vocabulary for each Discovery Technology. For example:
filter =  {
   "ble": {
       "proximity":  ...
   } ,
  "sparql": {
        "query": ...
  }
};

What do you think?

@h0ru5
Copy link
Contributor

h0ru5 commented Feb 16, 2016

I'm in favor of the first.

Considering an ThingFilter with two arguments such as type (here meaning the type of filter) and a config object (Map) would give us a simple interface and yet support also complex cases.

example:

let filter =  { "query" : "...", "endpoint" : "..." };

ThingRequest("sparql",filter).start().then( (things) => console.dir(things) );

let otherfilter = { "foo" : bar"" };

ThingRequest("somethingelse",otherfilter).start().then( (things) => console.dir(things) );

@egekorkan
Copy link
Contributor

Continuing at w3c/wot-scripting-api#226 . Closing

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

No branches or pull requests

4 participants