useshortcut / shortcut-client-js

The official JavaScript client library for the Shortcut (formerly Clubhouse) REST API.
https://useshortcut.github.io/shortcut-client-js/
133 stars 31 forks source link

How can I get a `project-public-id`? #35

Closed jpsear closed 3 years ago

jpsear commented 5 years ago

In order to retrieve stories (https://github.com/clubhouse/clubhouse-lib/blob/master/src/index.js#L180) I need a project-public-id, as noted in the REST API docs: https://clubhouse.io/api/rest/v2/#List-Stories.

Unfortunately, listProjects, does not return this. How can I obtain the project-public-id?

jpsear commented 5 years ago

Unless it's the incremental IDs returned with projects? 1, 2, 3, 4 etc? Feels like there could somehow be a clash :/

tobias commented 5 years ago

Hi @jpsear - the id returned for each project is indeed the project-public-id.

What do you mean by a clash in this case?

jpsear commented 5 years ago

Yep cool, just tried the API and that works for me.

I was guessing by the name that it was a potentially "publicly" shareable ID that might form a URL or something.

In any case, it's not a unique identifier, just an internal identifier (relative to the workspace?)

I'm integrating with Clubhouse and I don't actually have a unique way of identifying a project within my app. I can't verify the uniqueness of a project based on an API token, as a workspace could have multiple of these. I can't search across all projects (which could be cross-team / organisation / workspace) as the project IDs aren't globally unique.

How might I return all stories for a workspace regardless of project?

charpeni commented 3 years ago

I'm cleaning up active issues right now and I'll close this one for inactivity since it's almost 2 years old.

If you think this issue should stay open, feel free to reopen it and ping me on it.