-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add explicit API versions to methods
BREAKING CHANGE: All API calls now require masto.v1 or masto.v2 as a prefix.
- Loading branch information
Showing
130 changed files
with
1,155 additions
and
719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * as V1 from './v1'; | ||
export * as V2 from './v2'; | ||
export * from './repository'; | ||
export * from './iterable-repository'; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export type FilterContext = | ||
| 'home' | ||
| 'notifications' | ||
| 'public' | ||
| 'thread' | ||
| 'account'; | ||
|
||
/** | ||
* Represents a user-defined filter for determining which statuses should not be shown to the user. | ||
* @see https://docs.joinmastodon.org/entities/filter/ | ||
*/ | ||
export interface Filter { | ||
/** The ID of the filter in the database. */ | ||
id: string; | ||
/** The text to be filtered. */ | ||
phrase: string; | ||
/** The contexts in which the filter should be applied. */ | ||
context: FilterContext[]; | ||
/** When the filter should no longer be applied */ | ||
expiresAt?: string | null; | ||
/** Should matching entities in home and notifications be dropped by the server? */ | ||
irreversible: boolean; | ||
/** Should the filter consider word boundaries? */ | ||
wholeWord: boolean; | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
export type MediaAttachmentType = | ||
| 'image' | ||
| 'video' | ||
| 'gifv' | ||
| 'audio' | ||
| 'unknown'; | ||
|
||
export interface MediaAttachmentMetaImage { | ||
width: number; | ||
height: number; | ||
size: string; | ||
aspect: number; | ||
} | ||
|
||
export interface MediaAttachmentMetaVideo { | ||
width: number; | ||
height: number; | ||
frameRate: string; | ||
duration: number; | ||
bitrate: number; | ||
aspect: number; | ||
} | ||
|
||
export interface MediaAttachmentMetaFocus { | ||
x: number; | ||
y: number; | ||
} | ||
|
||
export interface MediaAttachmentMetaColors { | ||
background: string; | ||
foreground: string; | ||
accent: string; | ||
} | ||
|
||
export interface MediaAttachmentMeta { | ||
small?: MediaAttachmentMetaImage | MediaAttachmentMetaVideo | null; | ||
original?: MediaAttachmentMetaImage | MediaAttachmentMetaVideo | null; | ||
focus?: MediaAttachmentMetaFocus | null; | ||
colors?: MediaAttachmentMetaColors | null; | ||
} | ||
|
||
/** | ||
* Represents a file or media MediaAttachment that can be added to a status. | ||
* @see https://docs.joinmastodon.org/entities/MediaAttachment/ | ||
*/ | ||
export interface MediaAttachment { | ||
/** The ID of the MediaAttachment in the database. */ | ||
id: string; | ||
/** The type of the MediaAttachment. */ | ||
type: MediaAttachmentType; | ||
/** The location of the original full-size MediaAttachment. */ | ||
url?: string | null; | ||
/** The location of a scaled-down preview of the MediaAttachment. */ | ||
previewUrl: string; | ||
/** The location of the full-size original MediaAttachment on the remote website. */ | ||
remoteUrl?: string | null; | ||
/** Remote version of previewUrl */ | ||
previewRemoteUrl?: string | null; | ||
/** A shorter URL for the MediaAttachment. */ | ||
textUrl?: string | null; | ||
/** Metadata returned by Paperclip. */ | ||
meta?: MediaAttachmentMeta | null; | ||
/** | ||
* Alternate text that describes what is in the media MediaAttachment, | ||
* to be used for the visually impaired or when media MediaAttachments do not load. | ||
*/ | ||
description?: string | null; | ||
/** | ||
* A hash computed by the BlurHash algorithm, | ||
* for generating colorful preview thumbnails when media has not been downloaded yet. | ||
*/ | ||
blurhash?: string | null; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface Rule { | ||
id: string; | ||
text: string; | ||
} |
Oops, something went wrong.