API
The API allows 3rd party applications to interface with Publr. Methods are available for both reading and writing posts. We are constantly adding and improving the API, please check the development blog for updates.
HTTP Post
Depending on the desired response format, the following urls are available. Every post request is authenticated and requires necessary login details.
Post Requests
Each request can be sent the following post values.
- email - required
- password - required
- type (text,link,photo,video,audio,quote,chat) - optional
- start - optional
- limit - optional
http://publr.com/api/json
This will return your posts in a json encoded format.
http://publr.com/api/php
This will return your posts as a serialized php array.
XML-RPC
Publr supports both the MetaWeblog API for (remote posting with editors such as MarsEdit, Ecto, Blogo, etc) and has generic container for reading posts.
Publr
The XML-RPC Server Endpoint for Publr methods is
http://publr.com/api/xmlrpc
Available Options
publr.getPosts
Request Params
- email - required
- password - required
- type (text,link,photo,video,audio,quote,chat) - optional
- start - optional
- limit - optional
-
posts
- created
- postid
- title (text, link, video, audio, photo, chat)
- body (text, link, video, audio, photo)
- player (video, audio)
- chat (chat)
- source (chat)
- url (link)
-
photo
- filename
- original
- large
- medium
- small
- permalink
- type
- current_page
- next_page
- prev_page
- post_count
MetaWeblog
The XML-RPC Server Endpoint for the MetaWeblog/Blogger API is
http://publr.com/api/xmlrpc
Publr's MetaWeblog implementation supports the standard methods and at the moment only supports adding and editing posts of the type "text". For more information on the MetaWeblog API, go here.
JSON
You can retrieve your posts in JSON format by sending a simple post request. Please see info above, here.
PHP
You can retrieve your posts as a serialized php array by sending a simple post request. Please see info above, here.
Sample Code
All code examples are written in PHP and can be easily adapted to fit your language of choice.
