To create a custom API method you need to create an advanced behaviour rule with an API method criterion:
You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called edit
might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated.
You can call a custom API method in the same way as you would any other API method. For example, if you were to create an API method called edit
you would call it by opening the URL x-choosy://edit/http://www.example.com
(replacing http://www.example.com
with whatever URL you wanted the custom API method to apply to).
For more information on calling API methods, including code examples for various languages, see the API documentation on the Choosy web site.