@@ -6,6 +6,7 @@ import Entity from './entity'
66import Friendica from './friendica'
77import Firefish from './firefish'
88import Gotosocial from './gotosocial'
9+ import Pixelfed from './pixelfed'
910
1011export interface WebSocketInterface {
1112 start ( ) : void
@@ -1436,14 +1437,14 @@ export class NodeinfoError extends Error {
14361437/**
14371438 * Get client for each SNS according to megalodon interface.
14381439 *
1439- * @param sns Name of your SNS, `mastodon`, `pleroma`, `firefish`, or `gotosocial `.
1440+ * @param sns Name of your SNS, `mastodon`, `pleroma`, `firefish`, `gotosocial`, or `pixelfed `.
14401441 * @param baseUrl hostname or base URL.
14411442 * @param accessToken access token from OAuth2 authorization
14421443 * @param userAgent UserAgent is specified in header on request.
14431444 * @return Client instance for each SNS you specified.
14441445 */
14451446const generator = (
1446- sns : 'mastodon' | 'pleroma' | 'friendica' | 'firefish' | 'gotosocial' ,
1447+ sns : 'mastodon' | 'pleroma' | 'friendica' | 'firefish' | 'gotosocial' | 'pixelfed' ,
14471448 baseUrl : string ,
14481449 accessToken : string | null = null ,
14491450 userAgent : string | null = null
@@ -1469,6 +1470,10 @@ const generator = (
14691470 const gotosocial = new Gotosocial ( baseUrl , accessToken , userAgent )
14701471 return gotosocial
14711472 }
1473+ case 'pixelfed' : {
1474+ const pixelfed = new Pixelfed ( baseUrl , accessToken , userAgent )
1475+ return pixelfed
1476+ }
14721477 }
14731478}
14741479
0 commit comments