name: 'Discord User By snowflake Managment'
description: |-

  APIs to manage DiscordUser records.

  These endpoints can be used to identify/create DiscordUser records identified by the [snowflake](#snowflake) that already exists in the discord app.
endpoints:
  -
    httpMethods:
      - GET
    uri: 'api/v1/discord-user-by-snowflake/{discord_user_snowflake}'
    metadata:
      groupName: 'Discord User By snowflake Managment'
      groupDescription: |-

        APIs to manage DiscordUser records.

        These endpoints can be used to identify/create DiscordUser records identified by the [snowflake](#snowflake) that already exists in the discord app.
      subgroup: ''
      subgroupDescription: ''
      title: 'Get the DiscordUser identified by the specified snowflake.'
      description: |-
        Returns the [DiscordUser](#discorduser) record for the specified [snowflake](#snowflake), given in the url __discord_user_snowflake__ parameter.

        If it cannot be found, a [**404, Not Found**](#not-found-404) error is returned.
      authenticated: true
      custom: []
    headers:
      Authorization: 'Bearer {YOUR_AUTH_KEY}'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      discord_user_snowflake:
        name: discord_user_snowflake
        description: 'A valid [snowflake](#snowflake).'
        required: true
        example: '481398158916845568'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        custom: []
    cleanUrlParameters:
      discord_user_snowflake: '481398158916845568'
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses:
      -
        status: 200
        content: '{"data":{"id":42,"snowflake":"481398158916845568","user_name":"bigfootmcfly","global_name":"BigFoot McFly","locale":"hu_HU","timezone":"Europe\/Budapest"}}'
        headers: []
        description: success
        custom: []
      -
        status: 404
        content: '{"message":"Not Found."}'
        headers: []
        description: 'not found'
        custom: []
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer DWg0pwbKhoC45vSEKiY7o2fqyuawN4F1yCC6bbiYee795197'
    controller: null
    method: null
    route: null
    custom: []
  -
    httpMethods:
      - PUT
    uri: 'api/v1/discord-user-by-snowflake/{snowflake}'
    metadata:
      groupName: 'Discord User By snowflake Managment'
      groupDescription: |-

        APIs to manage DiscordUser records.

        These endpoints can be used to identify/create DiscordUser records identified by the [snowflake](#snowflake) that already exists in the discord app.
      subgroup: ''
      subgroupDescription: ''
      title: 'Get _OR_ Update/Create the DiscordUser identified by the specified snowflake.'
      description: |-
        If the record specified by the url __discord_user_snowflake__ parameter exists, it will be updated with the data provided in the body of the request.

        If it does not exists, it will be created using the given data.

        Returns the **updated/created** [DiscordUser](#discorduser) record.

        If anything goes wrong, a [**422, Unprocessable Content**](#unprocessable-content-422) error with more details will be returned.
      authenticated: true
      custom: []
    headers:
      Authorization: 'Bearer {YOUR_AUTH_KEY}'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      snowflake:
        name: snowflake
        description: 'A valid [snowflake](#snowflake).'
        required: true
        example: '481398158916845568'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        custom: []
    cleanUrlParameters:
      snowflake: '481398158916845568'
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      snowflake:
        name: snowflake
        description: 'A valid [snowflake](#snowflake).'
        required: true
        example: '481398158916845568'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        custom: []
      user_name:
        name: user_name
        description: 'The user_name registered in Discord.'
        required: false
        example: bigfootmcfly
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        custom: []
      global_name:
        name: global_name
        description: 'The global_name registered in Discord.'
        required: false
        example: 'BigFoot McFly'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        custom: []
      avatar:
        name: avatar
        description: 'The avatar url registered in Discord.'
        required: false
        example: null
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: true
        custom: []
      locale:
        name: locale
        description: 'A valid [locale](#locale).'
        required: false
        example: en_GB
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        custom: []
      timezone:
        name: timezone
        description: 'A valid [time zone](#timezone).'
        required: false
        example: Europe/London
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        custom: []
    cleanBodyParameters:
      snowflake: '481398158916845568'
      user_name: bigfootmcfly
      global_name: 'BigFoot McFly'
      locale: en_GB
      timezone: Europe/London
    fileParameters: []
    responses:
      -
        status: 200
        content: '{"data":{"id":42,"snowflake":"481398158916845568","user_name":"bigfootmcfly","global_name":"BigFoot McFly","locale":"en_GB","timezone":"Europe\/London"},"changes":{"locale":{"old":"hu_HU","new":"en_GB"},"timezone":{"old":"Europe\/Budapest","new":"Europe\/London"}}}'
        headers: []
        description: success
        custom: []
      -
        status: 422
        content: '{"errors":{"snowflake":["The snowflake field is required."]}}'
        headers: []
        description: 'Unprocessable Content'
        custom: []
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer DWg0pwbKhoC45vSEKiY7o2fqyuawN4F1yCC6bbiYee795197'
    controller: null
    method: null
    route: null
    custom: []
