radicle-dev / radicle-registry

An experimental Substrate implementation of the Radicle Registry 📒
https://registry.radicle.xyz
GNU General Public License v3.0
33 stars 4 forks source link

Filter project list by org or user #432

Open MeBrei opened 4 years ago

MeBrei commented 4 years ago

In upstream, we want to show all projects registered under an org or user. Currently we use the list_org_projects function to get all projects and then filter by the org id. Then an additional call is needed to get Project to retrieve the project id as well.

Once #389 is in place it would be practical to have a registry endpoint for getting projects under an org or user directly.

xla commented 4 years ago

Ideally it would be two separate client methods.

NunoAlexandre commented 4 years ago

Ideally it would be two separate client methods.

So that you can have different handling lanes in the upstream or for some other reason? From our side, it would be fine to have a single method.

geigerzaehler commented 4 years ago

To get all projects for an org you can also fetch the org, look at the project names registered with that org, and then fetch the project by names. Would that work for you?

NunoAlexandre commented 4 years ago

and then fetch the project names.

Do you mean to fetch the projects by name? If so, you'd still have to specify the project holder id (org or user id)

xla commented 4 years ago

To get all projects for an org you can also fetch the org, look at the project names registered with that org, and then fetch the project by names. Would that work for you?

Technically yes, for ergonomics it would be better to assume we only have the id of the org/user and what to fetch the projects for them.