Zend Framework: Zend_Service_FeedBurner_Awareness Component Proposal
| Proposed Component Name | Zend_Service_FeedBurner_Awareness |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Service_FeedBurner_Awareness |
| Proposers | Simone Carletti |
| Revision | 1.0 - 18 February 2008: Created proposal. (wiki revision: 8) |
Table of Contents
1. Overview
Zend_Service_FeedBurner_Awareness is a PHP client for FeedBurner Awareness API.
It provides an object oriented interface for each FeedBurner API request and returns data as valid PHP objects.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will implement all available FeedBurner Awareness API requests.
- This component will not cover any of FeedBurner Management API requests.
- This component will parse and return server responses as intuitive data objects.
- This component will validate any API request option before any HTTP request
- This component will throw an Exception in case of aFeedBurner response error
4. Dependencies on Other Framework Components
- Zend_Service_Exception
- Zend_Uri
- Zend_Date
- Zend_Rest_Client
5. Theory of Operation
An instance of Zend_Service_FeedBurner_Awareness is created, providing either a feed URI or a feed ID.
The former takes precedence over the latter.
Once you have a valid instance, then you can call one of the available API methods:
- getFeedData()
- getItemData()
- getResyndicationData()
Each method accepts an array of options to refine the query.
For each request you can specify a custom date range, the period for which data is need.
Creating a date range is easy thanks to the Zend_Service_FeedBurner_Awareness_DateRange class.
Once you have a valid DateRange object you can pass it as 'dates' option argument.
Any API request returns a Zend_Service_FeedBurner_ResultFeed instance on success, otherwise throws an exception.
Depending on request, you can iterate the result object to collect all data.
6. Milestones / Tasks
- Milestone 1: [DONE] write component proposal
- Milestone 2: share current class status (100% of development, 50% of code coverage)
- Milestone 3: proposal acceptance
- Milestone 4: finalize component to meet core requirements
- Milestone 5: documentation
7. Class Index
- Zend_Service_FeedBurner_Awareness - the main class
- Zend_Service_FeedBurner_Awareness_Exception - the exception class
- Zend_Service_FeedBurner_Awareness_DateRange - handles date range
- Zend_Service_FeedBurner_Awareness_Result - the base abstract result
- Zend_Service_FeedBurner_Awareness_ResultEntry - the entry result, child element of ResultFeed
- Zend_Service_FeedBurner_Awareness_ResultFeed - the parent feed result
- Zend_Service_FeedBurner_Awareness_ResultItem - the item result, child element of ResultEntry
- Zend_Service_FeedBurner_Awareness_Referrer - the referrer result, child element of ResultItem
8. Use Cases
| UC-01 |
|---|
Creating a new instance
Creating a new instance via Zend_Uri
| UC-02 |
|---|
Creating a date range
| UC-03 |
|---|
Current basic feed data
| UC-04 |
|---|
Past basic feed data
| UC-05 |
|---|
Individual item data
| UC-06 |
|---|
Item resyndication data
9. Class Skeletons
See finalized component.
http://www.simonecarletti.com/tmp/Zend_Service_FeedBurner/
ZF Home Page
Code Browser
Wiki Dashboard