JinyaClient class

Constructors

JinyaClient(String _jinyaUrl, {dynamic apiKey = ''})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activateArtist(int id) Future<void>
Activates the given artist by id
activateTheme(int id) Future<void>
Activates the given theme
batchReplaceBlogPostSegments(int postId, Iterable<BlogPostSegment> segments) Future<void>
Batch replaces all blog post segments with the list of segments
changePassword(String oldPassword, String newPassword) Future<void>
Updates the password of the current user
changePasswordAdmin(int artistId, String password) Future<void>
Sets the artists password
compileTheme(int id) Future<void>
Compiles the given theme
createArtist(String artistName, String email, String password, {bool enabled = true, bool isReader = true, bool isWriter = true, bool isAdmin = false}) Future<Artist>
Creates a new artist
createBlogCategory(String name, String description, int? parentId, bool webhookEnabled, String webhookUrl) Future<BlogCategory>
Creates a new blog category with the given data
createBlogPost(String title, String slug, int? headerImageId, int categoryId, bool public) Future<BlogPost>
Creates a new blog post with the given data
createFile(String name) Future<File>
Creates a new file with the given name
createForm(String description, String title, String toAddress) Future<Form>
Creates a new form with the given data
createFormItem(int formId, String type, int position, String label, {String placeholder = '', String helpText = '', bool isRequired = false, bool isFromAddress = false, bool isSubject = false, Iterable<String> options = const <String>[], Iterable<String> spamFilter = const <String>[]}) Future<FormItem>
Creates a new form item
createGallery(String name, String description, Orientation orientation, Type type) Future<Gallery>
Creates the gallery with the given data
createGalleryFilePosition(int galleryId, int position, int fileId) Future<GalleryFilePosition>
Creates a new gallery file position
createMenu(String name, int? logoId) Future<Menu>
Creates a new menu with the given data
createMenuItemByMenu(int menuId, String route, int position, String title, {int? artist, int? form, int? page, int? segmentPage, int? gallery, int? category, bool? blogHomePage, bool? highlighted}) Future<MenuItem>
Creates a new menu item with the given menu as parent
createMenuItemByMenuItem(int parentId, String route, int position, String title, {int? artist, int? form, int? page, int? segmentPage, int? gallery, int? category, bool? blogHomePage, bool? highlighted}) Future<MenuItem>
Creates a new menu item with the given menu item as parent
createSegment(int pageId, SegmentType type, Segment segment) Future<Segment>
Creates a new segment for the given page
createSegmentPage(String name) Future<SegmentPage>
Creates a new segment page with the given data
createSimplePage(String title, String content) Future<SimplePage>
Creates a new simple page with the given data
createTheme(String name, File content) Future<void>
Uploads a new theme
deactivateArtist(int id) Future<void>
Deactivates the given artist by id
deleteArtist(int id) Future<void>
Deletes the given artist by id
deleteBlogCategory(int id) Future<void>
Deletes the given blog category
deleteBlogPost(int id) Future<void>
Deletes the given blog post
deleteFile(int id) Future<void>
Deletes the given file
deleteForm(int id) Future<void>
Deletes the form with the given id
deleteFormItem(int formId, int position) Future<void>
Deletes the form item in the given form at the given position
deleteGallery(int id) Future<void>
Deletes the given gallery
deleteGalleryFilePosition(int galleryId, int position) Future<void>
Deletes the gallery file position from the given gallery at the given position
deleteMenu(int id) Future<void>
Deletes the given menu
deleteMenuItem(int itemId) Future<void>
Deletes the given menu item
deleteSegment(int pageId, int position) Future<void>
Deletes the given segment
deleteSegmentPage(int id) Future<void>
Deletes the segment page
deleteSimplePage(int id) Future<void>
Deletes the simple page with the given id
finishFileUpload(int id) Future<void>
Finishes the file upload
getApiKeys() Future<Iterable<ApiKey>>
Gets all api keys for the current user
getArtistById(int id) Future<Artist>
Gets the artist with the given id
getArtistInfo() Future<Artist>
Gets the details of the current artist
getArtists() Future<Iterable<Artist>>
Gets all artists
getBlogCategories() Future<Iterable<BlogCategory>>
Gets all blog categories
getBlogCategoryById(int id) Future<BlogCategory>
Gets a blog category by id
getBlogPostById(int id) Future<BlogPost>
Gets a blog post by id
getBlogPosts({int? categoryId}) Future<Iterable<BlogPost>>
Gets all blog posts, optionally filtered by category
getBlogPostSegments(int postId) Future<Iterable<BlogPostSegment>>
Gets the segments of the given blog post
getFileById(int id) Future<File>
Gets the file with the given id
getFiles() Future<Iterable<File>>
Gets all files
getFormById(int id) Future<Form>
Gets form by id
getFormItems(int formId) Future<Iterable<FormItem>>
Gets all form items for the given form
getForms() Future<Iterable<Form>>
Gets all forms
getGalleries() Future<Iterable<Gallery>>
Gets all galleries
getGallery(int id) Future<Gallery>
Gets the gallery with the given id
getGalleryFilePositions(int galleryId) Future<Iterable<GalleryFilePosition>>
Gets all gallery file positions for the given gallery
getKnownDevices() Future<Iterable<KnownDevice>>
Gets all known devices for the current user
getMenuById(int id) Future<Menu>
Gets the menu with the given id
getMenuItems(int menuId) Future<Iterable<MenuItem>>
Gets all menu items for the given menu
getMenus() Future<Iterable<Menu>>
Gets all menus
getProfilePicture(int id) Future<Uint8List>
Deletes the profile picture of the given artist
getSegmentPageById(int id) Future<SegmentPage>
Gets the segment page by id
getSegmentPages() Future<Iterable<SegmentPage>>
Gets all segment pages
getSegmentsByPage(int pageId) Future<Iterable<Segment>>
Gets the segments for the given page
getSimplePageById(int id) Future<SimplePage>
Gets the simple page by id
getSimplePages() Future<Iterable<SimplePage>>
Gets all simple pages
getStyleVariables(int id) Future<Map<String, String>>
Gets the style variables for the given theme
getThemeCategories(int id) Future<Iterable<ThemeBlogCategory>>
Gets the theme category of the given theme
getThemeConfigurationStructure(int id) Future<ThemeConfigurationStructure>
Gets the theme configuration structure
getThemeDefaultConfiguration(int id) Future<Map<String, Map<String, dynamic>>>
Gets the default configuration for the theme
getThemeFiles(int id) Future<Iterable<ThemeFile>>
Gets the theme files of the given theme
getThemeForms(int id) Future<Iterable<ThemeForm>>
Gets the theme forms of the given theme
getThemeGalleries(int id) Future<Iterable<ThemeGallery>>
Gets the theme galleries of the given theme
getThemeMenus(int id) Future<Iterable<ThemeMenu>>
Gets the theme menus of the given theme
getThemes() Future<Iterable<Theme>>
Gets all themes
getThemeSegmentPages(int id) Future<Iterable<ThemeSegmentPage>>
Gets the theme segment pages of the given theme
getThemeSimplePages(int id) Future<Iterable<ThemePage>>
Gets the theme simple pages of the given theme
invalidateApiKey(String apiKey) Future<bool>
Invalidates the given api key
invalidateKnownDevice(String knownDevice) Future<bool>
Invalidates the given known device
login(String username, String password, {String? twoFactorCode, String? deviceCode}) Future<LoginData>
Performs the login using username, password and one of twoFactorCode or deviceCode. If none is provided a MissingFieldsException is thrown
logout() Future<void>
Removes the current api key from the database
moveFormItem(int formId, int oldPosition, int newPosition) Future<void>
Moves the form item in the given form at the given position to the new position
moveGalleryFilePosition(int galleryId, int oldPosition, int newPosition) Future<void>
Moves the gallery file position to the new position
moveMenuItem(int itemId, int position) Future<void>
Moves the given menu item to the new position
moveMenuItemParentOneLevelUp(int menuId, int itemId) Future<void>
Moves the given menu item one level up in the menu tree
moveMenuItemToMenuParent(int menuId, int itemId) Future<void>
Moves the given menu item to the menu as the new parent
moveMenuItemToNewParent(int itemId, int newParentId) Future<void>
Moves the given menu item to the new parent
moveSegment(int pageId, int oldPosition, int newPosition) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestTwoFactorCode(String username, String password) Future<bool>
Requests a two factor code for the given username and password
startFileUpload(int id) Future<void>
Starts the file upload
toString() String
A string representation of this object.
inherited
updateAboutMe(String email, String artistName, String aboutMe) Future<void>
Updates the about me info of the current artist
updateArtist(Artist artist) Future<void>
Updates the given artist
updateBlogCategory(BlogCategory blogCategory) Future<void>
Updates the given blog category
updateBlogPost(BlogPost blogPost) Future<void>
Updates the given blog post
updateColorScheme(ColorScheme colorScheme) Future<void>
Sets the color scheme the current user prefers
updateConfiguration(int id, Map<String, Map<String, dynamic>> configuration) Future<void>
Updates the configuration for the given theme
updateFile(File file) Future<void>
Updates the given file
updateForm(Form form) Future<void>
Updates the given form
updateFormItem(int formId, FormItem formItem) Future<void>
Updates the given form item
updateGallery(Gallery gallery) Future<void>
Updates the given gallery
updateMenu(Menu menu) Future<void>
Updates the given menu
updateMenuItem(int itemId, {String? route, int? position, String? title, int? artist, int? form, int? page, int? segmentPage, int? gallery, int? category, bool? blogHomePage, bool? highlighted}) Future<void>
Updates the given menu item with the given values
updateSegment(int pageId, int position, Segment segment) Future<void>
Updates the given segment at the given position
updateSegmentPage(SegmentPage page) Future<void>
Updates the segment page
updateSimplePage(SimplePage page) Future<void>
Updates the given simple page
updateStyleVariables(int id, Map<String, String> variables) Future<void>
Updates the style variables for the given theme
updateTheme(int id, File content) Future<void>
Updates the given theme
updateThemeCategory(int themeId, String field, int categoryId) Future<void>
Updates the theme category for the given field and theme with the given category
updateThemeFile(int themeId, String field, int fileId) Future<void>
Updates the theme file for the given field and theme with the given file
updateThemeForm(int themeId, String field, int formId) Future<void>
Updates the theme form for the given field and theme with the given form
updateThemeGallery(int themeId, String field, int galleryId) Future<void>
Updates the theme gallery for the given field and theme with the given gallery
updateThemeMenu(int themeId, String field, int menuId) Future<void>
Updates the theme menu for the given field and theme with the given menu
updateThemeSegmentPage(int themeId, String field, int segmentPageId) Future<void>
Updates the theme segment page for the given field and theme with the given segment page
updateThemeSimplePage(int themeId, String field, int simplePageId) Future<void>
Updates the theme simple page for the given field and theme with the given simple page
uploadFileChunk(int id, int position, Uint8List chunk) Future<void>
Uploads a file chunk
uploadProfilePicture(int id, File file) Future<void>
Uploads a new profile picture for the given artist
validateApiKey(String apiKey) Future<bool>
Checks if the given api key is valid
validateKnownDevice(String knownDevice) Future<bool>
Checks if the given known device is valid

Operators

operator ==(Object other) bool
The equality operator.
inherited