Skip to content

Swagger API Docs

Madar Ádám edited this page Jul 3, 2022 · 3 revisions

OpenAPI definition v0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

user-controller

findUserById

GET /user/{userId}

Get User by id

Parameters

Name In Type Required Description
userId path integer(int64) true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "email": "string",
  "profilePictureLink": "string",
  "cacheFilesLink": "string"
}

Responses

Status Meaning Description Schema
200 OK OK UserInfoDto
404 Not Found User not found None
This operation does not require authentication

updateUser

PUT /user/{userId}

Update User

Body parameter

{
  "name": "string",
  "password": "string",
  "email": "string"
}

Parameters

Name In Type Required Description
userId path integer(int64) true none
body body UserUpdateDto true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "email": "string",
  "profilePictureLink": "string",
  "cacheFilesLink": "string"
}

Responses

Status Meaning Description Schema
200 OK OK UserInfoDto
404 Not Found User not found None
422 Unprocessable Entity The dto is not valid None
This operation does not require authentication

deleteUser

DELETE /user/{userId}

Delete User

Parameters

Name In Type Required Description
userId path integer(int64) true none

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found User not found None
This operation does not require authentication

getProfilePictureByUserId

GET /user/{userId}/profile_picture

Get User's profile picture by user id

Parameters

Name In Type Required Description
userId path integer(int64) true none

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found User not found None

Response Schema

This operation does not require authentication

updateUserProfilePicture

PUT /user/{userId}/profile_picture

Update User profile picture

Body parameter

file: string

Parameters

Name In Type Required Description
userId path integer(int64) true none
body body object false none
» file body string(binary) true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "email": "string",
  "profilePictureLink": "string",
  "cacheFilesLink": "string"
}

Responses

Status Meaning Description Schema
200 OK OK UserInfoDto
404 Not Found User not found None
This operation does not require authentication

listAllUsers

GET /user

Get all Users

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK OK string
This operation does not require authentication

createUser

POST /user

Create new User

Body parameter

file: string
userCreateDto:
  name: string
  password: string
  email: string

Parameters

Name In Type Required Description
body body object false none
» file body string(binary) true none
» userCreateDto body UserCreateDto true none
»» name body string true none
»» password body string true none
»» email body string true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "email": "string",
  "profilePictureLink": "string",
  "cacheFilesLink": "string"
}

Responses

Status Meaning Description Schema
200 OK OK UserInfoDto
422 Unprocessable Entity The dto is not valid None
This operation does not require authentication

findCacheFileByUserId

GET /user/{userId}/cache_files

Get contributed cache files of User by its id

Parameters

Name In Type Required Description
userId path integer(int64) true none

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK OK string
404 Not Found User not found None
This operation does not require authentication

game-controller

findGameById

GET /game/{gameId}

Get game by id

Parameters

Name In Type Required Description
gameId path integer(int64) true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "cacheFileName": "string",
  "incrementalCacheFileLink": "string",
  "incrementalCacheLastModified": "2019-08-24T14:15:22Z",
  "cacheFilesLink": "string",
  "steamId": 0
}

Responses

Status Meaning Description Schema
200 OK OK GameInfoDto
404 Not Found Game not found None
This operation does not require authentication

updateGame

PUT /game/{gameId}

Update Game

Body parameter

{
  "name": "string",
  "cacheFileName": "string",
  "steamId": 0
}

Parameters

Name In Type Required Description
gameId path integer(int64) true none
body body GameUpdateDto true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "cacheFileName": "string",
  "incrementalCacheFileLink": "string",
  "incrementalCacheLastModified": "2019-08-24T14:15:22Z",
  "cacheFilesLink": "string",
  "steamId": 0
}

Responses

Status Meaning Description Schema
200 OK OK GameInfoDto
404 Not Found Game not found None
422 Unprocessable Entity The dto is not valid None
This operation does not require authentication

deleteGame

DELETE /game/{gameId}

Delete game by its id

Parameters

Name In Type Required Description
gameId path integer(int64) true none

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found Game not found None
This operation does not require authentication

listAllGames

GET /game

Get all Games

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK OK string
This operation does not require authentication

createGame

POST /game

Create new Game

Body parameter

{
  "name": "string",
  "cacheFileName": "string",
  "steamId": 0
}

Parameters

Name In Type Required Description
body body GameCreateDto true none

Example responses

200 Response

{
  "id": 0,
  "name": "string",
  "cacheFileName": "string",
  "incrementalCacheFileLink": "string",
  "incrementalCacheLastModified": "2019-08-24T14:15:22Z",
  "cacheFilesLink": "string",
  "steamId": 0
}

Responses

Status Meaning Description Schema
200 OK OK GameInfoDto
422 Unprocessable Entity The dto is not valid None
This operation does not require authentication

getLatestIncrementalCacheFile

GET /game/{gameId}/incremental_cache_file

