From aa7a43ecac373ab5f969ab760b3c2bc7da678dfd Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 20 Sep 2018 14:07:22 +0200 Subject: Addind accountId and follows Signed-off-by: Maxence Lange --- appinfo/database.xml | 6 ++++ appinfo/info.xml | 2 +- appinfo/routes.php | 16 ++++++++--- js/test.js | 33 +++++++++++++++++++++- lib/Controller/ActivityStreamsController.php | 41 ++++++++++++++++++++++++++++ lib/Controller/ServiceAccountsController.php | 1 - lib/Db/ServiceAccountsRequest.php | 1 + lib/Db/ServiceAccountsRequestBuilder.php | 5 ++-- lib/Exceptions/APIRequestException.php | 8 ++++++ lib/Model/ServiceAccount.php | 36 ++++++++++++++++++++---- lib/Service/ActivityStreamsService.php | 30 ++++++++++++++++++++ lib/Service/CurlService.php | 19 ++++++++++--- lib/Service/ServiceAccountsService.php | 1 + lib/Service/ServicesService.php | 2 -- lib/Tools/Model/Request.php | 13 +++++++++ 15 files changed, 193 insertions(+), 21 deletions(-) create mode 100644 lib/Exceptions/APIRequestException.php diff --git a/appinfo/database.xml b/appinfo/database.xml index 4ee64cb4..1a615ac0 100644 --- a/appinfo/database.xml +++ b/appinfo/database.xml @@ -83,6 +83,12 @@ 127 + + account_id + integer + 7 + + status integer diff --git a/appinfo/info.xml b/appinfo/info.xml index e232b247..8c9e1088 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Social 🎉 Nextcloud becomes part of the federated social networks! - 0.0.9 + 0.0.10 agpl Maxence Lange Julius Härtl diff --git a/appinfo/routes.php b/appinfo/routes.php index e0f7a657..e2ecb5db 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -23,11 +23,19 @@ return [ 'name' => 'ActivityStreams#test', 'url' => '/user/account/{accountId}/test', 'verb' => 'GET' ], + [ + 'name' => 'ActivityStreams#posts', 'url' => '/user/account/{accountId}/posts', + 'verb' => 'GET' + ], + [ + 'name' => 'ActivityStreams#follows', 'url' => '/user/account/{accountId}/follows', + 'verb' => 'GET' + ], -// [ -// 'name' => 'OAuth2#getAuthUrl', 'url' => '/client/oauth2/auth/{serviceId}/', -// 'verb' => 'GET' -// ], + // [ + // 'name' => 'OAuth2#getAuthUrl', 'url' => '/client/oauth2/auth/{serviceId}/', + // 'verb' => 'GET' + // ], [ 'name' => 'OAuth2#setCode', 'url' => '/client/oauth2/redirect/{serviceId}/', 'verb' => 'GET' diff --git a/js/test.js b/js/test.js index cc1702b7..212485a3 100644 --- a/js/test.js +++ b/js/test.js @@ -41,8 +41,11 @@ elem.socialListAccounts.empty() for (var i = 0; i < data.result.accounts.length; i++) { var item = data.result.accounts[i] - elem.socialListAccounts.append($('