|
| 1 | +#ifndef XMPP_DEFINITIONS_H |
| 2 | +#define XMPP_DEFINITIONS_H |
| 3 | + |
| 4 | +#define XMPP_DEFAULT_BATCH_SIZE 100 |
| 5 | + |
| 6 | +// URLs. |
| 7 | +#define XMPP_URL_REEDAH "https://www.reedah.com" |
| 8 | +#define XMPP_URL_TOR "https://theoldreader.com" |
| 9 | +#define XMPP_URL_BAZQUX "https://bazqux.com" |
| 10 | +#define XMPP_URL_INOREADER "https://www.inoreader.com" |
| 11 | + |
| 12 | +// States. |
| 13 | +#define XMPP_API_STATE_READING_LIST "state/com.google/reading-list" |
| 14 | + |
| 15 | +// Means "read" message. If both "reading-list" and "read" are specified, message is READ. If this state |
| 16 | +// is not present, message is UNREAD. |
| 17 | +#define XMPP_API_STATE_READ "state/com.google/read" |
| 18 | +#define XMPP_API_STATE_IMPORTANT "state/com.google/starred" |
| 19 | + |
| 20 | +#define XMPP_API_FULL_STATE_READING_LIST "user/-/state/com.google/reading-list" |
| 21 | +#define XMPP_API_FULL_STATE_READ "user/-/state/com.google/read" |
| 22 | +#define XMPP_API_FULL_STATE_IMPORTANT "user/-/state/com.google/starred" |
| 23 | + |
| 24 | +// API. |
| 25 | +#define XMPP_API_CLIENT_LOGIN "accounts/ClientLogin" |
| 26 | +#define XMPP_API_TAG_LIST "reader/api/0/tag/list?output=json" |
| 27 | +#define XMPP_API_SUBSCRIPTION_LIST "reader/api/0/subscription/list?output=json" |
| 28 | +#define XMPP_API_STREAM_CONTENTS "reader/api/0/stream/contents/%1?output=json&n=%2" |
| 29 | +#define XMPP_API_EDIT_TAG "reader/api/0/edit-tag" |
| 30 | +#define XMPP_API_SUBSCRIPTION_EXPORT "reader/api/0/subscription/export" |
| 31 | +#define XMPP_API_SUBSCRIPTION_IMPORT "reader/api/0/subscription/import" |
| 32 | +#define XMPP_API_SUBSCRIPTION_EDIT "reader/api/0/subscription/edit?ac=%1&s=%2" |
| 33 | +#define XMPP_API_ITEM_IDS "reader/api/0/stream/items/ids?output=json&n=%2&s=%1" |
| 34 | +#define XMPP_API_ITEM_CONTENTS "reader/api/0/stream/items/contents?output=json&n=200000" |
| 35 | +#define XMPP_API_TOKEN "reader/api/0/token" |
| 36 | +#define XMPP_API_USER_INFO "reader/api/0/user-info?output=json" |
| 37 | + |
| 38 | +// Edit subscription ops. |
| 39 | +#define XMPP_API_EDIT_SUBSCRIPTION_ADD "subscribe" |
| 40 | +#define XMPP_API_EDIT_SUBSCRIPTION_MODIFY "edit" |
| 41 | +#define XMPP_API_EDIT_SUBSCRIPTION_DELETE "unsubscribe" |
| 42 | + |
| 43 | +// Misc. |
| 44 | +#define XMPP_API_ITEM_IDS_MAX 200000 |
| 45 | +#define XMPP_API_EDIT_TAG_BATCH 200 |
| 46 | +#define XMPP_API_ITEM_CONTENTS_BATCH 999 |
| 47 | +#define XMPP_GLOBAL_UPDATE_THRES 0.3 |
| 48 | + |
| 49 | +// The Old Reader. |
| 50 | +#define TOR_SPONSORED_STREAM_ID "tor/sponsored" |
| 51 | +#define TOR_ITEM_CONTENTS_BATCH 9999 |
| 52 | + |
| 53 | +// Inoreader. |
| 54 | +#define INO_ITEM_CONTENTS_BATCH 250 |
| 55 | + |
| 56 | +#define INO_HEADER_APPID "AppId" |
| 57 | +#define INO_HEADER_APPKEY "AppKey" |
| 58 | + |
| 59 | +#define INO_OAUTH_REDIRECT_URI_PORT 14488 |
| 60 | +#define INO_OAUTH_SCOPE "read write" |
| 61 | +#define INO_OAUTH_TOKEN_URL "https://www.inoreader.com/oauth2/token" |
| 62 | +#define INO_OAUTH_AUTH_URL "https://www.inoreader.com/oauth2/auth" |
| 63 | +#define INO_REG_API_URL "https://www.inoreader.com/developers/register-app" |
| 64 | + |
| 65 | +// FreshRSS. |
| 66 | +#define FRESHRSS_BASE_URL_PATH "api/xmpp.php/" |
| 67 | + |
| 68 | +#endif // XMPP_DEFINITIONS_H |
0 commit comments