Skip to content

Commit

Permalink
Add support for pagination to lists of files
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemessick committed Apr 23, 2024
1 parent 3b669d7 commit ddda962
Show file tree
Hide file tree
Showing 9 changed files with 543 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ target/

#Ipython Notebook
.ipynb_checkpoints

# Rider
.idea
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ We use [hatch](https://hatch.pypa.io) to manage this project.

Follow these [instructions](https://hatch.pypa.io/latest/install/) to install it.

If you are working in a managed environment, you may want to use `pipx`. If it isn't already installed
try `sudo apt install pipx`. Then you should be able to proceed with `pipx install hatch`.

### Dependencies

```sh
Expand Down
157 changes: 157 additions & 0 deletions src/KaggleSwagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,17 @@ paths:
required: true
type: string
description: Competition name
- in: query
name: pageToken
required: false
type: string
description: Page token for pagination
- in: query
name: pageSize
required: false
type: integer
default: 20
description: Number of items per page (default 20)
responses:
200:
description: Result
Expand Down Expand Up @@ -462,6 +473,16 @@ paths:
required: false
type: string
description: Dataset version number
- in: query
name: pageToken
required: false
type: string
description: Page token for pagination
- in: query
name: pageSize
required: false
type: integer
description: Number of items per page (default 20)
responses:
200:
description: Result
Expand Down Expand Up @@ -753,6 +774,48 @@ paths:
description: Error
schema:
$ref: "#/definitions/Error"
/kernels/files:
get:
tags:
- kaggle
summary: List kernel files
operationId: KernelsListFiles
produces:
- application/json
parameters:
- in: query
name: userName
required: true
type: string
description: Kernel owner
- in: query
name: kernelSlug
required: true
type: string
description: Kernel name
- in: query
name: kernelVersionNumber
required: false
type: string
description: Kernel version number
- in: query
name: pageSize
type: integer
default: 1
description: Page size
- in: query
name: pageToken
type: string
description: Page token for pagination
responses:
200:
description: Result
schema:
$ref: "#/definitions/Result"
default:
description: Error
schema:
$ref: "#/definitions/Error"
/kernels/push:
post:
tags:
Expand Down Expand Up @@ -988,6 +1051,48 @@ paths:
name: owner
type: string
description: Display models by a specific user or organization
- in: query
name: pageSize
type: integer
default: 20
description: Page size
- in: query
name: pageToken
type: string
description: Page token for pagination
responses:
200:
description: Result
schema:
$ref: "#/definitions/Result"
default:
description: Error
schema:
$ref: "#/definitions/Error"
/models/list/{ownerSlug}/{datasetSlug}:
get:
tags:
- kaggle
summary: List model files
operationId: ModelsListFiles
produces:
- application/json
parameters:
- in: path
name: ownerSlug
required: true
type: string
description: Model owner
- in: path
name: modelSlug
required: true
type: string
description: Model name
- in: query
name: modelVersionNumber
required: false
type: string
description: Model version number
- in: query
name: pageSize
type: integer
Expand Down Expand Up @@ -1394,6 +1499,58 @@ paths:
description: Error
schema:
$ref: "#/definitions/Error"
/models/{ownerSlug}/{modelSlug}/{framework}/{instanceSlug}/{versionNumber}/files:
get:
tags:
- kaggle
summary: List model instance version files
operationId: ModelInstanceVersionsFiles
produces:
- application/json
parameters:
- in: path
name: ownerSlug
required: true
type: string
description: Model owner
- in: path
name: modelSlug
required: true
type: string
description: Model name
- in: path
name: framework
required: true
type: string
description: Model instance framework
- in: path
name: instanceSlug
required: true
type: string
description: Model instance slug
- in: path
name: versionNumber
required: true
type: string
description: Model instance version number
- in: query
name: pageSize
type: integer
default: 1
description: Page size
- in: query
name: pageToken
type: string
description: Page token for pagination
responses:
200:
description: Result
schema:
$ref: "#/definitions/Result"
default:
description: Error
schema:
$ref: "#/definitions/Error"
/blobs/upload:
post:
tags:
Expand Down
Loading

0 comments on commit ddda962

Please sign in to comment.