diff --git a/megalodon/src/gotosocial.ts b/megalodon/src/gotosocial.ts index b0a40cb0..69a70cd7 100644 --- a/megalodon/src/gotosocial.ts +++ b/megalodon/src/gotosocial.ts @@ -356,6 +356,7 @@ export default class Gotosocial implements MegalodonInterface { * @param options.exclude_replies Return statuses which exclude replies. * @param options.exclude_reblogs Return statuses which exclude reblogs. * @param options.only_media Show only statuses with media attached? Defaults to false. + * @param options.only_public Return statuses with public visibility only. * @return Account's statuses. */ public async getAccountStatuses( @@ -369,6 +370,7 @@ export default class Gotosocial implements MegalodonInterface { exclude_replies?: boolean exclude_reblogs?: boolean only_media: boolean + only_public?: boolean } ): Promise>> { let params = {} @@ -413,6 +415,11 @@ export default class Gotosocial implements MegalodonInterface { only_media: options.only_media }) } + if (options.only_public) { + params = Object.assign(params, { + only_public: options.only_public + }) + } } return this.client.get>(`/api/v1/accounts/${id}/statuses`, params).then(res => { return Object.assign(res, { diff --git a/megalodon/src/megalodon.ts b/megalodon/src/megalodon.ts index 4ea9bc98..281a5a65 100644 --- a/megalodon/src/megalodon.ts +++ b/megalodon/src/megalodon.ts @@ -169,6 +169,7 @@ export interface MegalodonInterface { * @param options.exclude_replies Return statuses which exclude replies. * @param options.exclude_reblogs Return statuses which exclude reblogs. * @param options.only_media Show only statuses with media attached? Defaults to false. + * @param options.only_public Return statuses with public visibility only. * @return Account's statuses. */ getAccountStatuses( @@ -182,6 +183,7 @@ export interface MegalodonInterface { exclude_replies?: boolean exclude_reblogs?: boolean only_media?: boolean + only_public?: boolean } ): Promise>> /**