21 KiB
openapi.api.DefaultApi
Load the API package
import 'package:openapi/api.dart';
All URIs are relative to https://localhost:8080/apps/news
Method | HTTP request | Description |
---|---|---|
addFeed | POST /api/v1-2/feeds | |
createFolder | POST /api/v1-2/folders | |
deleteFeed | DELETE /api/v1-2/feeds/{feedId} | |
deleteFolder | DELETE /api/v1-2/folders/{folderId} | |
listArticles | GET /api/v1-2/items | |
listFeeds | GET /api/v1-2/feeds | |
listFolders | GET /api/v1-2/folders | |
listUpdatedArticles | GET /api/v1-2/items/updated | |
markArticleAsRead | PUT /api/v1-2/items/{itemId}/read | |
markArticleAsUnread | PUT /api/v1-2/items/{itemId}/unread | |
markFeedAsRead | PUT /api/v1-2/feeds/{feedId}/read | |
markFolderAsRead | PUT /api/v1-2/folders/{folderId}/read | |
moveFeed | PUT /api/v1-2/feeds/{feedId}/move | |
renameFeed | PUT /api/v1-2/feeds/{feedId}/rename | |
renameFolder | PUT /api/v1-2/folders/{folderId} | |
starArticle | PUT /api/v1-2/items/{feedId}/{guidHash}/star | |
unstarArticle | PUT /api/v1-2/items/{feedId}/{guidHash}/unstar |
addFeed
NewsListFeeds addFeed(url, folderId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final url = url_example; // String |
final folderId = 56; // int |
try {
final result = api_instance.addFeed(url, folderId);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->addFeed: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
url | String | ||
folderId | int | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createFolder
NewsListFolders createFolder(name)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final name = name_example; // String |
try {
final result = api_instance.createFolder(name);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createFolder: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
name | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteFeed
deleteFeed(feedId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final feedId = 56; // int |
try {
api_instance.deleteFeed(feedId);
} catch (e) {
print('Exception when calling DefaultApi->deleteFeed: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
feedId | int |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteFolder
deleteFolder(folderId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final folderId = 56; // int |
try {
api_instance.deleteFolder(folderId);
} catch (e) {
print('Exception when calling DefaultApi->deleteFolder: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
folderId | int |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listArticles
NewsListArticles listArticles(type, id, getRead, batchSize, offset, oldestFirst)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final type = 56; // int |
final id = 56; // int |
final getRead = true; // bool |
final batchSize = 56; // int |
final offset = 56; // int |
final oldestFirst = true; // bool |
try {
final result = api_instance.listArticles(type, id, getRead, batchSize, offset, oldestFirst);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->listArticles: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
type | int | [optional] [default to 3] | |
id | int | [optional] [default to 0] | |
getRead | bool | [optional] [default to true] | |
batchSize | int | [optional] [default to -1] | |
offset | int | [optional] [default to 0] | |
oldestFirst | bool | [optional] [default to false] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listFeeds
NewsListFeeds listFeeds()
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
try {
final result = api_instance.listFeeds();
print(result);
} catch (e) {
print('Exception when calling DefaultApi->listFeeds: $e\n');
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listFolders
NewsListFolders listFolders()
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
try {
final result = api_instance.listFolders();
print(result);
} catch (e) {
print('Exception when calling DefaultApi->listFolders: $e\n');
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listUpdatedArticles
NewsListArticles listUpdatedArticles(type, id, lastModified)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final type = 56; // int |
final id = 56; // int |
final lastModified = 56; // int |
try {
final result = api_instance.listUpdatedArticles(type, id, lastModified);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->listUpdatedArticles: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
type | int | [optional] [default to 3] | |
id | int | [optional] [default to 0] | |
lastModified | int | [optional] [default to 0] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
markArticleAsRead
markArticleAsRead(itemId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final itemId = 56; // int |
try {
api_instance.markArticleAsRead(itemId);
} catch (e) {
print('Exception when calling DefaultApi->markArticleAsRead: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
itemId | int |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
markArticleAsUnread
markArticleAsUnread(itemId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final itemId = 56; // int |
try {
api_instance.markArticleAsUnread(itemId);
} catch (e) {
print('Exception when calling DefaultApi->markArticleAsUnread: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
itemId | int |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
markFeedAsRead
markFeedAsRead(feedId, newestItemId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final feedId = 56; // int |
final newestItemId = 56; // int |
try {
api_instance.markFeedAsRead(feedId, newestItemId);
} catch (e) {
print('Exception when calling DefaultApi->markFeedAsRead: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
feedId | int | ||
newestItemId | int |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
markFolderAsRead
markFolderAsRead(folderId, newestItemId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final folderId = 56; // int | ID of the folder
final newestItemId = 56; // int | The newest read item
try {
api_instance.markFolderAsRead(folderId, newestItemId);
} catch (e) {
print('Exception when calling DefaultApi->markFolderAsRead: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
folderId | int | ID of the folder | |
newestItemId | int | The newest read item |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
moveFeed
moveFeed(feedId, folderId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final feedId = 56; // int |
final folderId = 56; // int |
try {
api_instance.moveFeed(feedId, folderId);
} catch (e) {
print('Exception when calling DefaultApi->moveFeed: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
feedId | int | ||
folderId | int | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
renameFeed
renameFeed(feedId, feedTitle)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final feedId = 56; // int |
final feedTitle = feedTitle_example; // String |
try {
api_instance.renameFeed(feedId, feedTitle);
} catch (e) {
print('Exception when calling DefaultApi->renameFeed: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
feedId | int | ||
feedTitle | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
renameFolder
renameFolder(folderId, name)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final folderId = 56; // int |
final name = name_example; // String |
try {
api_instance.renameFolder(folderId, name);
} catch (e) {
print('Exception when calling DefaultApi->renameFolder: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
folderId | int | ||
name | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
starArticle
starArticle(feedId, guidHash)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final feedId = 56; // int |
final guidHash = guidHash_example; // String |
try {
api_instance.starArticle(feedId, guidHash);
} catch (e) {
print('Exception when calling DefaultApi->starArticle: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
feedId | int | ||
guidHash | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
unstarArticle
unstarArticle(feedId, guidHash)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final feedId = 56; // int |
final guidHash = guidHash_example; // String |
try {
api_instance.unstarArticle(feedId, guidHash);
} catch (e) {
print('Exception when calling DefaultApi->unstarArticle: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
feedId | int | ||
guidHash | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]