Sha256: d06e8cdb0fc74d8de4d3b043bc12649bd66ba2c0237557c79d199b0f727ff7eb

Contents?: true

Size: 785 Bytes

Versions: 2

Compression:

Stored size: 785 Bytes

Contents

module Mashery
  class Service < RpcClient::Base
    attribute :service_key,  String
    attribute :name,         String
    attribute :limits,       Hash
    attribute :created,      DateTime
    attribute :updated,      DateTime
    attribute :object_type,  String

    def activity(options = {})
      Mashery.rest.call("developer_activity", service_key, {
        # TODO: For API purposes, these values probably shouldn't be hard-coded
        start_date: 1.day.ago, end_date: 0.days.ago
      }.merge(options))
    end

    def errorcodes(options = {})
      Mashery.rest.call("errorcodes", service_key, {
        # TODO: For API purposes, these values probably shouldn't be hard-coded
        start_date: 1.day.ago, end_date: 0.days.ago
      }.merge(options))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mashery_rails-0.6.9.pre1 lib/mashery/service.rb
mashery_rails-0.6.8 lib/mashery/service.rb