> ## Documentation Index
> Fetch the complete documentation index at: https://andcze.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Zaktualizuj liczbę graczy



## OpenAPI

````yaml /openapi.pl.json post /api/v2/servers/{shopId}/servers/{serverId}/player-count
openapi: 3.0.0
info:
  title: ItemShop v2 API
  description: >-
    REST API platformy ItemShop v2 (NestJS + Fastify). Wszystkie ścieżki mają
    prefiks /api/v2.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.itemshop.dev
    description: Produkcja
  - url: http://localhost:3000
    description: Lokalnie
security: []
tags: []
paths:
  /api/v2/servers/{shopId}/servers/{serverId}/player-count:
    post:
      tags:
        - Servers
      summary: Zaktualizuj liczbę graczy
      operationId: ServerController_updatePlayerCount
      parameters:
        - name: shopId
          required: true
          in: path
          schema:
            type: string
          description: ID sklepu (ObjectId)
        - name: serverId
          required: true
          in: path
          schema:
            type: string
          description: ID serwera (ObjectId)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlayerCountDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                  message:
                    type: string
        '201':
          description: ''
        '401':
          description: Brak/niepoprawne uwierzytelnienie
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Brak uprawnień / dostępu
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Nie znaleziono
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Przekroczony limit żądań
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    PlayerCountDto:
      type: object
      properties:
        online:
          type: number
          minimum: 0
          description: Graczy online
          example: 42
        max:
          type: number
          minimum: 0
          description: Maksymalna liczba graczy
          example: 100
        players:
          description: Nicki graczy online (opcjonalnie)
          type: array
          items:
            type: string
      required:
        - online
        - max
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
          example: 400
        error:
          type: string
          example: Komunikat błędu
        timestamp:
          type: string
          format: date-time
        path:
          type: string
          example: /api/v2/...
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````