Skip to content

Commit

Permalink
add GET /api/v1/images
Browse files Browse the repository at this point in the history
  • Loading branch information
jkawamoto committed Apr 15, 2023
1 parent a58e164 commit d40577e
Show file tree
Hide file tree
Showing 9 changed files with 1,134 additions and 1 deletion.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,29 @@ See the [API reference](https://github.com/civitai/civitai/wiki/REST-API-Referen
the details of parameters and responses.


### GetImages API
This example fetches 3 images and prints their usernames and URLs.

```go
func ExampleGetImages() {
ctx := context.Background()

res, err := client.Default.Operations.GetImages(
operations.NewGetImagesParamsWithContext(ctx).WithLimit(swag.Int64(3)))
if err != nil {
log.Fatal(err)
}

for _, v := range res.Payload.Items {
log.Println(v.Username, v.URL)
}
}
```

See the [API reference](https://github.com/civitai/civitai/wiki/REST-API-Reference#get-apiv1images) to find
the details of parameters and responses.


### GetModels API
This example fetches 3 models and prints their name, ID, and tags.

Expand Down
Loading

0 comments on commit d40577e

Please sign in to comment.