elementary / contractor

A desktop-wide extension service used by elementary OS
https://elementary.io
GNU General Public License v3.0
31 stars 11 forks source link

documentation anywhere?? #16

Closed curioussavage closed 6 years ago

curioussavage commented 7 years ago

Is there any documentation anywhere about the api exposed by this service?

the existing entry in the 'human interface guidelines is all I found but It is very unhelpful.

for the curious:

Contractor

Contractor is a service and a protocol for exposing services easily between apps. It lets apps interact with other apps and services without hardcoded support for them. You simply add Contractor support, and then any service registered with Contractor is now available for your app to use. Your app can integrate with Contractor in two different ways:

Register one of its functions as a service that can be used from other apps
Implement the contractor menu or otherwise access contractor to receive a list of services that can handle the data your app manages
Displaying Results from Contractor

Contractor results are typically presented to users in menu form. Keep the following in mind when presenting Contractor results:

If the item acted upon is one of many items visible, such as in an icon view, be sure to display results in a way that is directly related to the item such as in a context menu.
If the item acted upon is the only item currently visible, such as a web page or a contact in Dexter, contractor can be displayed in a toolbar menu.
Never display the target app's name. The menu string is the intended display name for that app. Doing so can lead to redundant messages such as, "Set image as wallpaper (wallpaper)" and it is always irrelevant to a user's needs.
curioussavage commented 7 years ago

sorry - I found the docs here https://valadoc.org/granite/Granite.Services.ContractorProxy

A link to that from the entry in the interface guidelines and in the readme of this repo would be awesome.

curioussavage commented 7 years ago

On second look it seems that link is to a wrapper for the service.

danirabbit commented 7 years ago

Closing since OP submitted a PR to fix this issue

matzipan commented 7 years ago

The PR was closed as invalid since he commented that the link is not correct

peteruithoven commented 6 years ago

That valadoc shouldn't really count as proper documentation I think? It for example doesn't mention:

The following stack exchange answers might contain a start:

jeremypw commented 6 years ago

I am going to close this for now as at least some documentation and examples are provided in the README.md file now. There is no clear end point for this issue. Any suggestions for particular further documentation can be raised as separate issues

peteruithoven commented 6 years ago

Another issue on documenting contract files in the developer documentation: https://github.com/elementary/website/issues/936