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(newsAddFeed)
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 newsAddFeed = NewsAddFeed(); // NewsAddFeed |
try {
final result = api_instance.addFeed(newsAddFeed);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->addFeed: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| newsAddFeed | NewsAddFeed |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createFolder
NewsListFolders createFolder(newsCreateFolder)
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 newsCreateFolder = NewsCreateFolder(); // NewsCreateFolder |
try {
final result = api_instance.createFolder(newsCreateFolder);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createFolder: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| newsCreateFolder | NewsCreateFolder |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- 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] | |
| id | int | [optional] | |
| getRead | bool | [optional] | |
| batchSize | int | [optional] | |
| offset | int | [optional] | |
| oldestFirst | bool | [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]
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(lastModified, type, id)
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 lastModified = 56; // int |
final type = 56; // int |
final id = 56; // int |
try {
final result = api_instance.listUpdatedArticles(lastModified, type, id);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->listUpdatedArticles: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lastModified | int | [optional] | |
| type | int | [optional] | |
| id | 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]
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, newsMarkAsRead)
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 newsMarkAsRead = NewsMarkAsRead(); // NewsMarkAsRead |
try {
api_instance.markFeedAsRead(feedId, newsMarkAsRead);
} catch (e) {
print('Exception when calling DefaultApi->markFeedAsRead: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| feedId | int | ||
| newsMarkAsRead | NewsMarkAsRead |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
markFolderAsRead
markFolderAsRead(folderId, newsMarkAsRead)
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 newsMarkAsRead = NewsMarkAsRead(); // NewsMarkAsRead |
try {
api_instance.markFolderAsRead(folderId, newsMarkAsRead);
} catch (e) {
print('Exception when calling DefaultApi->markFolderAsRead: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| folderId | int | ||
| newsMarkAsRead | NewsMarkAsRead |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
moveFeed
moveFeed(feedId, newsMoveFeed)
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 newsMoveFeed = NewsMoveFeed(); // NewsMoveFeed |
try {
api_instance.moveFeed(feedId, newsMoveFeed);
} catch (e) {
print('Exception when calling DefaultApi->moveFeed: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| feedId | int | ||
| newsMoveFeed | NewsMoveFeed |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
renameFeed
renameFeed(feedId, newsRenameFeed)
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 newsRenameFeed = NewsRenameFeed(); // NewsRenameFeed |
try {
api_instance.renameFeed(feedId, newsRenameFeed);
} catch (e) {
print('Exception when calling DefaultApi->renameFeed: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| feedId | int | ||
| newsRenameFeed | NewsRenameFeed |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
renameFolder
renameFolder(folderId, newsRenameFolder)
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 newsRenameFolder = NewsRenameFolder(); // NewsRenameFolder |
try {
api_instance.renameFolder(folderId, newsRenameFolder);
} catch (e) {
print('Exception when calling DefaultApi->renameFolder: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| folderId | int | ||
| newsRenameFolder | NewsRenameFolder |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- 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]