0.2.2releasedAPIPage
API Page parser
Clone URLhttps://github.com/iwyg/apipage.git
Add as a submodulegit submodule add https://github.com/iwyg/apipage.git extensions/apipage --recursive
Compatibility
2.x.x | 2.1.x | 2.2.x | 2.3.x | 2.4.x | 2.5.x | 2.6.x | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.7.4 | 2.7.5 | 2.7.6 | 2.7.7 | 2.7.8 | 2.7.9 | 2.7.10 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
No | No | No | 0.2.2 | No | No | No | No | No | No | No | No | No | No | No | No | No | No. Soon? |
Readme
Synopsis
Easily generate api pages with Symphony CMS.
Dependencies
- php >= 5.3.6
- all other dependencies should already be met by Symphony CMS
Usage
- Install as usual.
- set default format and format url parameter in
System/Preferences
set pagetype to
API
(do not set any pagetype other then API when using thecontent type mappings
extension)set your template's output format to
xml
, e.g.:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:template match="/">
<response> <!-- do your transformations here --></response>
</xsl:template>
```
- do your data transformation as you would usually do.
URL Parameter
format
: specify output format (json|jsonp|xml
)callback
: specify a callback name for jsonp requests (format:json
)
FAQ
- Q: why no php 5.2?
- A: Brace yourself, php 5.5 is comming.
- Q: I can do all this using a xml to json stylesheet. So why using this extension?
- A: Sure you can. The downside of doing so is, that all these stylesheets are a bit restricted and perform expensive string operations. The extensions XMLtoJSON parser uses the php C extension SimpleXML, which is much faster. It's reliable and it's tested.
Version history
Symphony 2.3.0 to 2.3.x
- bugfix
- please re-enable extension to fully work (delegate handler name changed)
Symphony 2.3.0 to 2.3.x
- add template helper
Symphony 2.3.0 to 2.3.x
- node values are now treated as their inteted type
Symphony 2.3.0 to 2.3.x
- allow content length header to be disabled
- content length header disabled for debugger
Symphony 2.3.0 to 2.3.x
- specify jsonp callback in url parameter
- add Content-length header
Symphony 2.3.0 to 2.3.x
- Fixes: only override default setting when configured
Symphony 2.3.0 to 2.3.x
- add jsonp output
- output formats can now be triggered by HTTP Accept header (
Accept: application/json
, etc)
Symphony 2.3.0 to 2.3.x
- various fixes
- fix empty nodes
- fix nodes with mixed content (text and childnodes)
- textnodes with attributes no longer return
node: {@attributes: {}, value: text}
butnode: {@attributes: {}, text: text}
Symphony 2.3.0 to 2.3.x
- bugfix
Symphony 2.3.0 to 2.3.x
- parser error
Symphony 2.3.0 to 2.3.x
- added installation routine
Symphony 2.3.0 to 2.3.x
- added test
Symphony 2.3.0 to 2.3.x
- fix parser
Symphony 2.3.0 to 2.3.x
- initial release