Module: Octokit::Client::Traffic
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/traffic.rb |
Overview
Methods for the Traffic
API
Instance Method Summary
-
#clones(repo, options = {}) ⇒ Sawyer::Resource
Get the total number of clones and breakdown per day or week for the last 14 days.
-
#top_paths(repo, options = {}) ⇒ Array<Sawyer::Resource>
Get the top 10 popular contents over the last 14 days.
-
#top_referrers(repo, options = {}) ⇒ Array<Sawyer::Resource>
Get the top 10 referrers over the last 14 days.
-
#views(repo, options = {}) ⇒ Sawyer::Resource
Get the total number of views and breakdown per day or week for the last 14 days.
Instance Method Details
#clones(repo, options = {}) ⇒ Sawyer::Resource
Get the total number of clones and breakdown per day or week for the last 14 days
# File 'lib/octokit/client/traffic.rb', line 59
def clones(repo, = {}) get "#{Repository.path repo}/traffic/clones", end
#top_paths(repo, options = {}) ⇒ Array
<Sawyer::Resource
>
Get the top 10 popular contents over the last 14 days
# File 'lib/octokit/client/traffic.rb', line 27
def top_paths(repo, = {}) get "#{Repository.path repo}/traffic/popular/paths", end
#top_referrers(repo, options = {}) ⇒ Array
<Sawyer::Resource
>
Get the top 10 referrers over the last 14 days
# File 'lib/octokit/client/traffic.rb', line 16
def top_referrers(repo, = {}) get "#{Repository.path repo}/traffic/popular/referrers", end
#views(repo, options = {}) ⇒ Sawyer::Resource
Get the total number of views and breakdown per day or week for the last 14 days
# File 'lib/octokit/client/traffic.rb', line 43
def views(repo, = {}) get "#{Repository.path repo}/traffic/views", end