[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-23 Thread Michi Henning
** Changed in: unity-scopes-api (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1465675 Title: API needed to determine if App ID is a scope To manage notificati

[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-20 Thread James Henstridge
And if you're after one single scope, you can call get_metadata() rather than list(), checking for NotFoundException. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1465675 Title: API needed to deter

[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-19 Thread Michi Henning
Below is the source code for retrieving the list of all known scopes. Note that instantiating the runtime and tearing it down is moderately expensive, so you probably want to hang onto the runtime handle for the duration. Apply whatever pattern match is appropriate to the returned strings. Given t

Re: [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-19 Thread Ted Gould
Yes, we could get the information from click. But, then we wouldn't get things like the scopes that are installed on the image. I think it'd be better if the scope system provided a function instead of each of the services implementing it's own opinion of what is a scope. -- You received this bug

[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-19 Thread James Henstridge
Are you sure you can't click for this information? Take the Youtube scope for instance, with a scope ID of "com.ubuntu.scopes.youtube_youtube". I can get the manifest for the package with: click info com.ubuntu.scopes.youtube Looking at the manifest, the hooks.youtube dict has a "scope" key

Re: [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Ted Gould
The URL dispatcher case is that it gets a URL that looks like this: scope://com.foo_bar I want to know whether to return an error on that URL because it is a scope that doesn't exist, or to pass it onto the dash. So it is really just testing that string to see if it is something that the dash wi

[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Michi Henning
tails of click packaging, I'm concerned because the scopes runtime has no business knowing about packaging. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1465675 Title: API needed to determine if Ap

[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Michi Henning
Maybe we are missing each other here. I'm trying to help. I'm just pointing out that there are some potential issues we should think about. It may well be that I don't have the complete picture... When you say "if a particular AppID is connected to a scope", I don't really know what you mean. All

Re: [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Ted Gould
I feel like your two points conflict ☺ If looking for a file on the filesystem won't work, then I can't ask click for the information as if it knew there was a scope there it'd be writing a file to the filesystem. That's basically what the scope click hook does. (symbolic link, but whatevs) Worst

[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Michi Henning
I have two concerns: - Just looking whether a file is installed somewhere isn't going to work. That's because the installation locations aren't fixed. For example, it's possible to run multiple scopes run times side-by-side on the same machine without having them interfere with each other, by chan

Re: [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-16 Thread Ted Gould
On Tue, 2015-06-16 at 23:50 +, Michi Henning wrote: > We currently don't have any concept of an app ID in the scopes run time, > except for one place, where we check whether a scope ID looks like > _. That's the case for scopes that are bundled with an > app into the same click. > > Is this w

[Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-16 Thread Michi Henning
We currently don't have any concept of an app ID in the scopes run time, except for one place, where we check whether a scope ID looks like _. That's the case for scopes that are bundled with an app into the same click. Is this what you mean? The easiest way to implement this would be to write a