|
|
@ -1702,7 +1702,7 @@ class NewsClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future<NewsListFolders> listFolders() async { |
|
|
|
Future<NewsListFolders> listFolders() async { |
|
|
|
var path = '/apps/news/api/v1-2/folders'; |
|
|
|
var path = '/apps/news/api/v1-3/folders'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1719,7 +1719,7 @@ class NewsClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future<NewsListFolders> createFolder({required String name}) async { |
|
|
|
Future<NewsListFolders> createFolder({required String name}) async { |
|
|
|
var path = '/apps/news/api/v1-2/folders'; |
|
|
|
var path = '/apps/news/api/v1-3/folders'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1740,7 +1740,7 @@ class NewsClient { |
|
|
|
required int folderId, |
|
|
|
required int folderId, |
|
|
|
required String name, |
|
|
|
required String name, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/folders/{folderId}'; |
|
|
|
var path = '/apps/news/api/v1-3/folders/{folderId}'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1759,7 +1759,7 @@ class NewsClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future deleteFolder({required int folderId}) async { |
|
|
|
Future deleteFolder({required int folderId}) async { |
|
|
|
var path = '/apps/news/api/v1-2/folders/{folderId}'; |
|
|
|
var path = '/apps/news/api/v1-3/folders/{folderId}'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1780,14 +1780,14 @@ class NewsClient { |
|
|
|
required int folderId, |
|
|
|
required int folderId, |
|
|
|
required int newestItemId, |
|
|
|
required int newestItemId, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/folders/{folderId}/read'; |
|
|
|
var path = '/apps/news/api/v1-3/folders/{folderId}/read'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
|
path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString())); |
|
|
|
path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString())); |
|
|
|
queryParameters['newestItemId'] = newestItemId.toString(); |
|
|
|
queryParameters['newestItemId'] = newestItemId.toString(); |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
'put', |
|
|
|
'post', |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
headers, |
|
|
|
headers, |
|
|
|
body, |
|
|
|
body, |
|
|
@ -1799,7 +1799,7 @@ class NewsClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future<NewsListFeeds> listFeeds() async { |
|
|
|
Future<NewsListFeeds> listFeeds() async { |
|
|
|
var path = '/apps/news/api/v1-2/feeds'; |
|
|
|
var path = '/apps/news/api/v1-3/feeds'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1819,7 +1819,7 @@ class NewsClient { |
|
|
|
required String url, |
|
|
|
required String url, |
|
|
|
int? folderId, |
|
|
|
int? folderId, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/feeds'; |
|
|
|
var path = '/apps/news/api/v1-3/feeds'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1840,7 +1840,7 @@ class NewsClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future deleteFeed({required int feedId}) async { |
|
|
|
Future deleteFeed({required int feedId}) async { |
|
|
|
var path = '/apps/news/api/v1-2/feeds/{feedId}'; |
|
|
|
var path = '/apps/news/api/v1-3/feeds/{feedId}'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1861,7 +1861,7 @@ class NewsClient { |
|
|
|
required int feedId, |
|
|
|
required int feedId, |
|
|
|
int? folderId, |
|
|
|
int? folderId, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/feeds/{feedId}/move'; |
|
|
|
var path = '/apps/news/api/v1-3/feeds/{feedId}/move'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1885,7 +1885,7 @@ class NewsClient { |
|
|
|
required int feedId, |
|
|
|
required int feedId, |
|
|
|
required String feedTitle, |
|
|
|
required String feedTitle, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/feeds/{feedId}/rename'; |
|
|
|
var path = '/apps/news/api/v1-3/feeds/{feedId}/rename'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1907,14 +1907,14 @@ class NewsClient { |
|
|
|
required int feedId, |
|
|
|
required int feedId, |
|
|
|
required int newestItemId, |
|
|
|
required int newestItemId, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/feeds/{feedId}/read'; |
|
|
|
var path = '/apps/news/api/v1-3/feeds/{feedId}/read'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
|
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); |
|
|
|
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); |
|
|
|
queryParameters['newestItemId'] = newestItemId.toString(); |
|
|
|
queryParameters['newestItemId'] = newestItemId.toString(); |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
'put', |
|
|
|
'post', |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
headers, |
|
|
|
headers, |
|
|
|
body, |
|
|
|
body, |
|
|
@ -1933,7 +1933,7 @@ class NewsClient { |
|
|
|
int offset = 0, |
|
|
|
int offset = 0, |
|
|
|
int oldestFirst = 0, |
|
|
|
int oldestFirst = 0, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/items'; |
|
|
|
var path = '/apps/news/api/v1-3/items'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1960,7 +1960,7 @@ class NewsClient { |
|
|
|
int id = 0, |
|
|
|
int id = 0, |
|
|
|
int lastModified = 0, |
|
|
|
int lastModified = 0, |
|
|
|
}) async { |
|
|
|
}) async { |
|
|
|
var path = '/apps/news/api/v1-2/items/updated'; |
|
|
|
var path = '/apps/news/api/v1-3/items/updated'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
@ -1980,13 +1980,13 @@ class NewsClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future markArticleAsRead({required int itemId}) async { |
|
|
|
Future markArticleAsRead({required int itemId}) async { |
|
|
|
var path = '/apps/news/api/v1-2/items/{itemId}/read'; |
|
|
|
var path = '/apps/news/api/v1-3/items/{itemId}/read'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
|
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); |
|
|
|
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
'put', |
|
|
|
'post', |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
headers, |
|
|
|
headers, |
|
|
|
body, |
|
|
|
body, |
|
|
@ -1998,13 +1998,13 @@ class NewsClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future markArticleAsUnread({required int itemId}) async { |
|
|
|
Future markArticleAsUnread({required int itemId}) async { |
|
|
|
var path = '/apps/news/api/v1-2/items/{itemId}/unread'; |
|
|
|
var path = '/apps/news/api/v1-3/items/{itemId}/unread'; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
|
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); |
|
|
|
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
'put', |
|
|
|
'post', |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
headers, |
|
|
|
headers, |
|
|
|
body, |
|
|
|
body, |
|
|
@ -2015,18 +2015,14 @@ class NewsClient { |
|
|
|
throw ApiException.fromResponse(response); |
|
|
|
throw ApiException.fromResponse(response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future starArticle({ |
|
|
|
Future starArticle({required int itemId}) async { |
|
|
|
required int feedId, |
|
|
|
var path = '/apps/news/api/v1-3/items/{itemId}/star'; |
|
|
|
required String guidHash, |
|
|
|
|
|
|
|
}) async { |
|
|
|
|
|
|
|
var path = '/apps/news/api/v1-2/items/{feedId}/{guidHash}/star'; |
|
|
|
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
|
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); |
|
|
|
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); |
|
|
|
path = path.replaceAll('{guidHash}', Uri.encodeQueryComponent(guidHash.toString())); |
|
|
|
|
|
|
|
final response = await rootClient.doRequest( |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
'put', |
|
|
|
'post', |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
headers, |
|
|
|
headers, |
|
|
|
body, |
|
|
|
body, |
|
|
@ -2037,18 +2033,14 @@ class NewsClient { |
|
|
|
throw ApiException.fromResponse(response); |
|
|
|
throw ApiException.fromResponse(response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Future unstarArticle({ |
|
|
|
Future unstarArticle({required int itemId}) async { |
|
|
|
required int feedId, |
|
|
|
var path = '/apps/news/api/v1-3/items/{itemId}/unstar'; |
|
|
|
required String guidHash, |
|
|
|
|
|
|
|
}) async { |
|
|
|
|
|
|
|
var path = '/apps/news/api/v1-2/items/{feedId}/{guidHash}/unstar'; |
|
|
|
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
final headers = <String, String>{}; |
|
|
|
Uint8List? body; |
|
|
|
Uint8List? body; |
|
|
|
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); |
|
|
|
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); |
|
|
|
path = path.replaceAll('{guidHash}', Uri.encodeQueryComponent(guidHash.toString())); |
|
|
|
|
|
|
|
final response = await rootClient.doRequest( |
|
|
|
final response = await rootClient.doRequest( |
|
|
|
'put', |
|
|
|
'post', |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
Uri(path: path, queryParameters: queryParameters).toString(), |
|
|
|
headers, |
|
|
|
headers, |
|
|
|
body, |
|
|
|
body, |
|
|
|