Data sync

account/listen

URL: https://fleep.io/api/account/listen

Use long poll to listen for notifications from Fleep

Input:

event_horizon       bigint          - latest event client has seen
wait                boolean = True  - Set to False if you want to get latest events
                                      but not stay waiting if there isn't any
download_url        text            - url from where to download new binary sent when server
                                      decides that client is too old and needs to be upgraded

Output:

event_horizon       bigint          - event horizon is moved to latest number in server
conv_count          integer         - optional if no update
messages            list

messages:

conv_url            text            - when user clicks on message
conversation_id     text            - conversation id
topic               text            - conevrsation topic
message             text            - message xml
author_name         text            - message author

account/poll

URL: https://fleep.io/api/account/poll

Handles long poll server side by storing connection information into connection table by the token.

Input:

event_horizon       bigint = 0      - latest event client has seen
wait                boolean = True  - Set to False if you want to get latest events
                                      but not stay waiting if there isn't any
poll_flags          text[] = null   - Can be used to fine tune polls
                                      according to client needs.
                                      skip_hidden - skip hidden conversations
                                      during initial sync.
                                      skip_rest - skip other conversations and start polling events
                                      used for limiting number of conversations loaded into client cache

Output:

event_horizon       bigint          - event horizon for next poll
stream              list            - ConvInfo, ContactInfo, MessageInfo, ActivityInfo, HookInfo
sync_progress       float           - indicates progess of sync from 0.0 to 1.0
static_version      text            - javascript version. Client should reload when changes
sync_cursor         text            - cursor that can be used to fetch next conversations

ConvInfo:

LabelInfo:

MessageInfo:

LockInfo:

ContactInfo:

FileInfo:

PreviewInfo:

ActivityInfo:

HangoutActivityInfo:

HookInfo:

RequestInfo:

TeamInfo:

SMTPInfo:
SMTPInfo
UploadInfo:
UploadInfo

account/sync

URL: https://fleep.io/api/account/sync

Use it to initialize some information using token..

Output:

event_horizon       bigint          - no point to read historic events either
                                      server must return good enough guess so
                                      that contacts and conversations will be
                                      in good enough order
email               text            - account's email
display_name        text            - account's display name
account_id          text            - Account ID
mk_account_status   text            - See Classificators

account/sync_conversations

URL: https://fleep.io/api/account/sync_conversations

Get next or previous batch of conversations

Input:

conversation_ids    text[] = null       - list of conversation id's to sync
mk_init_mode        text = 'ic_tiny'    - ic_header - header only
                                          ic_tiny - for minimal
                                          ic_full - ready for display

Output:

stream              list            - list of stream records needed to display the conversations

label/sync_conversations

URL: https://fleep.io/api/label/sync_conversations

Get next or previous batch of conversations

Input:

label_id            text                - label to be synced
sync_cursor         text = null         - cursor received from server with previous sync call
mk_init_mode        text = 'ic_tiny'    - ic_header - header only
                                          ic_tiny - for minimal
                                          ic_full - ready for display

Output:

stream              list            - list of stream records needed to display the conversations

Table Of Contents

Previous topic

Account management

Next topic

Classificators