Skip to content

Commit

Permalink
V2 notifications oas spec
Browse files Browse the repository at this point in the history
V2 notifications oas spec
  • Loading branch information
Shreyaschorge authored Nov 1, 2023
2 parents 704ae25 + eddd54b commit 0bdfec7
Showing 1 changed file with 131 additions and 8 deletions.
139 changes: 131 additions & 8 deletions src/v2/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,6 @@ components:
nullable: true
author:
$ref: "#/components/schemas/User"
# oneOf:
# - $ref: '#/components/schemas/User'
# - type: object
# required:
# - fid
# properties:
# fid:
# type: string
text:
type: string
timestamp:
Expand Down Expand Up @@ -414,6 +406,7 @@ components:
- reactions
- replies
- thread_hash
- mentioned_profiles
properties:
reactions:
$ref: "#/components/schemas/CastWithInteractionsReactions"
Expand All @@ -422,6 +415,10 @@ components:
thread_hash:
type: string
nullable: true
mentioned_profiles:
type: array
items:
$ref: "#/components/schemas/User"
Signer:
type: object
required:
Expand Down Expand Up @@ -546,6 +543,86 @@ components:
type: array
items:
$ref: "#/components/schemas/FollowResponse"
NotificationsResponse:
type: object
required:
- notifications
- next
properties:
notifications:
type: array
items:
$ref: "#/components/schemas/Notification"
next:
$ref: "#/components/schemas/NextCursor"
Notification:
type: object
required:
- object
- most_recent_timestamp
- type
properties:
object:
type: string
most_recent_timestamp:
type: string
format: date-time
type:
type: string
enum:
- follows
- recasts
- likes
- mention
- reply
follows:
type: array
items:
$ref: "#/components/schemas/NotificationFollow"
cast:
$ref: "#/components/schemas/CastWithInteractions"
reactions:
type: array
items:
$ref: "#/components/schemas/NotificationReactions"
NotificationFollow:
type: object
required:
- object
- user
properties:
object:
type: string
enum:
- follow
user:
$ref: "#/components/schemas/User"
NotificationReactions:
type: object
required:
- object
- cast
- user
properties:
object:
type: string
enum:
- likes
- recasts
cast:
type: object
required:
- hash
- object
properties:
hash:
type: string
object:
type: string
enum:
- cast_dehydrated
user:
$ref: "#/components/schemas/User"

parameters:
ApiKey:
Expand Down Expand Up @@ -609,6 +686,11 @@ tags:
externalDocs:
description: More info about reaction
url: https://docs.neynar.com/reference/reaction-operations
- name: Notifications
description: Operations related to notifications
externalDocs:
description: More info about notifications
url: https://docs.neynar.com/reference/notifications-operations

paths:
/farcaster/signer:
Expand Down Expand Up @@ -1225,3 +1307,44 @@ paths:
$ref: "#/components/responses/403Response"
"500":
$ref: "#/components/responses/500Response"
/farcaster/notifications:
get:
tags:
- Notifications
summary: Retrieve notifications for a given user
description: Returns a list of notifications for a specific FID.
externalDocs:
url: https://docs.neynar.com/reference/notifications
operationId: notifications
parameters:
- $ref: "#/components/parameters/ApiKey"
- in: query
name: fid
required: true
schema:
type: integer
- name: cursor
in: query
description: Pagination cursor.
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to retrieve (default 25, max 50)
required: false
schema:
type: integer
default: 25
minimum: 1
maximum: 50
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/NotificationsResponse"
"400":
$ref: "#/components/responses/400Response"

0 comments on commit 0bdfec7

Please sign in to comment.