expose

1st August '08 2 comments

to allow firemint to access more mint data iv created a pepper called expose, the idea is simple; to provide an xml api of some mint data. this allows for external applications like firemint to use the data.

[requirements]

currently expose is only written for PHP5 with DOMDocument support, most PHP5 setups will be fine.

md5 hash: b11b50a4e83595f7f541b4dcb6c9f7c4

note: this is a beta pepper, updates will be released on a regular basis. please check back for updates.

[installing]

read the README file inside the zip for now, until i get some instructions wrote up.

[querying]

the expose api can be queried by specifying different parameters either in the url (via GET) or as POST parameters. the different parameter names can be found below in each section, along with any additional required (or optional) parameters.

[authentication]

the expose api requires you to authenticate each request. authenticating requires a unique api key, which can be set and viewed in the expose pepper settings in mint.

.params

?api=%AUTH_KEY%

[methods]

expose provides a range of methods that can be used to query data in mint, you can specify the method that should be executed in the query parameters (see below).

current expose supports 3 methods;

[mint:info]

mint:info is used to fetch information about a mint installation. not all of mint’s config information is available through expose, some properties are removed for security reasons.

.params

?method=mint:info

.response

<array>
<expose_version name="expose_version" type="string">0.1</expose_version>
<siteroot name="siteRoot" type="string"/>
<sitedisplay name="siteDisplay" type="string">84degrees</sitedisplay>
<sitedomains name="siteDomains" type="string">84degrees.com</sitedomains>
<installfull name="installFull" type="string">http://84degrees.com/mint</installfull>
<installdate name="installDate" type="integer">1216740151</installdate>
<offset name="offset" type="string">1</offset>
<email name="email" type="string">adam@mochapowered.com</email>
<version name="version" type="integer">216</version>
<lastoptimized name="lastOptimized" type="integer">1217360114</lastoptimized>
<lastchecked name="lastChecked" type="integer">1217527166</lastchecked>
<mode name="mode" type="string">default</mode>
</array>

[peppers:fetch]

this method returns the installed peppers, with information about the panes each pepper offers, preferences and data.

.params

?method=peppers:fetch

[visits:fetch]

visits:fetch will an xml array of the data from the visit’s pane inside mint. the array is made up of 3 other arrays;

.params

?method=visits:fetch


at the moment the returned xml is basic, and the api does not provide any methods to query the data in mint. i will be adding support soon though, along with a few other features.

il be releasing the expose pepper with firemint v2b1, sometime in the next few days / weeks.

2 so far

comments

  1. written by phil from 84degrees

    I’ll let you know how i get on with it. Should the api key look like {md5(rand() - etc… i put that in my firemint with all the correct details and formatting like you mentioned (trailing /) and just says waiting. Looks a cool idea thou.

  2. [...] solution, µMint does not make use of iframes. Instead, µMint is designed to work with both the Exposé API, by Adam Livesley as well as the included API, µAPI for Mint. Furthermore, there is a development [...]

add a comment