Class: Bskyrb::AppBskyActorDefs::ProfileViewBasic

Inherits:
Object
  • Object
show all
Defined in:
lib/bskyrb/generated_classes.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#avatarObject

Returns the value of attribute avatar.



11
12
13
# File 'lib/bskyrb/generated_classes.rb', line 11

def avatar
  @avatar
end

#didObject

Returns the value of attribute did.



5
6
7
# File 'lib/bskyrb/generated_classes.rb', line 5

def did
  @did
end

#displayNameObject

Returns the value of attribute displayName.



9
10
11
# File 'lib/bskyrb/generated_classes.rb', line 9

def displayName
  @displayName
end

#handleObject

Returns the value of attribute handle.



7
8
9
# File 'lib/bskyrb/generated_classes.rb', line 7

def handle
  @handle
end

#labelsObject

Returns the value of attribute labels.



15
16
17
# File 'lib/bskyrb/generated_classes.rb', line 15

def labels
  @labels
end

#viewerObject

Returns the value of attribute viewer.



13
14
15
# File 'lib/bskyrb/generated_classes.rb', line 13

def viewer
  @viewer
end

Class Method Details

.from_hash(hash) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/bskyrb/generated_classes.rb', line 17

def self.from_hash(hash)
  # httparty-returned string-keyed hash
  instance = new

  instance.send(:did=, hash["did"])

  instance.send(:handle=, hash["handle"])

  instance.send(:displayName=, hash["displayName"])

  instance.send(:avatar=, hash["avatar"])

  instance.send(:viewer=, hash["viewer"])

  instance.send(:labels=, hash["labels"])

  instance
end