Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GET frame/notification_tokens [NEYN-3953] #269

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion src/v2/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: Farcaster API V2
version: "2.5.0"
version: "2.6.0"
description: >
The Farcaster API allows you to interact with the Farcaster protocol.
See the [Neynar docs](https://docs.neynar.com/reference) for more details.
Expand All @@ -15,7 +15,7 @@
security:
- ApiKeyAuth: []

components:

Check warning on line 18 in src/v2/spec.yaml

View workflow job for this annotation

GitHub Actions / Validate and Lint OpenAPI Specs

unused-components All components must be referenced.
securitySchemes:
ApiKeyAuth:
type: apiKey
Expand Down Expand Up @@ -2176,6 +2176,40 @@
$ref: "#/components/schemas/CastWithInteractions"
next:
$ref: "#/components/schemas/NextCursor"
FrameNotificationTokens:
type: object
required:
- notification_tokens
- next
properties:
notification_tokens:
type: array
items:
type: object
properties:
object:
type: string
enum:
- notification_token
url:
type: string
token:
nounder marked this conversation as resolved.
Show resolved Hide resolved
type: string
status:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

status should be enum of values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on code search, i added enabled and disabled statuses

type: string
enum:
- enabled
- disabled
fid:
$ref: "#/components/schemas/Fid"
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
next:
$ref: "#/components/schemas/NextCursor"
ConversationSummary:
type: object
required:
Expand Down Expand Up @@ -6806,6 +6840,48 @@
$ref: "#/components/responses/400Response"
"500":
$ref: "#/components/responses/500Response"
/farcaster/frame/notification_tokens:
get:
tags:
- Frame
summary: |
List of frame notification tokens.
description: |
Returns a list of notifications tokens related for an app
externalDocs:
url: https://docs.neynar.com/reference/fetch-notification-tokens
operationId: fetch-notification-tokens
parameters:
- name: limit
in: query
description: Number of results to fetch
required: false
example: 30
schema:
type: integer
default: 20
minimum: 1
maximum: 100
x-is-limit-param: true
- name: fids
Shreyaschorge marked this conversation as resolved.
Show resolved Hide resolved
description: Comma separated list of FIDs, up to 100 at a time
in: query
required: false
example: 194, 191, 6131
schema:
type: string
x-comma-separated: true
x-accept-as: integer
responses:
"200":
description: Successful operation.
content:
application/json:
schema:
$ref: "#/components/schemas/FrameNotificationTokens"
"400":
$ref: "#/components/responses/400Response"

/farcaster/frame/notifications:
post:
tags:
Expand Down
Loading