Skip to content
This repository was archived by the owner on Apr 22, 2021. It is now read-only.
This repository was archived by the owner on Apr 22, 2021. It is now read-only.

Update API to support multiple behaviors for a given url #11

@ikreymer

Description

@ikreymer

The idea is to support multiple variations of a behavior in an easy way, for example 'Instagram with Comments' and 'Instagram without Comments', and also allow the generic autoscroll behavior to be always available.

Perhaps update the API as follows:

  • Each behavior can have an optional 'rank' metadata, from say, 0 to 100 to indicate its ordering. The best behavior will have a rank of 100 (default). The generic autoscroll behavior will always have the lowest rank (0)
  • /info can return a list of behaviors that match a given regex, ordered from best to worst.
  • /behavior can return the best behavior by default, but also accept rank= query arg to return a different behavior, closest to that rank, eg. rank=0 would generally return the autoscroll behavior.

The rank will determine the order in which behaviors are shown to the user in the UI, so should avoid having same rank for two behaviors generally..

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions