Giter VIP home page Giter VIP logo

audiobookshelf_api's People

Contributors

k9withabone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

audiobookshelf_api's Issues

Me Endpoints

Add all the me endpoints to the me service.

  • Get Your Listening Sessions
  • Get Your Listening Stats
  • Remove an Item From Continue Listening
  • Get a Media Progress
  • Batch Create/Update Media Progress
  • Create/Update Media Progress
  • Remove a Media Progress
  • Create a Bookmark
  • Update a Bookmark
  • Remove a Bookmark
  • Change Your Password
  • Update Your Settings
  • Sync Local Media Progress
  • Get Library Items In Progress
  • Remove a Series From Continue Listening

Server Endpoints

Add server endpoints to server service.

  • Login
  • Logout
  • Initialize the Server
  • Check the Server's Status
  • Ping the Server
  • Healthcheck

LibrarySearchResult.book and LibrarySearchResult.podcast should be lists of LibraryItemSearchResult

class LibrarySearchResponse with _$LibrarySearchResponse {
  const factory LibrarySearchResponse.book({
    required LibraryItemSearchResult book,
    required List<String> tags,
    required List<Author> authors,
    required List<Series> series,
  }) = BookLibrarySearchResponse;

  const factory LibrarySearchResponse.podcast({
    required LibraryItemSearchResult podcast,
    required List<String> tags,
    required List<Author> authors,
    required List<Series> series,
  }) = PodcastLibrarySearchResponse;

  factory LibrarySearchResponse.fromJson(Map<String, dynamic> json) =>
      LibrarySearchResponseConverter().fromJson(json);
}
class LibrarySearchResponse with _$LibrarySearchResponse {
  const factory LibrarySearchResponse.book({
    required List<LibraryItemSearchResult> book,
    required List<String> tags,
    required List<Author> authors,
    required List<Series> series,
  }) = BookLibrarySearchResponse;

  const factory LibrarySearchResponse.podcast({
    required LibraryItemSearchResult podcast,
    required List<String> tags,
    required List<Author> authors,
    required List<Series> series,
  }) = PodcastLibrarySearchResponse;

  factory LibrarySearchResponse.fromJson(Map<String, dynamic> json) =>
      LibrarySearchResponseConverter().fromJson(json);
}

image

Notifications Endpoints

Add all the notifications endpoints to the notifications service.

  • Get Notification Settings
  • Update Notification Settings
  • Get Notification Event Data
  • Fire Test Notification Event
  • Create a Notification
  • Delete a Notification
  • Update a Notification
  • Send Notification Test

Publish to pub.dev

I think this package is just about ready for publishing. Here are the final tasks that I've thought of. I'll add any others that are suggested.

  • Add example
  • Update README
  • Update version to v0.1.0
  • Update changelog
  • Check dart docs

Removal of `ResponseErrorHandler`

I'm thinking about removing ResponseErrorHandler and it's corresponding function arguments that are in every endpoint, stemming from AudiobookshelfApi.requestJson(). This would also make the return types of those functions non-nullable.
The original idea of ResponseErrorHandler was to provide a place where the caller could have access to the original http.Response when doing JSON conversion and something went wrong. An alternative solution for this is to catch all throws from fromJson(), wrap it in a new error type that also includes the http.Response, and throw that.

@keaganhilliard, I would like your thoughts on this.

Misc Endpoints

Add all the misc endpoints to the misc service.

  • Upload Files
  • Update Server Settings
  • Get Authorized User and Server Information
  • Get All Tags
  • Validate a Cron Expression

Query Parameters all have to be Strings or Lists of Strings

Fun fact about http calls in dart. They will fail if pass anything other than a string or list of strings into the query parameters.

class BoolBinaryConverter implements JsonConverter<bool, int> {
  const BoolBinaryConverter();

  @override
  bool fromJson(int json) => json == 1;

  @override
  int toJson(bool object) => object ? 1 : 0;
}

This causes items.get requests to fail. To use this in a query parameter it has to either be '1' or '0'. So you could potentially explicitly call toString() on any parameters or coerce parameter attributes to strings.

Sessions Endpoints

Add all the sessions endpoints to the sessions service.

  • Get All Sessions
  • Delete a Session
  • Get an Open Session
  • Sync an Open Session
  • Close an Open Session
  • Sync a Local Session

Restructure

I would like to restructure the package so that it works similar to the GitHub Dart package. See this file for reference. Essentially, I want to break up each part of the API into its own "service". So for example, to get all libraries, you would do api.libraries.getAll().

