Releases: kiwilan/php-opds
Releases · kiwilan/php-opds
v1.0.0
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 isOpds::make()
andget()
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 usefeeds()
arrow methodfeeds()
acceptOpdsEntryBook[]
orOpdsEntryNavigation[]
but alsoOpdsEntryNavigation
orOpdsEntryBook
- To add
isSearch
, you have to useisSearch()
arrow method - To add
title
, you have to usetitle()
arrow method - To add
url
, you have to useurl()
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 useget()
arrow method - To get response as XML or JSON, you can use
send()
arrow method asString
param removed, now you can useget()
arrow method to debug response- To get response after
get()
you can usegetResponse()
arrow method (different thatsend()
will return full content asnever
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 tofalse
forceJson
param allow to skip OPDS 1.2searchQuery
removed fromOpdsConfig
because query parameter is statically defined (q
for OPDS 1.2,query
for OPDS 2.0)
OpdsEntry
is nowOpdsEntryNavigation
OpdsEngine
rewrite completelyOpdsResponse
can be debug withgetContents()
method to inspect response (accessible if you useget()
method)OpdsEntry
items have nowget
prefix for all getter- remove modules system
OpdsEngine
propertyxml
is nowcontents
getXml()
is nowgetContents()
- 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
improvesend()
with new parametermock
, a boolean to send the response or not.- Move all
enum
toKiwilan\Opds\Enums
namespace. - Add new
OpdsPaginator
class to handle pagination - more tests
1.0.0-alpha.6
- 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
- Add
- Rename
content
tocontents
(and getter/setter accordingly)
v1.0.0-alpha.5
Opds
improveresponse()
with new parametersend
, a boolean to send the response or not.- Move all
enum
toKiwilan\Opds\Enums
namespace.
v1.0.0-alpha.4
OpdsEngine
propertyxml
is nowcontent
getXml()
is nowgetContent()
- add setter
setContent()
andsetResponse()
v1.0.0-alpha.3
- add setters to
OpdsEntry
- XML pagination is now supported
- remove modules system
- rewrite documentation
- more tests
v1.0.0-alpha.2
- Fix
route()
forOpdsEngine::class
v1.0.0-alpha.1
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 isOpds::make()
andget()
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 usefeeds()
arrow methodfeeds()
acceptOpdsEntryBook[]
orOpdsEntryNavigation[]
but alsoOpdsEntryNavigation
orOpdsEntryBook
- To add
isSearch
, you have to useisSearch()
arrow method - To add
title
, you have to usetitle()
arrow method - To add
url
, you have to useurl()
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 useget()
arrow method - To get response as XML or JSON, you can use
response()
arrow method asString
param removed, now you can useget()
arrow method to debug response- To get response after
get()
you can usegetResponse()
arrow method (different thatresponse()
will return full content asnever
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 tofalse
forceJson
param allow to skip OPDS 1.2
OpdsEntry
is nowOpdsEntryNavigation
OpdsEngine
rewrite completelyOpdsResponse
can be debug withgetContent()
method to inspect response (accessible if you useget()
method)OpdsEntry
items have nowget
prefix for all getter
Added
- add ODPS 2.0 support partially
0.3.12
- Change default pagination from
15
to32
- Add more characters for
content
property ofOpdsEntryBook
0.3.11
media
mime type fix
0.3.10
OpdsEntryBook
addcontent
property with HTML