Closed
Bug 807333
Opened 12 years ago
Closed 12 years ago
Add functionality to connect the marketplace to webtrends
Categories
(Marketplace Graveyard :: Statistics, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
2012-11-08
People
(Reporter: clouserw, Assigned: ashort)
References
Details
This bug is to add in config variables and any other convenience methods to the marketplace in order to connect to the webtrends API. I will follow up with examples - Fligtar's panaorama app has been doing this for a long time so that should help show what needs doing. I've also seen some docs online.
Comment 1•12 years ago
|
||
Right I've found the code and the user name and password etc. The bigger problem is trying to figure out exactly what URL calls to make.
But if we could get an API that uses requests, we can figure out the call. This would be something simple a method that: takes a url, calls the web trends server, attaches authentication, JSON parses the result, returns that.
We'll then hook that up to cron jobs in a seperate bug.
Assignee: nobody → ashort
Target Milestone: --- → 2012-11-08
Comment 2•12 years ago
|
||
Got this working:
>>> url = 'https://ws.webtrends.com/v3/Reporting/profiles/46543/reports/82b447d2ae3/?totals=all&start_period=current_day-7&end_period=current_day&period_type=trend&format=json'
>>> res = requests.get(url, auth=(user, passwd)) >>> print res.content
{ "definition" : { "accountID" : 20141 , "profileID" : "82qJ2NpAiu6" , "ID" : "82b447d2ae3" , "name" : "Single-Page Visits" , "description" : "Single-Page Visits" , "language" : null , "timezone" : "UTC -1" , "dimensions" : [ { "ID" : "Pages" , "name" : "Pages" } ] , "measures" : [ { "name" : "Visits" , "ID" : "Visits" , "columnID" : 0 , "measureFormatType" : null } ] } ,"data" : [ { "http://marketplace.mozilla.org/" : { "attributes" : { "Title" : "Firefox Marketplace" } , "measures" : { "Visits" : 4004 } , "SubRows" : [ { "period" : "Day" , "start_date" : "2012-10-25" , "end_date" : "2012-10-25" , "attributes" : { } , "measures" : { "Visits" : 673 } , "SubRows" : null } , { "period" : "Day" , "start_date" : "2012-10-26" , "end_date" : "2012-10-26" , "attributes" : { } , "measures" : { "Visits" : 558 } , ....
The actual URL will vary per report, but when you start working on this, msg me and I'll send you user name and password and you can build code based on this example.
Assignee | ||
Comment 3•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•