Closed jnovinger closed 9 years ago
I implemented the second option you suggested. Because the registry is unordered (dict
), it is ambiguous which provider might be used if multiple regex matches exist. In a subsequent commit I may change the dict
to a list
to ensure predictable ordering.
We need to grab oembed data and would prefer to do it ourselves using the providers in
micawber.providers.bootstrap_basic
.There are some services that don't provide endpoints (thinking of Facebook and Vine, in particular) or aren't defined in
bootstrap_basic
. We want to compose aProviderRegistry
instance which tries providers frombootstrap_basic
first, falling back to oembedio or Embedly if nothing is found.Our current (proposed) solution:
That seems a bit ... circuitous. So, here a couple of ways to provide composited
ProverRegistry
s that I can think of:1) use our proposed solution above, and note it in the docs, 2) allow the various
bootstrap_*
funcs to take an optionalregistry
argument that defaults toNone
, but is used if passed,3) Extract the hard coded endpoints in
bootstrap_basic
so that they're available to use by library users.Thoughts?