- Source:
-
<static> byType(type, opts, auth, cb) → {object}
-
Returns a list of posts, authors, section topics or tags depending on specified type. Docs: analytics/{type}
Parameters:
Name Type Argument Description type
string One of
posts
,authors
,sections
,topics
,tags
opts
object <optional>
A list of options for the call
Properties
Name Type Argument Description days
string <optional>
Number of days since today to consider for _hits value. Defaults to 3.
period_start
mixed <optional>
Period of data to cover. Must supply
opts.period_end
as wellperiod_end
mixed <optional>
Period of data to cover, cannot be in the future. Must use
opts.period_start
as well.pub_date_state
mixed <optional>
Start date of content publication to consider. Must use
opts.pub_date_end
as well.pub_date_end
mixed <optional>
End date of content publication to consider. Must use
opts.pub_date_start
as well.sort
string <optional>
Sort value. Defaults to
_hits
limit
string <optional>
Number of records to retrieve, detauls to
10
page
string <optional>
Page number of results set, defaults to
1
auth
object <optional>
Authorization information. If not using, pass in
null
orundefined
Properties
Name Type Argument Description secretKey
string <optional>
If using oAuth your app's secret. Must be used with
auth.consumerKey
consumerKey
string <optional>
If using oAuth, your app's consumer key. Must be used with
auth.secretKey
sharedSecret
string <optional>
If using shared secrets, your shared secret
cb
function What to do when it's done!
- Source:
Returns:
undefined
- Type
- object
-
<static> metaValueDetail(meta, value, opts, auth) → {object}
-
Returns a list of posts falling under the specified author, section or topic. Docs: /analaytics/{meta}/{value}/detail
Parameters:
Name Type Argument Description meta
string What values to return. Must be one of
author
,section
,topic
,tag
value
string Search term for query
opts
object <optional>
A list of options for the call
Properties
Name Type Argument Description days
string <optional>
Number of days since today to consider for _hits value. Defaults to 3.
period_start
mixed <optional>
Period of data to cover. Must supply
opts.period_end
as wellperiod_end
mixed <optional>
Period of data to cover, cannot be in the future. Must use
opts.period_start
as well.pub_date_state
mixed <optional>
Start date of content publication to consider. Must use
opts.pub_date_end
as well.pub_date_end
mixed <optional>
End date of content publication to consider. Must use
opts.pub_date_start
as well.sort
string <optional>
Sort value. Defaults to
_hits
limit
string <optional>
Number of records to retrieve, detauls to
10
page
string <optional>
Page number of results set, defaults to
1
auth
object <optional>
Authorization information. If not using, pass in
null
orundefined
Properties
Name Type Argument Description secretKey
string <optional>
If using oAuth your app's secret. Must be used with
auth.consumerKey
consumerKey
string <optional>
If using oAuth, your app's consumer key. Must be used with
auth.secretKey
sharedSecret
string <optional>
If using shared secrets, your shared secret* @param {Function} cb [description]
- Source:
Returns:
undefined
- Type
- object
-
<static> postDetail(url, opts, auth, cb) → {object}
-
Returns the metadata and total pageviews for a post specified by URL. Docs: /analytics/post/detail
Parameters:
Name Type Argument Description url
string Canonical URL for asset. Must start with http/s
opts
object <optional>
A list of options for the call
Properties
Name Type Argument Description days
string <optional>
Number of days since today to consider for _hits value. Defaults to 3.
auth
object <optional>
Authorization information. If not using, pass in
null
orundefined
Properties
Name Type Argument Description secretKey
string <optional>
If using oAuth your app's secret. Must be used with
auth.consumerKey
consumerKey
string <optional>
If using oAuth, your app's consumer key. Must be used with
auth.secretKey
sharedSecret
string <optional>
If using shared secrets, your shared secret
cb
function What to do when it's done
- Source:
Returns:
undefined
- Type
- object