Class: Unsplash::Stats

Inherits:
Client
  • Object
show all
Defined in:
lib/unsplash/stats.rb

Overview

Retrieve Unsplash stats

Class Method Summary collapse

Methods inherited from Client

#connection, connection, connection=, #initialize, #reload!, #to_h

Constructor Details

This class inherits a constructor from Unsplash::Client

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Unsplash::Client

Class Method Details

.totalHash

Get a list of statistics regardling Unsplash as a whole.

Returns:

  • (Hash)

    The numbers.



9
10
11
# File 'lib/unsplash/stats.rb', line 9

def total
  JSON.parse(connection.get("/stats/total").body)
end