masheri 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,8 +42,8 @@ module Masheri
42
42
  Masheri::RestClient.new
43
43
  end
44
44
 
45
- def self.developer_activity(service_id, options)
46
- Masheri.rest.developer_activity(service_id, options)
45
+ def self.activity(activity_type, service_id, options)
46
+ Masheri.rest.activity(activity_type, service_id, options)
47
47
  end
48
48
  end
49
49
 
@@ -4,6 +4,14 @@ module Masheri
4
4
  Query.new(query_params).url
5
5
  end
6
6
 
7
+ def activity(activity_type, service_id, options)
8
+ if activity_type == "developer_activity"
9
+ developer_activity(service_id, options)
10
+ else
11
+ raise "No such activity type!"
12
+ end
13
+ end
14
+
7
15
  def developer_activity_query(service_id, options)
8
16
  query_options = {service_id: service_id, resource: "developer_activity"}.merge(options)
9
17
  Query.new(query_options)
@@ -7,6 +7,10 @@ module Masheri
7
7
  end
8
8
  end
9
9
 
10
+ def self.count
11
+ default_query.items(1).to_json["result"]["total_items"]
12
+ end
13
+
10
14
  def self.all
11
15
  default_query.all
12
16
  end
@@ -41,4 +45,3 @@ module Masheri
41
45
  end
42
46
  end
43
47
  end
44
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: masheri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -195,7 +195,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
195
  version: '0'
196
196
  segments:
197
197
  - 0
198
- hash: 2313416616875261274
198
+ hash: 3710577131008938035
199
199
  required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  none: false
201
201
  requirements: