Class: Pupil::DirectMessage
Instance Method Summary collapse
-
#destroy ⇒ Hash
Delete direct message.
- #recipient ⇒ Object
- #sender ⇒ Object
Methods inherited from Scheme
Methods included from Essentials
#get, #guess_parameter, #post, #serialize_parameter
Constructor Details
This class inherits a constructor from Pupil::Scheme
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Pupil::Scheme
Instance Method Details
#destroy ⇒ Hash
Delete direct message
183 184 185 186 187 188 189 190 |
# File 'lib/pupil/schemes.rb', line 183 def destroy() begin response = self.post("direct_messages/destroy/#{@element["id"]}.json") rescue return false end return response end |
#recipient ⇒ Object
178 |
# File 'lib/pupil/schemes.rb', line 178 def recipient() Pupil::User.new(@element["recipient"], @access_token) rescue nil; end |
#sender ⇒ Object
177 |
# File 'lib/pupil/schemes.rb', line 177 def sender() Pupil::User.new(@element["sender"], @access_token) rescue nil; end |