snyk-labs / pysnyk

A Python client for the Snyk API.
https://snyk.docs.apiary.io/
MIT License
85 stars 116 forks source link

Slug and url properties are missing from organizations #118

Closed nmbro closed 2 years ago

nmbro commented 3 years ago

Both slug and url are exposed in the api from snyk: https://snyk.docs.apiary.io/#reference/organizations/the-snyk-organization-for-a-request/list-all-the-organizations-a-user-belongs-to and https://snyk.docs.apiary.io/#reference/groups/list-all-organizations-in-a-group/list-all-organizations-in-a-group

{
  "orgs": [
    {
      "name": "defaultOrg",
      "id": "689ce7f9-7943-4a71-b704-2ba575f01089",
      "slug": "default-org",
      "url": "https://api.snyk.io/org/default-org",
      "group": null
    },
    {
      "name": "My Other Org",
      "id": "a04d9cbd-ae6e-44af-b573-0556b0ad4bd2",
      "slug": "my-other-org",
      "url": "https://api.snyk.io/org/my-other-org",
      "group": {
        "name": "ACME Inc.",
        "id": "a060a49f-636e-480f-9e14-38e773b2a97f"
      }
    }
  ]
}

I ran into a use-case where I would put the direct link back to an organization, but realized that I couldn't link directly to the id, and I'm guessing that's what the slug is for, but unfortunately it wasn't exposed in pysnyk.