Skip to content

Releases: kiwilan/php-opds

v1.0.0

06 Sep 15:20
21bb8fc
Compare
Choose a tag to compare

This version rework completely the library, it's not compatible with previous version. Now you can use OPDS 2.0 with partial support.

BREAKING CHANGES

Opds::class

  • static method response() removed, now static method is Opds::make() and get() is a arrow method:
$opds = Opds::make()
    ->get(); // `Opds::class` instance with response

return $opds->send(); // `never` because send response
  • To add entries, you have to use feeds() arrow method
    • feeds() accept OpdsEntryBook[] or OpdsEntryNavigation[] but also OpdsEntryNavigation or OpdsEntryBook
  • To add isSearch, you have to use isSearch() arrow method
  • To add title, you have to use title() arrow method
  • To add url, you have to use url() arrow method (only for testing, URL is automatically generated)
  • OPDS version can be handle by query param version: ?version=2.0 or ?version=1.2
  • To get generate response and keep Opds::class instance, you can use get() arrow method
  • To get response as XML or JSON, you can use send() arrow method
  • asString param removed, now you can use get() arrow method to debug response
  • To get response after get() you can use getResponse() arrow method (different that send() will return full content as never with headers)
  • Add fallback for old OPDS versions to v1.2
use Kiwilan\Opds\Opds;
use Kiwilan\Opds\OpdsVersionEnum;

$entries = [];

$opds = Opds::make(new OpdsConfig()) // Accept `OpdsConfig::class`
  ->title('My search') // To set feed title
  ->isSearch() // To set feed as search
  ->url('https://example.com/search') // Only for testing, URL is automatically generated
  ->feeds($entries) // Accept `OpdsEntryBook[]`, `OpdsEntryNavigation[]`, `OpdsEntryNavigation` or `OpdsEntryBook`
  ->get()
;

Misc

  • OpdsConfig
    • usePagination is now default to false
    • forceJson param allow to skip OPDS 1.2
    • searchQuery removed from OpdsConfig because query parameter is statically defined (q for OPDS 1.2, query for OPDS 2.0)
  • OpdsEntry is now OpdsEntryNavigation
  • OpdsEngine rewrite completely
  • OpdsResponse can be debug with getContents() method to inspect response (accessible if you use get() method)
  • OpdsEntry items have now get prefix for all getter
  • remove modules system
  • OpdsEngine property xml is now contents
    • getXml() is now getContents()
    • add setter setContents()

Added

  • add ODPS 2.0 support partially
  • add setters to OpdsEntry
  • XML pagination is now supported
  • JSON pagination is now supported
  • rewrite documentation
  • Opds improve send() with new parameter mock, a boolean to send the response or not.
  • Move all enum to Kiwilan\Opds\Enums namespace.
  • Add new OpdsPaginator class to handle pagination
  • more tests

1.0.0-alpha.6

06 Sep 12:29
d1abb19
Compare
Choose a tag to compare
1.0.0-alpha.6 Pre-release
Pre-release
  • Add fallback for old OPDS versions to v1.2
  • Add new OpdsPaginator class to handle pagination
  • Fix search link type
  • Remove content from engine, dynamic content is now converted by response from engine
    • Add toXML(), toJSON() and __toString() methods to engine
  • Rename content to contents (and getter/setter accordingly)

v1.0.0-alpha.5

31 Aug 11:35
f2acb4a
Compare
Choose a tag to compare
v1.0.0-alpha.5 Pre-release
Pre-release
  • Opds improve response() with new parameter send, a boolean to send the response or not.
  • Move all enum to Kiwilan\Opds\Enums namespace.

v1.0.0-alpha.4

31 Aug 10:55
41aa037
Compare
Choose a tag to compare
v1.0.0-alpha.4 Pre-release
Pre-release
  • OpdsEngine property xml is now content
    • getXml() is now getContent()
    • add setter setContent() and setResponse()

v1.0.0-alpha.3

31 Aug 09:44
a618415
Compare
Choose a tag to compare
v1.0.0-alpha.3 Pre-release
Pre-release
  • add setters to OpdsEntry
  • XML pagination is now supported
  • remove modules system
  • rewrite documentation
  • more tests

v1.0.0-alpha.2

30 Aug 11:59
4171078
Compare
Choose a tag to compare
v1.0.0-alpha.2 Pre-release
Pre-release
  • Fix route() for OpdsEngine::class

v1.0.0-alpha.1

30 Aug 11:55
8fd65cf
Compare
Choose a tag to compare
v1.0.0-alpha.1 Pre-release
Pre-release

This version rework completely the library, it's not compatible with previous version. Now you can use OPDS 2.0 with partial support.

BREAKING CHANGES

Opds::class

  • static method response() removed, now static method is Opds::make() and get() is a arrow method:
$opds = Opds::make();

$debug = $opds->get(); // `Opds::class` instance with response

return $opds->response(); // `never` because send response
  • To add entries, you have to use feeds() arrow method
    • feeds() accept OpdsEntryBook[] or OpdsEntryNavigation[] but also OpdsEntryNavigation or OpdsEntryBook
  • To add isSearch, you have to use isSearch() arrow method
  • To add title, you have to use title() arrow method
  • To add url, you have to use url() arrow method (only for testing, URL is automatically generated)
  • OPDS version can be handle by query param version: ?version=2.0 or ?version=1.2
  • To get generate response and keep Opds::class instance, you can use get() arrow method
  • To get response as XML or JSON, you can use response() arrow method
  • asString param removed, now you can use get() arrow method to debug response
  • To get response after get() you can use getResponse() arrow method (different that response() will return full content as never with headers)
use Kiwilan\Opds\Opds;
use Kiwilan\Opds\OpdsVersionEnum;

$entries = [];

$opds = Opds::make(new OpdsConfig()) // Accept `OpdsConfig::class`
  ->title('My search') // To set feed title
  ->isSearch() // To set feed as search
  ->url('https://example.com/search') // Only for testing, URL is automatically generated
  ->feeds($entries); // Accept `OpdsEntryBook[]`, `OpdsEntryNavigation[]`, `OpdsEntryNavigation` or `OpdsEntryBook`

return $opds->get();

Misc

  • OpdsConfig
    • usePagination is now default to false
    • forceJson param allow to skip OPDS 1.2
  • OpdsEntry is now OpdsEntryNavigation
  • OpdsEngine rewrite completely
  • OpdsResponse can be debug with getContent() method to inspect response (accessible if you use get() method)
  • OpdsEntry items have now get prefix for all getter

Added

  • add ODPS 2.0 support partially

0.3.12

09 May 14:56
Compare
Choose a tag to compare
  • Change default pagination from 15 to 32
  • Add more characters for content property of OpdsEntryBook

0.3.11

09 May 14:49
Compare
Choose a tag to compare
  • media mime type fix

0.3.10

09 May 14:29
Compare
Choose a tag to compare
  • OpdsEntryBook add content property with HTML