Project:FeedBurner
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Attached is a patch that changes the Awareness API target url from the default to:

$request->url = 'http://feedburner.google.com/api/awareness/1.0/'. $function;

This enables to get a feed's subscriber count (circulation), hits and reach. For example:

<?php
  module_load_include
('inc', 'feedburner', 'feedburner.admin');
 
$result = _feedburner_request_api('GetFeedData', array('uri' => 'wisebread'));
 
// uncoment to see object structure
  // print '<pre>'; print_r($result); print '</pre>';
 
if ($result->code == 200) {
   
$attributes = $result->data->feed->entry->attributes();
   
$feedburner_subscribers = $attributes['circulation'];
   
$feedburner_hits = $attributes['hits'];
   
$feedburner_reach = $attributes['reach'];
  }
  else {
   
$error_code = $result->code;
   
$error_message = $result->error;
  }
?>

The attached README-API.txt gives an example usage of the _feedburner_request_api() function (very nice work btw!) and shows the print_r() output of some responses. Right now it only mentions the GetFeedData function because that's the only one I used. The readme is not essential but I think it would be useful for developers to have the response object handy.

Comments

#1

oops, patches attached.

AttachmentSize
feedburner-awareness-api-url.patch 791 bytes
README-API.txt 2.87 KB
nobody click here