Sha256: ce630b659437a15295939fd56dfb444695d6391a4f1b20f45d0a0093316a8cb4

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

module Datacentred
  module Request
    class Users < Base

      def self.create(payload={})
        post('users', payload.to_json)['user']
      end

      def self.list
        get('users')['users']
      end

      def self.show(id)
        get("users/#{id}")['user']
      end

      def self.update(id, payload)
        put("users/#{id}", payload.to_json)['user']
      end

      def self.destroy(id)
        delete("users/#{id}")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
datacentred-0.1.1pre lib/datacentred/request/users.rb
datacentred-0.1.0pre lib/datacentred/request/users.rb