How To - Find Messages

From The Socknet

Jump to: navigation, search

In several cases, a service or friend's provider will want to access a user's list of sent and received messages.

Examples

  • A user has just made a friend and the provider wants to introduce their latest messages into the user's timeline
  • A service wants to make use of a user's messages but has not requested to receive all notifications

In addition, this will be the most used function for client applications.

Contents

Super simplicity

Finding messages involves using the find_message function.

The response contains a results field containing objects matching the get_message response format.

If no filter is specified, all known messages are returned (subject to pagination).

Example

POST find_message
{ from: { serviceid: "http://funny-message-remixer.com" },
  pagination: { 
               results_per_page: 15,
               page: 1
              },
  filter: ...
}
->
{ request: {
             from: { serviceid: "http://funny-message-remixer.com" },
             pagination: { 
               results_per_page: 15,
               page: 1
              },
             filter: ...
           },
  pagination: { 
                pages: 12,
                results_per_page: 15,
                page: 1
              },
  results: [ { guid: { 
                      openid: "http://example.com/david",
                      id: "23353"
                     },
               ...
             },
             ...
           ]
}

Considerations

The function name is written in the singular tense to match the related function names. This may change during the alpha stage.

See Also

Personal tools