diff options
Diffstat (limited to 'docs/en/users/06_Mobile_access.md')
| -rw-r--r-- | docs/en/users/06_Mobile_access.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/en/users/06_Mobile_access.md b/docs/en/users/06_Mobile_access.md index 166985585..c354f98f0 100644 --- a/docs/en/users/06_Mobile_access.md +++ b/docs/en/users/06_Mobile_access.md @@ -7,6 +7,9 @@ This page assumes you have completed the [server setup](../admins/02_Installatio * Every user must define an API password. * The reason for an API-specific password is that it may be used in less safe situations than the main password, and does not grant access to as many things. +The rest of this page is about the Google Reader compatible API. +See the [page about the Fever compatible API](06_Fever_API.md) for another possibility. + # Testing @@ -50,3 +53,34 @@ This page assumes you have completed the [server setup](../admins/02_Installatio * [EasyRSS](https://github.com/Alkarex/EasyRSS) (Open source, [F-Droid](https://f-droid.org/packages/org.freshrss.easyrss/)) * Linux * [FeedReader 2.0+](https://jangernert.github.io/FeedReader/) (Open source) + + +# Google Reader compatible API + +Examples of basic queries: + +```sh +# Initial login, using API password (Email and Passwd can be given either as GET, or POST - better) +curl 'https://freshrss.example.net/api/greader.php/accounts/ClientLogin?Email=alice&Passwd=Abcdef123456' +SID=alice/8e6845e089457af25303abc6f53356eb60bdb5f8 +Auth=alice/8e6845e089457af25303abc6f53356eb60bdb5f8 + +# Examples of read-only requests +curl -s -H "Authorization:GoogleLogin auth=alice/8e6845e089457af25303abc6f53356eb60bdb5f8" \ + 'https://freshrss.example.net/api/greader.php/reader/api/0/subscription/list?output=json' + +curl -s -H "Authorization:GoogleLogin auth=alice/8e6845e089457af25303abc6f53356eb60bdb5f8" \ + 'https://freshrss.example.net/api/greader.php/reader/api/0/unread-count?output=json' + +curl -s -H "Authorization:GoogleLogin auth=alice/8e6845e089457af25303abc6f53356eb60bdb5f8" \ + 'https://freshrss.example.net/api/greader.php/reader/api/0/tag/list?output=json' + +# Retrieve a token for requests making modifications +curl -H "Authorization:GoogleLogin auth=alice/8e6845e089457af25303abc6f53356eb60bdb5f8" \ + 'https://freshrss.example.net/api/greader.php/reader/api/0/token' +8e6845e089457af25303abc6f53356eb60bdb5f8ZZZZZZZZZZZZZZZZZ + +# Get articles, piped to jq for easier JSON reading +curl -s -H "Authorization:GoogleLogin auth=alice/8e6845e089457af25303abc6f53356eb60bdb5f8" \ + 'https://freshrss.example.net/api/greader.php/reader/api/0/stream/contents/reading-list' | jq . +``` |
