Skip to content

Commit

Permalink
Fix /api/repos/move documentation in api.md (#1095)
Browse files Browse the repository at this point in the history
* Fix `/api/repos/move` documentation in api.md

Related to huggingface/huggingface_hub#1813.

In `/api/repos/move`, we (I? 😄) forgot to mention the `type` parameter to specify the repo type.

cc @enzostvs you would have to update the API Playground as well to add this parameter. Thanks in advance!

* patch
  • Loading branch information
Wauplin authored Nov 14, 2023
1 parent 2fcc57f commit f5e0bc8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/hub/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Payload:

```js
payload = {
"type":"type",
"type":"model",
"name":"name",
"organization": "organization",
"private":"private",
Expand All @@ -193,7 +193,7 @@ Payload:

```js
payload = {
"type": "type",
"type": "model",
"name": "name",
"organization": "organization",
}
Expand All @@ -219,12 +219,18 @@ This is equivalent to `huggingface_hub.update_repo_visibility()`.

Move a repository (rename within the same namespace or transfer from user to organization).

Parameters:
- `fromRepo`: repo to rename.
- `toRepo`: new name of the repo.
- `type`: Type of repo (dataset or space; model by default).

Payload:

```js
payload = {
"fromRepo" : "namespace/repo_name",
"toRepo" : "namespace2/repo_name2"
"toRepo" : "namespace2/repo_name2",
"type": "model",
}
```

Expand Down

0 comments on commit f5e0bc8

Please sign in to comment.