Class: Envato::MarketsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/envato/resources/markets.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Envato::Resource

Instance Method Details

#number_of_files(site:) ⇒ Object



5
6
7
# File 'lib/envato/resources/markets.rb', line 5

def number_of_files(site:)
  Object.new get("v1/market/number-of-files:#{site}.json").body
end

#total_3doceanObject



33
34
35
# File 'lib/envato/resources/markets.rb', line 33

def total_3docean
  number_of_files(site: "3docean")
end

#total_audiojungleObject



25
26
27
# File 'lib/envato/resources/markets.rb', line 25

def total_audiojungle
  number_of_files(site: "audiojungle")
end

#total_codecanyonObject



17
18
19
# File 'lib/envato/resources/markets.rb', line 17

def total_codecanyon
  number_of_files(site: "codecanyon")
end

#total_graphicriverObject



29
30
31
# File 'lib/envato/resources/markets.rb', line 29

def total_graphicriver
  number_of_files(site: "graphicriver")
end

#total_itemsObject Also known as: total



37
38
39
# File 'lib/envato/resources/markets.rb', line 37

def total_items
  Object.new get("v1/market/total-items.json").body
end

#total_photoduneObject



13
14
15
# File 'lib/envato/resources/markets.rb', line 13

def total_photodune
  number_of_files(site: "photodune")
end

#total_themeforestObject



9
10
11
# File 'lib/envato/resources/markets.rb', line 9

def total_themeforest
  number_of_files(site: "themeforest")
end

#total_videohiveObject



21
22
23
# File 'lib/envato/resources/markets.rb', line 21

def total_videohive
  number_of_files(site: "videohive")
end