add codegen
This commit is contained in:
parent
ff581e1e0b
commit
00b4095672
@ -32,6 +32,31 @@
|
||||
"description": { "type": "string" },
|
||||
"link": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"trend": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"topic",
|
||||
"displayName",
|
||||
"link",
|
||||
"startTime",
|
||||
"postCount",
|
||||
"actors"
|
||||
],
|
||||
"properties": {
|
||||
"topic": { "type": "string" },
|
||||
"displayName": { "type": "string" },
|
||||
"link": { "type": "string" },
|
||||
"startTime": { "type": "string" },
|
||||
"postCount": { "type": "integer" },
|
||||
"actors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "ref",
|
||||
"ref": "app.bsky.actor.defs#profileViewBasic"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
36
lexicons/app/bsky/unspecced/getTrends.json
Normal file
36
lexicons/app/bsky/unspecced/getTrends.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.unspecced.getTrends",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get the current trends on the network",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"viewer": {
|
||||
"type": "string",
|
||||
"format": "did",
|
||||
"description": "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 25,
|
||||
"default": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "ref",
|
||||
"ref": "app.bsky.unspecced.defs#trend"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ import {
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import type * as AppBskyActorDefs from '../actor/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
@ -80,3 +81,23 @@ export function isTrendingTopic<V>(v: V) {
|
||||
export function validateTrendingTopic<V>(v: V) {
|
||||
return validate<TrendingTopic & V>(v, id, hashTrendingTopic)
|
||||
}
|
||||
|
||||
export interface Trend {
|
||||
$type?: 'app.bsky.unspecced.defs#trend'
|
||||
topic: string
|
||||
displayName: string
|
||||
link: string
|
||||
startTime: string
|
||||
postCount: number
|
||||
actors: AppBskyActorDefs.ProfileViewBasic[]
|
||||
}
|
||||
|
||||
const hashTrend = 'trend'
|
||||
|
||||
export function isTrend<V>(v: V) {
|
||||
return is$typed(v, id, hashTrend)
|
||||
}
|
||||
|
||||
export function validateTrend<V>(v: V) {
|
||||
return validate<Trend & V>(v, id, hashTrend)
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import type * as AppBskyActorDefs from '../actor/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
@ -80,3 +81,23 @@ export function isTrendingTopic<V>(v: V) {
|
||||
export function validateTrendingTopic<V>(v: V) {
|
||||
return validate<TrendingTopic & V>(v, id, hashTrendingTopic)
|
||||
}
|
||||
|
||||
export interface Trend {
|
||||
$type?: 'app.bsky.unspecced.defs#trend'
|
||||
topic: string
|
||||
displayName: string
|
||||
link: string
|
||||
startTime: string
|
||||
postCount: number
|
||||
actors: AppBskyActorDefs.ProfileViewBasic[]
|
||||
}
|
||||
|
||||
const hashTrend = 'trend'
|
||||
|
||||
export function isTrend<V>(v: V) {
|
||||
return is$typed(v, id, hashTrend)
|
||||
}
|
||||
|
||||
export function validateTrend<V>(v: V) {
|
||||
return validate<Trend & V>(v, id, hashTrend)
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import type * as AppBskyActorDefs from '../actor/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
@ -80,3 +81,23 @@ export function isTrendingTopic<V>(v: V) {
|
||||
export function validateTrendingTopic<V>(v: V) {
|
||||
return validate<TrendingTopic & V>(v, id, hashTrendingTopic)
|
||||
}
|
||||
|
||||
export interface Trend {
|
||||
$type?: 'app.bsky.unspecced.defs#trend'
|
||||
topic: string
|
||||
displayName: string
|
||||
link: string
|
||||
startTime: string
|
||||
postCount: number
|
||||
actors: AppBskyActorDefs.ProfileViewBasic[]
|
||||
}
|
||||
|
||||
const hashTrend = 'trend'
|
||||
|
||||
export function isTrend<V>(v: V) {
|
||||
return is$typed(v, id, hashTrend)
|
||||
}
|
||||
|
||||
export function validateTrend<V>(v: V) {
|
||||
return validate<Trend & V>(v, id, hashTrend)
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import type * as AppBskyActorDefs from '../actor/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
@ -80,3 +81,23 @@ export function isTrendingTopic<V>(v: V) {
|
||||
export function validateTrendingTopic<V>(v: V) {
|
||||
return validate<TrendingTopic & V>(v, id, hashTrendingTopic)
|
||||
}
|
||||
|
||||
export interface Trend {
|
||||
$type?: 'app.bsky.unspecced.defs#trend'
|
||||
topic: string
|
||||
displayName: string
|
||||
link: string
|
||||
startTime: string
|
||||
postCount: number
|
||||
actors: AppBskyActorDefs.ProfileViewBasic[]
|
||||
}
|
||||
|
||||
const hashTrend = 'trend'
|
||||
|
||||
export function isTrend<V>(v: V) {
|
||||
return is$typed(v, id, hashTrend)
|
||||
}
|
||||
|
||||
export function validateTrend<V>(v: V) {
|
||||
return validate<Trend & V>(v, id, hashTrend)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user