Get game's incremental cache file by game id

Parameters

Name In Type Required Description
gameId path integer(int64) true none

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found Game not found None

Response Schema

This operation does not require authentication

listCacheFilesForGameId

GET /game/{gameId}/cache_files

Get contributed cache files for game by game id

Parameters

Name In Type Required Description
gameId path integer(int64) true none

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK OK string
404 Not Found Game not found None
This operation does not require authentication

cache-file-controller

uploadCacheFile

POST /cache_file

Upload cache file

Body parameter

file: string
cacheFileUploadDto:
  uploaderId: 0
  gameId: 0

Parameters

Name In Type Required Description
body body object false none
» file body string(binary) true none
» cacheFileUploadDto body CacheFileUploadDto true none
»» uploaderId body integer(int64) true none
»» gameId body integer(int64) true none

Example responses

200 Response

{
  "id": 0,
  "uploadDateTime": "2019-08-24T14:15:22Z",
  "uploaderLink": "string",
  "gameLink": "string",
  "dataLink": "string"
}

Responses

Status Meaning Description Schema
200 OK OK CacheFileInfoDto
422 Unprocessable Entity The dto is not valid or the cache file is not valid or the cache file contains no new cache entries None
This operation does not require authentication

findCacheFileById

GET /cache_file/{cacheFileId}

Find cache file by its id

Parameters

Name In Type Required Description
cacheFileId path integer(int64) true none

Example responses

200 Response

{
  "id": 0,
  "uploadDateTime": "2019-08-24T14:15:22Z",
  "uploaderLink": "string",
  "gameLink": "string",
  "dataLink": "string"
}

Responses

Status Meaning Description Schema
200 OK OK CacheFileInfoDto
404 Not Found Cache file not found None
This operation does not require authentication

deleteCacheFile

DELETE /cache_file/{cacheFileId}

Delete cache file by its id

Parameters

Name In Type Required Description
cacheFileId path integer(int64) true none

Example responses

200 Response

{
  "id": 0,
  "uploadDateTime": "2019-08-24T14:15:22Z",
  "uploaderLink": "string",
  "gameLink": "string",
  "dataLink": "string"
}

Responses

Status Meaning Description Schema
200 OK OK CacheFileInfoDto
404 Not Found Cache file not found None
This operation does not require authentication

getCacheFileData

GET /cache_file/{cacheFileId}/data

Get cache file data by cache file id

Parameters

Name In Type Required Description
cacheFileId path integer(int64) true none

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found Cache file not found None

Response Schema

This operation does not require authentication

Schemas

UserUpdateDto

{
  "name": "string",
  "password": "string",
  "email": "string"
}

Properties

Name Type Required Restrictions Description
name string true none none
password string true none none
email string true none none

UserInfoDto

{
  "id": 0,
  "name": "string",
  "email": "string",
  "profilePictureLink": "string",
  "cacheFilesLink": "string"
}

Properties

Name Type Required Restrictions Description
id integer(int64) false none none
name string false none none
email string false none none
profilePictureLink string false none none
cacheFilesLink string false none none

GameUpdateDto

{
  "name": "string",
  "cacheFileName": "string",
  "steamId": 0
}

Properties

Name Type Required Restrictions Description
name string true none none
cacheFileName string true none none
steamId integer(int64) false none none

GameInfoDto

{
  "id": 0,
  "name": "string",
  "cacheFileName": "string",
  "incrementalCacheFileLink": "string",
  "incrementalCacheLastModified": "2019-08-24T14:15:22Z",
  "cacheFilesLink": "string",
  "steamId": 0
}

Properties

Name Type Required Restrictions Description
id integer(int64) false none none
name string false none none
cacheFileName string false none none
incrementalCacheFileLink string false none none
incrementalCacheLastModified string(date-time) false none none
cacheFilesLink string false none none
steamId integer(int64) false none none

UserCreateDto

{
  "name": "string",
  "password": "string",
  "email": "string"
}

Properties

Name Type Required Restrictions Description
name string true none none
password string true none none
email string true none none

GameCreateDto

{
  "name": "string",
  "cacheFileName": "string",
  "steamId": 0
}

Properties

Name Type Required Restrictions Description
name string true none none
cacheFileName string true none none
steamId integer(int64) false none none

CacheFileUploadDto

{
  "uploaderId": 0,
  "gameId": 0
}

Properties

Name Type Required Restrictions Description
uploaderId integer(int64) true none none
gameId integer(int64) true none none

CacheFileInfoDto

{
  "id": 0,
  "uploadDateTime": "2019-08-24T14:15:22Z",
  "uploaderLink": "string",
  "gameLink": "string",
  "dataLink": "string"
}

Properties

Name Type Required Restrictions Description
id integer(int64) false none none
uploadDateTime string(date-time) false none none
uploaderLink string false none none
gameLink string false none none
dataLink string false none none