Check what a script needs
/library/{author}/{slug}/requirementsLists what adding a script to your library would add with it: every script it reads, each with its status, and anything that is not shared with you. It changes nothing. Call it before Add to your library and show the person the list, as the app's Add to library dialog does.
Scope | Heavy call | Long poll | CLI |
|---|---|---|---|
| No | No |
|
Guidance
Another author's script runs only once it is in your library, and adding it adds the scripts it reads that you have not added yet. Adding never copies anything: each script stays its author's, picks up their edits, and you can remove it at any time.
confirmis exactly what to send asconfirmto Add to your library: every script inneedswith statusinstallable. Show the personmessageor theneedslist first, and add only if they agree.Anything in
cannot_addis not shared with you, and one entry is enough to stop the add. Only its kind and name come back, never who wrote it.root.statussays whether the add can happen at all. Onlyinstallablecan be added.owned,builtinandinstalledare usable already, and adding them changes nothing.A study's
root.statusisnot_installable: studies cannot be added to a library, and only your own run.A library entry is the live script, never a version, so
slug@Nis refused with400.The walk stops at 200 scripts.
truncatedis thentrueandneedsis a prefix.
Path parameters
Name | Type | Description |
|---|---|---|
| string | A username, |
| string | The script's slug, without |
Query parameters
Name | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | None |
|
Response
200 with the fields below.
Field | Type | Description |
|---|---|---|
| object | The script you asked about: |
| array of object | Every script it reads that you can have, each with |
| array of object | Every script it reads that is not shared with you, each with |
| boolean |
|
| array of string | The refs to send as |
| string | What the app would tell the person, ready to show |
Status codes
Status | Code | Meaning |
|---|---|---|
| - | What adding it would add |
|
| The path is not |
|
| No script by that author and slug that you can see |
|
| The author has more than one script with that slug. Add |
