Class: DiasporaFederation::Entities::Request Deprecated

Inherits:
DiasporaFederation::Entity show all
Defined in:
lib/diaspora_federation/entities/request.rb

Overview

Deprecated.

will be replaced with Contact

This entity represents a sharing request for a user. A user issues it when they start sharing with another user.

See Also:

  • Validators::RequestValidator

Constant Summary

Constants inherited from DiasporaFederation::Entity

DiasporaFederation::Entity::ENTITY_NAME_REGEX, DiasporaFederation::Entity::INVALID_XML_REGEX

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DiasporaFederation::Entity

class_name, entity_class, entity_name, from_json, from_xml, #to_h, #to_json, #to_s, #to_xml

Methods included from PropertiesDSL

#class_props, #default_values, #entity, #find_property_for_xml_name, #missing_props, #optional_props, #property, #resolv_aliases, #xml_names

Methods included from Logging

included

Constructor Details

#initializeRequest

Returns a new instance of Request.


21
22
23
# File 'lib/diaspora_federation/entities/request.rb', line 21

def initialize(*)
  raise "Sending Request is not supported anymore! Use Contact instead!"
end

Instance Attribute Details

#authorString (readonly)

The diaspora* ID of the person who share their profile

Returns:

  • (String)

    sender ID

See Also:


13
# File 'lib/diaspora_federation/entities/request.rb', line 13

property :author, :string, xml_name: :sender_handle

#recipientString (readonly)

The diaspora* ID of the person who will be shared with

Returns:

  • (String)

    recipient ID

See Also:


19
# File 'lib/diaspora_federation/entities/request.rb', line 19

property :recipient, :string, xml_name: :recipient_handle

Class Method Details

.from_hash(hash) ⇒ Retraction

Returns instance.

Returns:


26
27
28
# File 'lib/diaspora_federation/entities/request.rb', line 26

def self.from_hash(hash)
  Contact.new(hash)
end