-
Couldn't load subscription status.
- Fork 2
Messenger Prototype Module Messenger
Vaughn edited this page May 4, 2018
·
3 revisions
MessengerPrototype :: Module :: Messenger
The Messenger module is a core module within this MessengerPrototype application. Currently, all messages and contacts are mocked. Automated mocked responses are sent back to the user after a successful message has been sent.
MessengerService.sendMessage$(contactId: String, message: String, ?attachment: Mixed) : Observable
// Observable and will return the generated Message
// object upon a successful message delivery.
MessengerService.createContact$(contact: Contact) : Observable
// Observable and will return the newly created contact
// information if the contact was saved successfully.
MessengerService.fetchContacts$() : Observable
// Observable and will return a collection of Contacts.
MessengerService.fetchContact$(contactId: String) : Observable
// Observable and will return a specific contact
// based on a passed contactId.
// Will return false if no contact matches.
MessengerService.fetchContactMessages$(contactId: String) : Observable
// Observable and will return messages for a specific
// contact based on a passed contactId.
// Will return false if no contact matches.
MessengerService.saveContact$(contact: Contact) : Observable
// Observable and will return the updated contact information
// if the passed Contact exists and was updated successfully.
// Will return false if no contact matches.
MessengerService.deleteContact$(contact: Contact) : Observable
// Observable and will return true if the passed Contact
// exists and was successfully deleted.
// Will return false if no contact matches.
Contact = {
(String) name: '', // The name for a contact
}
Message = {
(String) contactId: '', // The unique ID of a contact the message was sent to
(String) senderId: '', // The unique ID of the sender the message was sent from
(String) body: '', // The body of the message
(Object) attachment: {} // Optional. An attachment to append to the message
}
- ODIN Decentralised Platform (ØDP)
- ODIN Decentralised Applications (ØDA)
- ODIN Decentralised Extensions (ØDE)
- ODIN Decentralised Repository (ØDR)