abouttreesummaryrefslogcommitdiff
path: root/examples/Sync.c
blob: a49cf652256952f521c5732aa884f898d75f051d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <matrix.h>
#include <stdio.h>

#define SERVER       "https://matrix.org"
#define ACCESS_TOKEN "syt_cHNjaG8_yBvTjVTquGCikvsAenOJ_49mBMO"
#define DEVICE_ID    "MAZNCCZLBR"

int
main(void)
{
    MatrixClient client;
    MatrixClientInit(&client,
        SERVER);
    
    MatrixHttpInit(&client);

    MatrixClientSetAccessToken(&client,
        ACCESS_TOKEN);

    static char syncBuffer[20000];
    MatrixClientSync(&client,
        syncBuffer, 20000);
    printf("%s", syncBuffer);
        
    MatrixHttpDeinit(&client);

    return 0;
}