Tools Endpoints

Add all the tools endpoints to the tools service.

  • Encode a Book as M4B
  • Cancel an M4B Encode Task
  • Update a Library Item's Audio Files' Embedded Metadata

Exports

Make sure everything that should be public is exported in lib/audiobookshelf_api.dart. Rework the exports so that each folder in src/models has a file that exports everything in that folder.

Podcasts Endpoints

Add all the podcasts endpoints to the podcasts service.

  • Create a Podcast
  • Get a Podcast's Feed
  • Get Podcast Feeds from OPML
  • Check for New Podcast Episodes
  • Get Podcast Episode Downloads
  • Clear a Podcast's Episode Download Queue
  • Search a Podcast's Feed for Episodes
  • Download Podcast Episodes
  • Update a Podcast Episode
  • Delete a Podcast Episode

Playlists Endpoints

Add all the playlists endpoints to the playlists service.

  • Create a Playlist
  • Get All User Playlists
  • Get a Playlist
  • Update a Playlist
  • Delete a Playlist
  • Add an Item to a Playlist
  • Remove an Item From a Playlist
  • Batch Add Items to a Playlist
  • Batch Remove Items From a Playlist

Collections Endpoints

Add all the collections endpoints to the collections service.

  • Create a Collection
  • Get All Collections
  • Get a Collection
  • Update a Collection
  • Delete a Collection
  • Add a Book to a Collection
  • Remove a Book From a Collection
  • Batch Add Books to a Collection
  • Batch Remove Book From a Collection

Search Endpoints

Add all the search endpoints to the search service.

  • Search for Covers
  • Search for Books
  • Search for Podcasts
  • Search for an Author
  • Search for a Book's Chapters

Libraries Endpoints

Add all the libraries endpoints to the libraries service.

  • Create a Library
  • Get All Libraries
  • Get a Library
  • Update a Library
  • Delete a Library
  • Get a Library's Items
  • Remove a Library's Items with Issues
  • Get a Library's Series
  • Get a Library's Collections
  • Get a Library's User Playlists
  • Get a Library's Personalized View
  • Get a Library's Filter Data
  • Search a Library
  • Get a Library's Stats
  • Get a Library's Authors
  • Match All of a Library's Items
  • Scan a Library's Folders
  • Get a Library's Recent Episodes
  • Reorder Library List

Library Items Endpoints

Add all the library items endpoints to the items service.

  • Delete All Library Items
  • Get a Library Item
  • Delete a Library Item
  • Update a Library Item's Media
  • Get a Library Item's Cover
  • Upload a Library Item's Cover
  • Update a Library Item's Cover
  • Remove a Library Item's Cover
  • Match a Library Item
  • Play a Library Item or Podcast Episode
  • Update a Library Item's Audio Tracks
  • Scan a Library Item
  • Get a Library Item's Tone Metadata
  • Update a Library Item's Chapters
  • Open an RSS Feed for a Library Item
  • Close an RSS Feed for a Library Item
  • Tone Scan a Library Item
  • Batch Delete Library Items
  • Batch Update Library Items
  • Batch Get Library Items
  • Batch Quick Match Library Items

Schemas

Add all the schemas from the docs.

  • Library
  • Library Settings
  • Library Filter Data
  • Folder
  • Library Item
  • Book
  • Book Metadata
  • Book Chapter
  • Podcast
  • Podcast Metadata
  • Podcast Episode
  • Podcast Episode Enclosure
  • Podcast Episode Download
  • Podcast Feed
  • Podcast Feed Metadata
  • Podcast Feed Episode
  • Audio File
  • Audio Meta Tags
  • Audio Track
  • EBook File
  • Library File
  • File Metadata
  • Author
  • Series
  • Collections
  • Playlist
  • Playlist Item
  • Media Progress
  • Playback Session
  • Device Info
  • User
  • User Settings
  • User Permissions
  • Audio Bookmark
  • Backup
  • Notification Settings
  • Notification
  • Notification Event
  • Server Settings
  • RSS Feed
  • RSS Feed Metadata
  • RSS Feed Episode

Users Endpoints

Add all the users endpoints to the users service.

  • Create a User
  • Get All Users
  • Get Online Users
  • Get a User
  • Update a User
  • Delete a User
  • Get a User's Listening Sessions
  • Get a User's Listening Stats
  • Purge a User's Media Progress

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.