radicle-registry icon indicating copy to clipboard operation
radicle-registry copied to clipboard

Filter project list by org or user

Open MeBrei opened this issue 4 years ago • 5 comments

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.

MeBrei avatar May 07 '20 07:05 MeBrei

Ideally it would be two separate client methods.

xla avatar May 07 '20 07:05 xla

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.

NunoAlexandre avatar May 07 '20 07:05 NunoAlexandre

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?

geigerzaehler avatar May 07 '20 08:05 geigerzaehler

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)

NunoAlexandre avatar May 07 '20 08:05 NunoAlexandre

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.

xla avatar May 07 '20 08:05 xla