Skip to content

Commit

Permalink
Merge branch 'main' into devin/1735029540-hub-rest-api-doc-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyaschorge authored Jan 6, 2025
2 parents 7a27fc7 + 0ecc397 commit dccfc44
Showing 1 changed file with 77 additions and 1 deletion.
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.6.1"
version: "2.7.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 Down Expand Up @@ -2614,6 +2614,31 @@ components:
$ref: "#/components/schemas/CastWithInteractions"
next:
$ref: "#/components/schemas/NextCursor"
CastsMetrics:
type: object
required:
- start
- resolution_in_seconds
- cast_count
properties:
start:
type: string
format: date-time
resolution_in_seconds:
type: integer
format: int32
cast_count:
type: integer
format: int32
CastsMetricsResponse:
type: object
required:
- metrics
properties:
metrics:
type: array
items:
$ref: "#/components/schemas/CastsMetrics"
FeedResponse:
type: object
required:
Expand Down Expand Up @@ -4467,6 +4492,8 @@ tags:
description: Operations related to onchain data
- name: Login
description: Operations related to login
- name: Metrics
description: Operations related to retrieving metrics

paths:
/farcaster/user/fid:
Expand Down Expand Up @@ -5326,6 +5353,55 @@ paths:
$ref: "#/components/schemas/CastsSearchResponse"
"400":
$ref: "#/components/responses/400Response"
/farcaster/cast/metrics:
get:
tags:
- Metrics
summary: Metrics for casts
description: Fetches metrics casts matching a query
externalDocs:
url: https://docs.neynar.com/reference/fetch-cast-metrics
operationId: fetch-cast-metrics
parameters:
- name: q
in: query
required: true
description: "Query string to search for casts"
example: "star wars"
schema:
type: string
- name: interval
in: query
required: false
description: "Interval of time for which to fetch metrics. Choices are `1d`, `7d`, `30d`"
schema:
type: string
enum:
- 1d
- 7d
- 30d
- name: author_fid
in: query
required: false
description: "Fid of the user whose casts you want to search"
example: 194
schema:
$ref: "#/components/schemas/Fid"
- name: channel_id
in: query
required: false
schema:
type: string
description: "Channel ID of the casts you want to search"
responses:
"200":
description: Successful operation.
content:
application/json:
schema:
$ref: "#/components/schemas/CastsMetricsResponse"
"400":
$ref: "#/components/responses/400Response"
/farcaster/cast/conversation:
get:
tags:
Expand Down

0 comments on commit dccfc44

Please sign in to comment.