aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat-openapi/README.md
blob: acb0fbc298bbe4b566c10c99ad637a84d0547ec6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# Rust API for fatcat-openapi

Fatcat is a scalable, versioned, API-oriented catalog of bibliographic
entities and file metadata.


## Overview

This client/server was generated by the [openapi-generator]
(https://openapi-generator.tech) project.  By using the
[OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote
server, you can easily generate a server stub.

To see how to make this your own, look here:

[README]((https://openapi-generator.tech))

- API version: 0.3.3
- Build date: 2021-02-02T11:39:37.681488-08:00[America/Los_Angeles]

For more information, please visit [https://fatcat.wiki](https://fatcat.wiki)

This autogenerated project defines an API crate `fatcat-openapi` which contains:
* An `Api` trait defining the API in Rust.
* Data types representing the underlying data model.
* A `Client` type which implements `Api` and issues HTTP requests for each operation.
* A router which accepts HTTP requests and invokes the appropriate `Api` method for each operation.

It also contains an example server and client which make use of `fatcat-openapi`:

* The example server starts up a web server using the `fatcat-openapi`
    router, and supplies a trivial implementation of `Api` which returns failure
    for every operation.
* The example client provides a CLI which lets you invoke
    any single operation on the `fatcat-openapi` client by passing appropriate
    arguments on the command line.

You can use the example server and client as a basis for your own code.
See below for [more detail on implementing a server](#writing-a-server).

## Examples

Run examples with:

```
cargo run --example <example-name>
```

To pass in arguments to the examples, put them after `--`, for example:

```
cargo run --example client -- --help
```

### Running the example server
To run the server, follow these simple steps:

```
cargo run --example server
```

### Running the example client
To run a client, follow one of the following simple steps:

```
cargo run --example client AcceptEditgroup
cargo run --example client AuthCheck
cargo run --example client CreateAuthToken
cargo run --example client DeleteContainer
cargo run --example client DeleteContainerEdit
cargo run --example client DeleteCreator
cargo run --example client DeleteCreatorEdit
cargo run --example client DeleteFile
cargo run --example client DeleteFileEdit
cargo run --example client DeleteFileset
cargo run --example client DeleteFilesetEdit
cargo run --example client DeleteRelease
cargo run --example client DeleteReleaseEdit
cargo run --example client DeleteWebcapture
cargo run --example client DeleteWebcaptureEdit
cargo run --example client DeleteWork
cargo run --example client DeleteWorkEdit
cargo run --example client GetChangelog
cargo run --example client GetChangelogEntry
cargo run --example client GetContainer
cargo run --example client GetContainerEdit
cargo run --example client GetContainerHistory
cargo run --example client GetContainerRedirects
cargo run --example client GetContainerRevision
cargo run --example client GetCreator
cargo run --example client GetCreatorEdit
cargo run --example client GetCreatorHistory
cargo run --example client GetCreatorRedirects
cargo run --example client GetCreatorReleases
cargo run --example client GetCreatorRevision
cargo run --example client GetEditgroup
cargo run --example client GetEditgroupAnnotations
cargo run --example client GetEditgroupsReviewable
cargo run --example client GetEditor
cargo run --example client GetEditorAnnotations
cargo run --example client GetEditorEditgroups
cargo run --example client GetFile
cargo run --example client GetFileEdit
cargo run --example client GetFileHistory
cargo run --example client GetFileRedirects
cargo run --example client GetFileRevision
cargo run --example client GetFileset
cargo run --example client GetFilesetEdit
cargo run --example client GetFilesetHistory
cargo run --example client GetFilesetRedirects
cargo run --example client GetFilesetRevision
cargo run --example client GetRelease
cargo run --example client GetReleaseEdit
cargo run --example client GetReleaseFiles
cargo run --example client GetReleaseFilesets
cargo run --example client GetReleaseHistory
cargo run --example client GetReleaseRedirects
cargo run --example client GetReleaseRevision
cargo run --example client GetReleaseWebcaptures
cargo run --example client GetWebcapture
cargo run --example client GetWebcaptureEdit
cargo run --example client GetWebcaptureHistory
cargo run --example client GetWebcaptureRedirects
cargo run --example client GetWebcaptureRevision
cargo run --example client GetWork
cargo run --example client GetWorkEdit
cargo run --example client GetWorkHistory
cargo run --example client GetWorkRedirects
cargo run --example client GetWorkReleases
cargo run --example client GetWorkRevision
cargo run --example client LookupContainer
cargo run --example client LookupCreator
cargo run --example client LookupFile
cargo run --example client LookupRelease
```

### HTTPS
The examples can be run in HTTPS mode by passing in the flag `--https`, for example:

```
cargo run --example server -- --https
```

This will use the keys/certificates from the examples directory. Note that the
server chain is signed with `CN=localhost`.

## Using the generated library

The generated library has a few optional features that can be activated through Cargo.

* `server`
    * This defaults to enabled and creates the basic skeleton of a server implementation based on hyper
    * To create the server stack you'll need to provide an implementation of the API trait to provide the server function.
* `client`
    * This defaults to enabled and creates the basic skeleton of a client implementation based on hyper
    * The constructed client implements the API trait by making remote API call.
* `conversions`
    * This defaults to disabled and creates extra derives on models to allow "transmogrification" between objects of structurally similar types.

See https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section for how to use features in your `Cargo.toml`.

## Documentation for API Endpoints

All URIs are relative to *https://api.fatcat.wiki/v0*

Method | HTTP request | Description
------------- | ------------- | -------------
[**accept_editgroup**](docs/default_api.md#accept_editgroup) | **POST** /editgroup/{editgroup_id}/accept | 
[**auth_check**](docs/default_api.md#auth_check) | **GET** /auth/check | 
[**auth_oidc**](docs/default_api.md#auth_oidc) | **POST** /auth/oidc | 
[**create_auth_token**](docs/default_api.md#create_auth_token) | **POST** /auth/token/{editor_id} | 
[**create_container**](docs/default_api.md#create_container) | **POST** /editgroup/{editgroup_id}/container | 
[**create_container_auto_batch**](docs/default_api.md#create_container_auto_batch) | **POST** /editgroup/auto/container/batch | 
[**create_creator**](docs/default_api.md#create_creator) | **POST** /editgroup/{editgroup_id}/creator | 
[**create_creator_auto_batch**](docs/default_api.md#create_creator_auto_batch) | **POST** /editgroup/auto/creator/batch | 
[**create_editgroup**](docs/default_api.md#create_editgroup) | **POST** /editgroup | 
[**create_editgroup_annotation**](docs/default_api.md#create_editgroup_annotation) | **POST** /editgroup/{editgroup_id}/annotation | 
[**create_file**](docs/default_api.md#create_file) | **POST** /editgroup/{editgroup_id}/file | 
[**create_file_auto_batch**](docs/default_api.md#create_file_auto_batch) | **POST** /editgroup/auto/file/batch | 
[**create_fileset**](docs/default_api.md#create_fileset) | **POST** /editgroup/{editgroup_id}/fileset | 
[**create_fileset_auto_batch**](docs/default_api.md#create_fileset_auto_batch) | **POST** /editgroup/auto/fileset/batch | 
[**create_release**](docs/default_api.md#create_release) | **POST** /editgroup/{editgroup_id}/release | 
[**create_release_auto_batch**](docs/default_api.md#create_release_auto_batch) | **POST** /editgroup/auto/release/batch | 
[**create_webcapture**](docs/default_api.md#create_webcapture) | **POST** /editgroup/{editgroup_id}/webcapture | 
[**create_webcapture_auto_batch**](docs/default_api.md#create_webcapture_auto_batch) | **POST** /editgroup/auto/webcapture/batch | 
[**create_work**](docs/default_api.md#create_work) | **POST** /editgroup/{editgroup_id}/work | 
[**create_work_auto_batch**](docs/default_api.md#create_work_auto_batch) | **POST** /editgroup/auto/work/batch | 
[**delete_container**](docs/default_api.md#delete_container) | **DELETE** /editgroup/{editgroup_id}/container/{ident} | 
[**delete_container_edit**](docs/default_api.md#delete_container_edit) | **DELETE** /editgroup/{editgroup_id}/container/edit/{edit_id} | 
[**delete_creator**](docs/default_api.md#delete_creator) | **DELETE** /editgroup/{editgroup_id}/creator/{ident} | 
[**delete_creator_edit**](docs/default_api.md#delete_creator_edit) | **DELETE** /editgroup/{editgroup_id}/creator/edit/{edit_id} | 
[**delete_file**](docs/default_api.md#delete_file) | **DELETE** /editgroup/{editgroup_id}/file/{ident} | 
[**delete_file_edit**](docs/default_api.md#delete_file_edit) | **DELETE** /editgroup/{editgroup_id}/file/edit/{edit_id} | 
[**delete_fileset**](docs/default_api.md#delete_fileset) | **DELETE** /editgroup/{editgroup_id}/fileset/{ident} | 
[**delete_fileset_edit**](docs/default_api.md#delete_fileset_edit) | **DELETE** /editgroup/{editgroup_id}/fileset/edit/{edit_id} | 
[**delete_release**](docs/default_api.md#delete_release) | **DELETE** /editgroup/{editgroup_id}/release/{ident} | 
[**delete_release_edit**](docs/default_api.md#delete_release_edit) | **DELETE** /editgroup/{editgroup_id}/release/edit/{edit_id} | 
[**delete_webcapture**](docs/default_api.md#delete_webcapture) | **DELETE** /editgroup/{editgroup_id}/webcapture/{ident} | 
[**delete_webcapture_edit**](docs/default_api.md#delete_webcapture_edit) | **DELETE** /editgroup/{editgroup_id}/webcapture/edit/{edit_id} | 
[**delete_work**](docs/default_api.md#delete_work) | **DELETE** /editgroup/{editgroup_id}/work/{ident} | 
[**delete_work_edit**](docs/default_api.md#delete_work_edit) | **DELETE** /editgroup/{editgroup_id}/work/edit/{edit_id} | 
[**get_changelog**](docs/default_api.md#get_changelog) | **GET** /changelog | 
[**get_changelog_entry**](docs/default_api.md#get_changelog_entry) | **GET** /changelog/{index} | 
[**get_container**](docs/default_api.md#get_container) | **GET** /container/{ident} | 
[**get_container_edit**](docs/default_api.md#get_container_edit) | **GET** /container/edit/{edit_id} | 
[**get_container_history**](docs/default_api.md#get_container_history) | **GET** /container/{ident}/history | 
[**get_container_redirects**](docs/default_api.md#get_container_redirects) | **GET** /container/{ident}/redirects | 
[**get_container_revision**](docs/default_api.md#get_container_revision) | **GET** /container/rev/{rev_id} | 
[**get_creator**](docs/default_api.md#get_creator) | **GET** /creator/{ident} | 
[**get_creator_edit**](docs/default_api.md#get_creator_edit) | **GET** /creator/edit/{edit_id} | 
[**get_creator_history**](docs/default_api.md#get_creator_history) | **GET** /creator/{ident}/history | 
[**get_creator_redirects**](docs/default_api.md#get_creator_redirects) | **GET** /creator/{ident}/redirects | 
[**get_creator_releases**](docs/default_api.md#get_creator_releases) | **GET** /creator/{ident}/releases | 
[**get_creator_revision**](docs/default_api.md#get_creator_revision) | **GET** /creator/rev/{rev_id} | 
[**get_editgroup**](docs/default_api.md#get_editgroup) | **GET** /editgroup/{editgroup_id} | 
[**get_editgroup_annotations**](docs/default_api.md#get_editgroup_annotations) | **GET** /editgroup/{editgroup_id}/annotations | 
[**get_editgroups_reviewable**](docs/default_api.md#get_editgroups_reviewable) | **GET** /editgroup/reviewable | 
[**get_editor**](docs/default_api.md#get_editor) | **GET** /editor/{editor_id} | 
[**get_editor_annotations**](docs/default_api.md#get_editor_annotations) | **GET** /editor/{editor_id}/annotations | 
[**get_editor_editgroups**](docs/default_api.md#get_editor_editgroups) | **GET** /editor/{editor_id}/editgroups | 
[**get_file**](docs/default_api.md#get_file) | **GET** /file/{ident} | 
[**get_file_edit**](docs/default_api.md#get_file_edit) | **GET** /file/edit/{edit_id} | 
[**get_file_history**](docs/default_api.md#get_file_history) | **GET** /file/{ident}/history | 
[**get_file_redirects**](docs/default_api.md#get_file_redirects) | **GET** /file/{ident}/redirects | 
[**get_file_revision**](docs/default_api.md#get_file_revision) | **GET** /file/rev/{rev_id} | 
[**get_fileset**](docs/default_api.md#get_fileset) | **GET** /fileset/{ident} | 
[**get_fileset_edit**](docs/default_api.md#get_fileset_edit) | **GET** /fileset/edit/{edit_id} | 
[**get_fileset_history**](docs/default_api.md#get_fileset_history) | **GET** /fileset/{ident}/history | 
[**get_fileset_redirects**](docs/default_api.md#get_fileset_redirects) | **GET** /fileset/{ident}/redirects | 
[**get_fileset_revision**](docs/default_api.md#get_fileset_revision) | **GET** /fileset/rev/{rev_id} | 
[**get_release**](docs/default_api.md#get_release) | **GET** /release/{ident} | 
[**get_release_edit**](docs/default_api.md#get_release_edit) | **GET** /release/edit/{edit_id} | 
[**get_release_files**](docs/default_api.md#get_release_files) | **GET** /release/{ident}/files | 
[**get_release_filesets**](docs/default_api.md#get_release_filesets) | **GET** /release/{ident}/filesets | 
[**get_release_history**](docs/default_api.md#get_release_history) | **GET** /release/{ident}/history | 
[**get_release_redirects**](docs/default_api.md#get_release_redirects) | **GET** /release/{ident}/redirects | 
[**get_release_revision**](docs/default_api.md#get_release_revision) | **GET** /release/rev/{rev_id} | 
[**get_release_webcaptures**](docs/default_api.md#get_release_webcaptures) | **GET** /release/{ident}/webcaptures | 
[**get_webcapture**](docs/default_api.md#get_webcapture) | **GET** /webcapture/{ident} | 
[**get_webcapture_edit**](docs/default_api.md#get_webcapture_edit) | **GET** /webcapture/edit/{edit_id} | 
[**get_webcapture_history**](docs/default_api.md#get_webcapture_history) | **GET** /webcapture/{ident}/history | 
[**get_webcapture_redirects**](docs/default_api.md#get_webcapture_redirects) | **GET** /webcapture/{ident}/redirects | 
[**get_webcapture_revision**](docs/default_api.md#get_webcapture_revision) | **GET** /webcapture/rev/{rev_id} | 
[**get_work**](docs/default_api.md#get_work) | **GET** /work/{ident} | 
[**get_work_edit**](docs/default_api.md#get_work_edit) | **GET** /work/edit/{edit_id} | 
[**get_work_history**](docs/default_api.md#get_work_history) | **GET** /work/{ident}/history | 
[**get_work_redirects**](docs/default_api.md#get_work_redirects) | **GET** /work/{ident}/redirects | 
[**get_work_releases**](docs/default_api.md#get_work_releases) | **GET** /work/{ident}/releases | 
[**get_work_revision**](docs/default_api.md#get_work_revision) | **GET** /work/rev/{rev_id} | 
[**lookup_container**](docs/default_api.md#lookup_container) | **GET** /container/lookup | 
[**lookup_creator**](docs/default_api.md#lookup_creator) | **GET** /creator/lookup | 
[**lookup_file**](docs/default_api.md#lookup_file) | **GET** /file/lookup | 
[**lookup_release**](docs/default_api.md#lookup_release) | **GET** /release/lookup | 
[**update_container**](docs/default_api.md#update_container) | **PUT** /editgroup/{editgroup_id}/container/{ident} | 
[**update_creator**](docs/default_api.md#update_creator) | **PUT** /editgroup/{editgroup_id}/creator/{ident} | 
[**update_editgroup**](docs/default_api.md#update_editgroup) | **PUT** /editgroup/{editgroup_id} | 
[**update_editor**](docs/default_api.md#update_editor) | **PUT** /editor/{editor_id} | 
[**update_file**](docs/default_api.md#update_file) | **PUT** /editgroup/{editgroup_id}/file/{ident} | 
[**update_fileset**](docs/default_api.md#update_fileset) | **PUT** /editgroup/{editgroup_id}/fileset/{ident} | 
[**update_release**](docs/default_api.md#update_release) | **PUT** /editgroup/{editgroup_id}/release/{ident} | 
[**update_webcapture**](docs/default_api.md#update_webcapture) | **PUT** /editgroup/{editgroup_id}/webcapture/{ident} | 
[**update_work**](docs/default_api.md#update_work) | **PUT** /editgroup/{editgroup_id}/work/{ident} | 


## Documentation For Models

 - [AuthOidc](docs/AuthOidc.md)
 - [AuthOidcResult](docs/AuthOidcResult.md)
 - [AuthTokenResult](docs/AuthTokenResult.md)
 - [ChangelogEntry](docs/ChangelogEntry.md)
 - [ContainerAutoBatch](docs/ContainerAutoBatch.md)
 - [ContainerEntity](docs/ContainerEntity.md)
 - [CreatorAutoBatch](docs/CreatorAutoBatch.md)
 - [CreatorEntity](docs/CreatorEntity.md)
 - [Editgroup](docs/Editgroup.md)
 - [EditgroupAnnotation](docs/EditgroupAnnotation.md)
 - [EditgroupEdits](docs/EditgroupEdits.md)
 - [Editor](docs/Editor.md)
 - [EntityEdit](docs/EntityEdit.md)
 - [EntityHistoryEntry](docs/EntityHistoryEntry.md)
 - [ErrorResponse](docs/ErrorResponse.md)
 - [FileAutoBatch](docs/FileAutoBatch.md)
 - [FileEntity](docs/FileEntity.md)
 - [FileUrl](docs/FileUrl.md)
 - [FilesetAutoBatch](docs/FilesetAutoBatch.md)
 - [FilesetEntity](docs/FilesetEntity.md)
 - [FilesetFile](docs/FilesetFile.md)
 - [FilesetUrl](docs/FilesetUrl.md)
 - [ReleaseAbstract](docs/ReleaseAbstract.md)
 - [ReleaseAutoBatch](docs/ReleaseAutoBatch.md)
 - [ReleaseContrib](docs/ReleaseContrib.md)
 - [ReleaseEntity](docs/ReleaseEntity.md)
 - [ReleaseExtIds](docs/ReleaseExtIds.md)
 - [ReleaseRef](docs/ReleaseRef.md)
 - [Success](docs/Success.md)
 - [WebcaptureAutoBatch](docs/WebcaptureAutoBatch.md)
 - [WebcaptureCdxLine](docs/WebcaptureCdxLine.md)
 - [WebcaptureEntity](docs/WebcaptureEntity.md)
 - [WebcaptureUrl](docs/WebcaptureUrl.md)
 - [WorkAutoBatch](docs/WorkAutoBatch.md)
 - [WorkEntity](docs/WorkEntity.md)


## Documentation For Authorization

## Bearer
- **Type**: HTTP basic authentication

Example
```
```

## Author

webservices@archive.org