Skip to content

Commit

Permalink
remove deprecated app.bsky.unspecced.getPopular (bluesky-social#1988)
Browse files Browse the repository at this point in the history
* remove deprecated app.bsky.unspecced.getPopular lexicon

* codegen

* remove remaining references to getPopular

* changeset for getPopular removal
  • Loading branch information
bnewbold authored Jan 9, 2024
1 parent c2d0578 commit 51fcba7
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 386 deletions.
7 changes: 7 additions & 0 deletions .changeset/rich-turkeys-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@atproto/bsky': patch
'@atproto/api': patch
'@atproto/pds': patch
---

remove deprecated app.bsky.unspecced.getPopular endpoint
40 changes: 0 additions & 40 deletions lexicons/app/bsky/unspecced/getPopular.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/api/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
Expand Down Expand Up @@ -281,7 +280,6 @@ export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
export * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
Expand Down Expand Up @@ -2409,17 +2407,6 @@ export class UnspeccedNS {
this._service = service
}

getPopular(
params?: AppBskyUnspeccedGetPopular.QueryParams,
opts?: AppBskyUnspeccedGetPopular.CallOptions,
): Promise<AppBskyUnspeccedGetPopular.Response> {
return this._service.xrpc
.call('app.bsky.unspecced.getPopular', params, undefined, opts)
.catch((e) => {
throw AppBskyUnspeccedGetPopular.toKnownErr(e)
})
}

getPopularFeedGenerators(
params?: AppBskyUnspeccedGetPopularFeedGenerators.QueryParams,
opts?: AppBskyUnspeccedGetPopularFeedGenerators.CallOptions,
Expand Down
49 changes: 0 additions & 49 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7639,54 +7639,6 @@ export const schemaDict = {
},
},
},
AppBskyUnspeccedGetPopular: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopular',
defs: {
main: {
type: 'query',
description:
'DEPRECATED: will be removed soon. Use a feed generator alternative.',
parameters: {
type: 'params',
properties: {
includeNsfw: {
type: 'boolean',
default: false,
},
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 50,
},
cursor: {
type: 'string',
},
},
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['feed'],
properties: {
cursor: {
type: 'string',
},
feed: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.feed.defs#feedViewPost',
},
},
},
},
},
},
},
},
AppBskyUnspeccedGetPopularFeedGenerators: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopularFeedGenerators',
Expand Down Expand Up @@ -8055,7 +8007,6 @@ export const ids = {
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
AppBskyUnspeccedGetPopularFeedGenerators:
'app.bsky.unspecced.getPopularFeedGenerators',
AppBskyUnspeccedGetTimelineSkeleton: 'app.bsky.unspecced.getTimelineSkeleton',
Expand Down
39 changes: 0 additions & 39 deletions packages/api/src/client/types/app/bsky/unspecced/getPopular.ts

This file was deleted.

12 changes: 0 additions & 12 deletions packages/bsky/src/lexicon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notificatio
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications'
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush'
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
Expand Down Expand Up @@ -1543,17 +1542,6 @@ export class UnspeccedNS {
this._server = server
}

getPopular<AV extends AuthVerifier>(
cfg: ConfigOf<
AV,
AppBskyUnspeccedGetPopular.Handler<ExtractAuth<AV>>,
AppBskyUnspeccedGetPopular.HandlerReqCtx<ExtractAuth<AV>>
>,
) {
const nsid = 'app.bsky.unspecced.getPopular' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}

getPopularFeedGenerators<AV extends AuthVerifier>(
cfg: ConfigOf<
AV,
Expand Down
49 changes: 0 additions & 49 deletions packages/bsky/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7639,54 +7639,6 @@ export const schemaDict = {
},
},
},
AppBskyUnspeccedGetPopular: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopular',
defs: {
main: {
type: 'query',
description:
'DEPRECATED: will be removed soon. Use a feed generator alternative.',
parameters: {
type: 'params',
properties: {
includeNsfw: {
type: 'boolean',
default: false,
},
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 50,
},
cursor: {
type: 'string',
},
},
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['feed'],
properties: {
cursor: {
type: 'string',
},
feed: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.feed.defs#feedViewPost',
},
},
},
},
},
},
},
},
AppBskyUnspeccedGetPopularFeedGenerators: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopularFeedGenerators',
Expand Down Expand Up @@ -8055,7 +8007,6 @@ export const ids = {
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
AppBskyUnspeccedGetPopularFeedGenerators:
'app.bsky.unspecced.getPopularFeedGenerators',
AppBskyUnspeccedGetTimelineSkeleton: 'app.bsky.unspecced.getTimelineSkeleton',
Expand Down
49 changes: 0 additions & 49 deletions packages/bsky/src/lexicon/types/app/bsky/unspecced/getPopular.ts

This file was deleted.

23 changes: 0 additions & 23 deletions packages/pds/src/api/app/bsky/unspecced/getPopular.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/pds/src/api/app/bsky/unspecced/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { Server } from '../../../../lexicon'
import AppContext from '../../../../context'
import getPopular from './getPopular'
import getPopularFeedGenerators from './getPopularFeedGenerators'

// THIS IS A TEMPORARY UNSPECCED ROUTE
export default function (server: Server, ctx: AppContext) {
getPopular(server, ctx)
getPopularFeedGenerators(server, ctx)
}
12 changes: 0 additions & 12 deletions packages/pds/src/lexicon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notificatio
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications'
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush'
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
Expand Down Expand Up @@ -1543,17 +1542,6 @@ export class UnspeccedNS {
this._server = server
}

getPopular<AV extends AuthVerifier>(
cfg: ConfigOf<
AV,
AppBskyUnspeccedGetPopular.Handler<ExtractAuth<AV>>,
AppBskyUnspeccedGetPopular.HandlerReqCtx<ExtractAuth<AV>>
>,
) {
const nsid = 'app.bsky.unspecced.getPopular' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}

getPopularFeedGenerators<AV extends AuthVerifier>(
cfg: ConfigOf<
AV,
Expand Down
Loading

0 comments on commit 51fcba7

Please sign in to comment.