-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathreddit.h
37 lines (27 loc) · 1.17 KB
/
reddit.h
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
29
30
31
32
33
34
35
36
37
#ifndef REDDIT_H
#define REDDIT_H
#include <stdbool.h>
#include "json-actor-boxed.h"
#include "common.h"
#include "logconf.h"
/* see specs/reddit/ for specs */
#include "specs-code/reddit/one-specs.h"
#define REDDIT_BASE_API_URL "https://www.reddit.com"
#define REDDIT_BASE_OAUTH_URL "https://oauth.reddit.com"
struct reddit *reddit_init(const char username[],
const char password[],
const char client_id[],
const char client_secret[]);
struct reddit *reddit_config_init(const char config_file[]);
void reddit_cleanup(struct reddit *client);
ORCAcode reddit_access_token(struct reddit *client,
struct reddit_access_token_params *params,
struct sized_buffer *ret);
ORCAcode reddit_comment(struct reddit *client,
struct reddit_comment_params *params,
struct sized_buffer *ret);
ORCAcode reddit_search(struct reddit *client,
struct reddit_search_params *params,
char subreddit[],
struct sized_buffer *ret);
#endif /* REDDIT_H */