masheri 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ module Masheri
2
+ class Key < RestClient::Base
3
+ attr_accessor(:id, :created, :updated, :service_key, :apikey, :username, :status,
4
+ :rate_limit_ceiling, :qps_limit_ceiling, :rate_limit_exempt, :qps_limit_exempt,
5
+ :required_referer, :secret, :limits, :object_type)
6
+ end
7
+ end
@@ -1,7 +1,8 @@
1
1
  module Masheri
2
2
  class Member < RestClient::Base
3
- def self.object_type
4
- "members"
5
- end
3
+ attr_accessor(:created, :updated, :username, :email, :display_name,
4
+ :uri, :blog, :im, :imsvc, :phone, :company, :address1, :address2,
5
+ :locality, :region, :postal_code, :country_code, :first_name, :last_name,
6
+ :registration_ipaddr, :area_status, :external_id, :passwd_new, :object_type)
6
7
  end
7
8
  end
@@ -42,6 +42,10 @@ module Masheri
42
42
  def self.first
43
43
  new(standard_query.items(1).all.items[0])
44
44
  end
45
+
46
+ def self.object_type
47
+ self.name.underscore.pluralize
48
+ end
45
49
  end
46
50
  end
47
51
  end
@@ -2,14 +2,8 @@ module Masheri
2
2
  class Service < RestClient::Base
3
3
  attr_accessor :service_key, :name, :limits, :created, :updated, :object_type
4
4
 
5
- def self.object_type
6
- "services"
5
+ def activity(options = {})
6
+ Masheri.rest.activity("developer_activity", service_key, start_date: 1.day.ago, end_date: 0.days.ago)
7
7
  end
8
-
9
- def developer_activity(options = {})
10
- Masheri.rest.developer_activity(service_key, start_date: 1.day.ago, end_date: 0.days.ago)
11
- end
12
-
13
- alias :activity :developer_activity
14
8
  end
15
9
  end
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.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -168,6 +168,7 @@ files:
168
168
  - lib/masheri/config.rb
169
169
  - lib/masheri/exceptions.rb
170
170
  - lib/masheri/init.rb
171
+ - lib/masheri/key.rb
171
172
  - lib/masheri/local.rb
172
173
  - lib/masheri/member.rb
173
174
  - lib/masheri/query_builder.rb
@@ -196,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
197
  version: '0'
197
198
  segments:
198
199
  - 0
199
- hash: -3229905518716207910
200
+ hash: -3210032061883044166
200
201
  required_rubygems_version: !ruby/object:Gem::Requirement
201
202
  none: false
202
203
  requirements: