diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index 50bbc73dc..ee897301b 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -896,6 +896,42 @@ paths: - is_offensive '404': $ref: '#/components/responses/NotFound' + /users/{username}: + get: + tags: + - User Identity + summary: Get information about a user. + description: | + Retrieves a user by username. + + In case of being authenticated as the requested user, the `email` property will be visible, and the `num_list` count will also include a user's private lists. + + In case of being authenticated as the requested user, or a user's collection or wantlist is public, the `num_collection` and the `num_wantlist` properties will also be visible. + operationId: getUserProfile + parameters: + - $ref: '#/components/parameters/Username' + security: + - UserToken: [] + - ConsumerKeySecret: [] + - OAuth: [] + responses: + '200': + description: Successfully retrieved profile user information by a given username. + headers: + X-Discogs-RateLimit: + $ref: '#/components/headers/RateLimit' + X-Discogs-RateLimit-Used: + $ref: '#/components/headers/RateLimitUsed' + X-Discogs-RateLimit-Remaining: + $ref: '#/components/headers/RateLimitRemaining' + content: + application/json: + schema: + $ref: '#/components/schemas/UserProfile' + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalError' components: headers: Link: @@ -2085,6 +2121,164 @@ components: consumer_name: description: A name of an application a user utilizes to interacts with the service. type: string + UserProfile: + description: A type that represents a user profile. + allOf: + - $ref: '#/components/schemas/UserId' + - type: object + properties: + name: + description: A name of a user. + type: string + email: + description: An e-mail address of a user, if any. + type: string + format: email + profile: + description: A profile explanation of a user. + type: string + location: + description: A physical location of a user. + type: string + uri: + description: A URL to the resource of a user. + type: string + format: uri + home_page: + description: A URI to the home page of a user. + type: string + format: uri + registered: + description: A date and time a user registered to the service. + type: string + format: date-time + rank: + description: A number of rank of a user. + type: integer + curr_abbr: + description: A code of a currency used by a user in the marketplace. + type: string + minLength: 3 + maxLength: 3 + activated: + description: A flag that indicates whether a user is active or not. + type: boolean + marketplace_suspended: + description: A flag that indicates whether a user is suspended at the marketplace or not. + type: boolean + is_staff: + description: A flag that indicates whether a user is member of the staff at the service or not. + type: boolean + num_collection: + description: A number of items a user have in its collection. + type: integer + num_lists: + description: A number of list a user created. + type: integer + num_pending: + description: A number of items a user have in its pending list. + type: integer + num_for_sale: + description: A number of item a user have for sale in the marketplace. + type: integer + num_wantlist: + description: A number of items a user have in its want list, if any. + type: integer + rating_avg: + description: An average rating to the total of releases a user rated. + type: number + format: float + minimum: 0 + maximum: 5 + releases_contributed: + description: A number of releases that a user contributed information. + type: integer + releases_rated: + description: A number of release that a user rated. + type: integer + buyer_rating: + description: An average rating a user have in the marketplace as a buyer. + type: number + format: float + minimum: 0 + maximum: 100 + buyer_rating_stars: + description: A number of star rating a user have in the marketplace as a buyer. + type: integer + minimum: 0 + maximum: 5 + buyer_num_ratings: + description: A total number of ratings a user have in the marketplace as a buyer. + type: integer + seller_rating: + description: An average rating a user have in the marketplace as a seller. + type: number + format: float + minimum: 0 + maximum: 100 + seller_rating_stars: + description: A number of star rating a user have in the marketplace as a seller. + type: integer + minimum: 0 + maximum: 5 + seller_num_ratings: + description: A total number of ratings a user have in the marketplace as a seller. + type: integer + avatar_url: + description: A URL to the avatar of a user. + type: string + format: uri + banner_url: + description: A URL to th banner of a user. + type: string + format: uri + collection_fields_url: + description: A URL to the collection fields of a user. + type: string + format: uri + collection_folders_url: + description: A URL to the collection forlder of a user. + type: string + format: uri + inventory_url: + description: A URL to the inventory of a user. + type: string + format: uri + wantlist_url: + description: A URI to the want list of a user. + type: string + format: uri + required: + - activated + - avatar_url + - banner_url + - buyer_num_ratings + - buyer_rating + - buyer_rating_stars + - collection_fields_url + - collection_folders_url + - curr_abbr + - home_page + - inventory_url + - is_staff + - location + - marketplace_suspended + - name + - num_collection + - num_lists + - num_for_sale + - num_pending + - profile + - rating_avg + - rank + - registered + - releases_contributed + - releases_rated + - seller_num_ratings + - seller_rating + - seller_rating_stars + - uri + - wantlist_url Video: description: A type that represents a video. type: object