Skip to content

Commit f5e0bc8

Browse files
authored
Fix /api/repos/move documentation in api.md (#1095)
* 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
1 parent 2fcc57f commit f5e0bc8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/hub/api.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Payload:
170170

171171
```js
172172
payload = {
173-
"type":"type",
173+
"type":"model",
174174
"name":"name",
175175
"organization": "organization",
176176
"private":"private",
@@ -193,7 +193,7 @@ Payload:
193193

194194
```js
195195
payload = {
196-
"type": "type",
196+
"type": "model",
197197
"name": "name",
198198
"organization": "organization",
199199
}
@@ -219,12 +219,18 @@ This is equivalent to `huggingface_hub.update_repo_visibility()`.
219219

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

222+
Parameters:
223+
- `fromRepo`: repo to rename.
224+
- `toRepo`: new name of the repo.
225+
- `type`: Type of repo (dataset or space; model by default).
226+
222227
Payload:
223228

224229
```js
225230
payload = {
226231
"fromRepo" : "namespace/repo_name",
227-
"toRepo" : "namespace2/repo_name2"
232+
"toRepo" : "namespace2/repo_name2",
233+
"type": "model",
228234
}
229235
```
230236

0 commit comments

Comments
 (0)