-
Notifications
You must be signed in to change notification settings - Fork 53
Service access points of snsapi
HU, Pili edited this page Jul 1, 2013
·
2 revisions
This page explains the SAP upper layer can use.
Common public methods you can use:
auth
home_timeline
update
reply
forward
- Message.parsed: Refer to data fields in this object.
Use only "mandatory fields" if you want your app able to generalize to multiple platforms.
Use optional through
get()
method in case they do not exist on some platform. - Message.raw: If you want finer-grained processing of the Message, you can refer to this field. Do not recommend you to do so unless necessary. Try to learn the object structure yourself before doing anything with it.
- Message.ID: Refer to it as a whole.
You can
str()
MessageID object. Do not tap into its fields if possible.
Similarly, when you refer to other objects in this project, please do not use non-mandatory fields if possible. Since data types are heterogeneous, we only guarantee mandatory fields are there. In this way, you can make your app generalize to all platforms without worrying what is that platform (the purpose of SNSAPI).
related issue: https://github.com/hupili/snsapi/pull/60