diff --git a/app/src/main/java/com/github/gotify/MissedMessageUtil.java b/app/src/main/java/com/github/gotify/MissedMessageUtil.java index 661c63d2..d1978303 100644 --- a/app/src/main/java/com/github/gotify/MissedMessageUtil.java +++ b/app/src/main/java/com/github/gotify/MissedMessageUtil.java @@ -14,7 +14,7 @@ import static com.github.gotify.api.Callback.call; public class MissedMessageUtil { - static final int NO_MESSAGES = 0; + static final long NO_MESSAGES = 0; private final MessageApi api; @@ -22,8 +22,8 @@ public MissedMessageUtil(MessageApi api) { this.api = api; } - public void lastReceivedMessage(Callback.SuccessCallback successCallback) { - api.getMessages(1, 0) + public void lastReceivedMessage(Callback.SuccessCallback successCallback) { + api.getMessages(1, 0L) .enqueue( call( (messages) -> { @@ -37,11 +37,11 @@ public void lastReceivedMessage(Callback.SuccessCallback successCallbac (e) -> {})); } - public List missingMessages(int till) { + public List missingMessages(long till) { List result = new ArrayList<>(); try { - Integer since = null; + Long since = null; while (true) { PagedMessages pagedMessages = Api.execute(api.getMessages(10, since)); List messages = pagedMessages.getMessages(); @@ -61,7 +61,7 @@ public List missingMessages(int till) { return result; } - private List filter(List messages, int till) { + private List filter(List messages, long till) { List result = new ArrayList<>(); for (Message message : messages) { diff --git a/app/src/main/java/com/github/gotify/Utils.java b/app/src/main/java/com/github/gotify/Utils.java index fb9df517..2a3dd489 100644 --- a/app/src/main/java/com/github/gotify/Utils.java +++ b/app/src/main/java/com/github/gotify/Utils.java @@ -33,6 +33,10 @@ public static void showSnackBar(Activity activity, String message) { Snackbar.make(rootView, message, Snackbar.LENGTH_SHORT).show(); } + public static int longToInt(long value) { + return (int) (value % Integer.MAX_VALUE); + } + public static String dateToRelative(OffsetDateTime data) { long time = data.toInstant().toEpochMilli(); long now = System.currentTimeMillis(); diff --git a/app/src/main/java/com/github/gotify/messages/MessagesActivity.java b/app/src/main/java/com/github/gotify/messages/MessagesActivity.java index 3f9224b9..618198a3 100644 --- a/app/src/main/java/com/github/gotify/messages/MessagesActivity.java +++ b/app/src/main/java/com/github/gotify/messages/MessagesActivity.java @@ -114,10 +114,10 @@ public void onReceive(Context context, Intent intent) { private Settings settings; protected ApplicationHolder appsHolder; - private int appId = MessageState.ALL_MESSAGES; + private long appId = MessageState.ALL_MESSAGES; private boolean isLoadMore = false; - private Integer selectAppIdOnDrawerClose = null; + private Long selectAppIdOnDrawerClose = null; private PicassoHandler picassoHandler; @@ -223,7 +223,12 @@ protected void onUpdateApps(List applications) { targetReferences.clear(); updateMessagesAndStopLoading(messages.get(appId)); for (Application app : applications) { - MenuItem item = menu.add(R.id.apps, app.getId(), APPLICATION_ORDER, app.getName()); + MenuItem item = + menu.add( + R.id.apps, + Utils.longToInt(app.getId()), + APPLICATION_ORDER, + app.getName()); item.setCheckable(true); Target t = Utils.toDrawable(getResources(), item::setIcon); targetReferences.add(t); @@ -284,7 +289,7 @@ public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); if (item.getGroupId() == R.id.apps) { - selectAppIdOnDrawerClose = id; + selectAppIdOnDrawerClose = (long) id; startLoading(); toolbar.setSubtitle(item.getTitle()); } else if (id == R.id.nav_all_messages) { @@ -340,7 +345,10 @@ protected void onResume() { new UpdateMissedMessages().execute(messages.getLastReceivedMessage()); navigationView .getMenu() - .findItem(appId == MessageState.ALL_MESSAGES ? R.id.nav_all_messages : appId) + .findItem( + appId == MessageState.ALL_MESSAGES + ? R.id.nav_all_messages + : Utils.longToInt(appId)) .setChecked(true); super.onResume(); } @@ -525,10 +533,10 @@ public void onScrolled(RecyclerView view, int dx, int dy) { } } - private class UpdateMissedMessages extends AsyncTask { + private class UpdateMissedMessages extends AsyncTask { @Override - protected Boolean doInBackground(Integer... ids) { - Integer id = first(ids); + protected Boolean doInBackground(Long... ids) { + Long id = first(ids); if (id == -1) { return false; } @@ -562,10 +570,10 @@ public boolean onOptionsItemSelected(MenuItem item) { return super.onContextItemSelected(item); } - private class LoadMore extends AsyncTask> { + private class LoadMore extends AsyncTask> { @Override - protected List doInBackground(Integer... appId) { + protected List doInBackground(Long... appId) { return messages.loadMore(first(appId)); } @@ -575,7 +583,7 @@ protected void onPostExecute(List messageWithImages) { } } - private class SelectApplicationAndUpdateMessages extends AsyncTask { + private class SelectApplicationAndUpdateMessages extends AsyncTask { private SelectApplicationAndUpdateMessages(boolean withLoadingSpinner) { if (withLoadingSpinner) { @@ -584,14 +592,14 @@ private SelectApplicationAndUpdateMessages(boolean withLoadingSpinner) { } @Override - protected Integer doInBackground(Integer... appIds) { - Integer appId = first(appIds); + protected Long doInBackground(Long... appIds) { + Long appId = first(appIds); messages.loadMoreIfNotPresent(appId); return appId; } @Override - protected void onPostExecute(Integer appId) { + protected void onPostExecute(Long appId) { updateMessagesAndStopLoading(messages.get(appId)); } } @@ -624,14 +632,14 @@ protected void onPostExecute(Void data) { } } - private class DeleteMessages extends AsyncTask { + private class DeleteMessages extends AsyncTask { DeleteMessages() { startLoading(); } @Override - protected Boolean doInBackground(Integer... appId) { + protected Boolean doInBackground(Long... appId) { return messages.deleteAll(first(appId)); } diff --git a/app/src/main/java/com/github/gotify/messages/provider/MessageFacade.java b/app/src/main/java/com/github/gotify/messages/provider/MessageFacade.java index cacafb84..1252576a 100644 --- a/app/src/main/java/com/github/gotify/messages/provider/MessageFacade.java +++ b/app/src/main/java/com/github/gotify/messages/provider/MessageFacade.java @@ -18,7 +18,7 @@ public MessageFacade(MessageApi api, ApplicationHolder applicationHolder) { this.state = new MessageStateHolder(); } - public synchronized List get(Integer appId) { + public synchronized List get(long appId) { return combiner.combine(state.state(appId).messages, applicationHolder.get()); } @@ -28,7 +28,7 @@ public synchronized void addMessages(List messages) { } } - public synchronized List loadMore(Integer appId) { + public synchronized List loadMore(long appId) { MessageState state = this.state.state(appId); if (state.hasNext || !state.loaded) { PagedMessages pagedMessages = requester.loadMore(state); @@ -37,7 +37,7 @@ public synchronized List loadMore(Integer appId) { return get(appId); } - public synchronized void loadMoreIfNotPresent(Integer appId) { + public synchronized void loadMoreIfNotPresent(long appId) { MessageState state = this.state.state(appId); if (!state.loaded) { loadMore(appId); @@ -48,7 +48,7 @@ public synchronized void clear() { this.state.clear(); } - public int getLastReceivedMessage() { + public long getLastReceivedMessage() { return state.getLastReceivedMessage(); } @@ -70,13 +70,13 @@ public synchronized MessageDeletion undoDeleteLocal() { return this.state.undoPendingDeletion(); } - public synchronized boolean deleteAll(Integer appId) { + public synchronized boolean deleteAll(long appId) { boolean success = this.requester.deleteAll(appId); this.state.deleteAll(appId); return success; } - public synchronized boolean canLoadMore(Integer appId) { + public synchronized boolean canLoadMore(long appId) { return state.state(appId).hasNext; } } diff --git a/app/src/main/java/com/github/gotify/messages/provider/MessageImageCombiner.java b/app/src/main/java/com/github/gotify/messages/provider/MessageImageCombiner.java index 95cb18c9..a258b024 100644 --- a/app/src/main/java/com/github/gotify/messages/provider/MessageImageCombiner.java +++ b/app/src/main/java/com/github/gotify/messages/provider/MessageImageCombiner.java @@ -10,7 +10,7 @@ public class MessageImageCombiner { List combine(List messages, List applications) { - Map appIdToImage = appIdToImage(applications); + Map appIdToImage = appIdToImage(applications); List result = new ArrayList<>(); @@ -26,8 +26,8 @@ List combine(List messages, List applica return result; } - public static Map appIdToImage(List applications) { - Map map = new ConcurrentHashMap<>(); + public static Map appIdToImage(List applications) { + Map map = new ConcurrentHashMap<>(); for (Application app : applications) { map.put(app.getId(), app.getImage()); } diff --git a/app/src/main/java/com/github/gotify/messages/provider/MessageRequester.java b/app/src/main/java/com/github/gotify/messages/provider/MessageRequester.java index 8f07fdc0..707ffc85 100644 --- a/app/src/main/java/com/github/gotify/messages/provider/MessageRequester.java +++ b/app/src/main/java/com/github/gotify/messages/provider/MessageRequester.java @@ -35,7 +35,7 @@ void asyncRemoveMessage(Message message) { messageApi.deleteMessage(message.getId()).enqueue(Callback.call()); } - boolean deleteAll(Integer appId) { + boolean deleteAll(Long appId) { try { Log.i("Deleting all messages for " + appId); if (MessageState.ALL_MESSAGES == appId) { diff --git a/app/src/main/java/com/github/gotify/messages/provider/MessageState.java b/app/src/main/java/com/github/gotify/messages/provider/MessageState.java index 8c8db1eb..d90da5fb 100644 --- a/app/src/main/java/com/github/gotify/messages/provider/MessageState.java +++ b/app/src/main/java/com/github/gotify/messages/provider/MessageState.java @@ -5,11 +5,11 @@ import java.util.List; public class MessageState { - public static final int ALL_MESSAGES = -1; + public static final long ALL_MESSAGES = -1; - int appId; + long appId; boolean loaded; boolean hasNext; - int nextSince = 0; + long nextSince = 0; List messages = new ArrayList<>(); } diff --git a/app/src/main/java/com/github/gotify/messages/provider/MessageStateHolder.java b/app/src/main/java/com/github/gotify/messages/provider/MessageStateHolder.java index 25e37b49..4065d46a 100644 --- a/app/src/main/java/com/github/gotify/messages/provider/MessageStateHolder.java +++ b/app/src/main/java/com/github/gotify/messages/provider/MessageStateHolder.java @@ -6,8 +6,8 @@ import java.util.Map; class MessageStateHolder { - private int lastReceivedMessage = -1; - private Map states = new HashMap<>(); + private long lastReceivedMessage = -1; + private Map states = new HashMap<>(); private MessageDeletion pendingDeletion = null; @@ -15,7 +15,7 @@ synchronized void clear() { states = new HashMap<>(); } - synchronized void newMessages(Integer appId, PagedMessages pagedMessages) { + synchronized void newMessages(Long appId, PagedMessages pagedMessages) { MessageState state = state(appId); if (!state.loaded && pagedMessages.getMessages().size() > 0) { @@ -49,7 +49,7 @@ synchronized void newMessage(Message message) { if (deletion != null) deleteMessage(deletion.getMessage()); } - synchronized MessageState state(Integer appId) { + synchronized MessageState state(Long appId) { MessageState state = states.get(appId); if (state == null) { return emptyState(appId); @@ -57,14 +57,14 @@ synchronized MessageState state(Integer appId) { return state; } - synchronized void deleteAll(Integer appId) { + synchronized void deleteAll(Long appId) { clear(); MessageState state = state(appId); state.loaded = true; states.put(appId, state); } - private MessageState emptyState(Integer appId) { + private MessageState emptyState(Long appId) { MessageState emptyState = new MessageState(); emptyState.loaded = false; emptyState.hasNext = false; @@ -73,7 +73,7 @@ private MessageState emptyState(Integer appId) { return emptyState; } - synchronized int getLastReceivedMessage() { + synchronized long getLastReceivedMessage() { return lastReceivedMessage; } diff --git a/app/src/main/java/com/github/gotify/picasso/PicassoHandler.java b/app/src/main/java/com/github/gotify/picasso/PicassoHandler.java index c2f07174..546b06b4 100644 --- a/app/src/main/java/com/github/gotify/picasso/PicassoHandler.java +++ b/app/src/main/java/com/github/gotify/picasso/PicassoHandler.java @@ -32,7 +32,7 @@ public class PicassoHandler { private Cache picassoCache; private Picasso picasso; - private Map appIdToAppImage = new ConcurrentHashMap<>(); + private Map appIdToAppImage = new ConcurrentHashMap<>(); public PicassoHandler(Context context, Settings settings) { this.context = context; @@ -53,7 +53,7 @@ private Picasso makePicasso() { return new Picasso.Builder(context).downloader(downloader).build(); } - public Bitmap getIcon(Integer appId) { + public Bitmap getIcon(Long appId) { if (appId == -1) { return BitmapFactory.decodeResource(context.getResources(), R.drawable.gotify); } diff --git a/app/src/main/java/com/github/gotify/service/WebSocketService.java b/app/src/main/java/com/github/gotify/service/WebSocketService.java index 53664cea..fbce4195 100644 --- a/app/src/main/java/com/github/gotify/service/WebSocketService.java +++ b/app/src/main/java/com/github/gotify/service/WebSocketService.java @@ -33,19 +33,19 @@ import com.github.gotify.picasso.PicassoHandler; import java.util.List; import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; public class WebSocketService extends Service { public static final String NEW_MESSAGE_BROADCAST = WebSocketService.class.getName() + ".NEW_MESSAGE"; - private static final int NOT_LOADED = -2; + private static final long NOT_LOADED = -2; private Settings settings; private WebSocketConnection connection; - private AtomicInteger lastReceivedMessage = new AtomicInteger(NOT_LOADED); + private AtomicLong lastReceivedMessage = new AtomicLong(NOT_LOADED); private MissedMessageUtil missingMessageUtil; private PicassoHandler picassoHandler; @@ -143,7 +143,7 @@ private void onOpen() { } private void notifyMissedNotifications() { - int messageId = lastReceivedMessage.get(); + long messageId = lastReceivedMessage.get(); if (messageId == NOT_LOADED) { return; } @@ -231,16 +231,16 @@ private void foreground(String message) { private void showNotification( int id, String title, String message, long priority, Map extras) { - showNotification(id, title, message, priority, extras, -1); + showNotification(id, title, message, priority, extras, -1L); } private void showNotification( - int id, + long id, String title, String message, long priority, Map extras, - Integer appid) { + Long appid) { Intent intent; @@ -293,7 +293,7 @@ private void showNotification( NotificationManager notificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.notify(id, b.build()); + notificationManager.notify(Utils.longToInt(id), b.build()); } @RequiresApi(Build.VERSION_CODES.N) diff --git a/client/docs/Application.md b/client/docs/Application.md index dc6909fe..00abef6a 100644 --- a/client/docs/Application.md +++ b/client/docs/Application.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **String** | The description of the application. | -**id** | **Integer** | The application id. | +**id** | **Long** | The application id. | **image** | **String** | The image of the application. | **internal** | **Boolean** | Whether the application is an internal application. Internal applications should not be deleted. | **name** | **String** | The application name. This is how the application should be displayed to the user. | diff --git a/client/docs/ApplicationApi.md b/client/docs/ApplicationApi.md index d094ccba..4ac61b0f 100644 --- a/client/docs/ApplicationApi.md +++ b/client/docs/ApplicationApi.md @@ -110,7 +110,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); ApplicationApi apiInstance = new ApplicationApi(); -Integer id = 56; // Integer | the application id +Long id = 789L; // Long | the application id try { Void result = apiInstance.deleteApp(id); System.out.println(result); @@ -124,7 +124,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the application id | + **id** | **Long**| the application id | ### Return type @@ -235,7 +235,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); ApplicationApi apiInstance = new ApplicationApi(); Application body = new Application(); // Application | the application to update -Integer id = 56; // Integer | the application id +Long id = 789L; // Long | the application id try { Application result = apiInstance.updateApplication(body, id); System.out.println(result); @@ -250,7 +250,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Application**](Application.md)| the application to update | - **id** | **Integer**| the application id | + **id** | **Long**| the application id | ### Return type @@ -301,7 +301,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); ApplicationApi apiInstance = new ApplicationApi(); File file = new File("/path/to/file.txt"); // File | the application image -Integer id = 56; // Integer | the application id +Long id = 789L; // Long | the application id try { Application result = apiInstance.uploadAppImage(file, id); System.out.println(result); @@ -316,7 +316,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file** | **File**| the application image | - **id** | **Integer**| the application id | + **id** | **Long**| the application id | ### Return type diff --git a/client/docs/Client.md b/client/docs/Client.md index d562678d..3de1e6c5 100644 --- a/client/docs/Client.md +++ b/client/docs/Client.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **Integer** | The client id. | +**id** | **Long** | The client id. | **name** | **String** | The client name. This is how the client should be displayed to the user. | **token** | **String** | The client token. Can be used as `clientToken`. See Authentication. | diff --git a/client/docs/ClientApi.md b/client/docs/ClientApi.md index 2d1f8c72..aee74ad9 100644 --- a/client/docs/ClientApi.md +++ b/client/docs/ClientApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**createClient**](ClientApi.md#createClient) | **POST** client | Create a client. [**deleteClient**](ClientApi.md#deleteClient) | **DELETE** client/{id} | Delete a client. [**getClients**](ClientApi.md#getClients) | **GET** client | Return all clients. +[**updateClient**](ClientApi.md#updateClient) | **PUT** client/{id} | Update a client. @@ -108,7 +109,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); ClientApi apiInstance = new ClientApi(); -Integer id = 56; // Integer | the client id +Long id = 789L; // Long | the client id try { Void result = apiInstance.deleteClient(id); System.out.println(result); @@ -122,7 +123,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the client id | + **id** | **Long**| the client id | ### Return type @@ -197,3 +198,69 @@ This endpoint does not need any parameter. - **Content-Type**: application/json - **Accept**: application/json + +# **updateClient** +> Client updateClient(body, id) + +Update a client. + +### Example +```java +// Import classes: +//import com.github.gotify.client.ApiClient; +//import com.github.gotify.client.ApiException; +//import com.github.gotify.client.Configuration; +//import com.github.gotify.client.auth.*; +//import com.github.gotify.client.api.ClientApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: clientTokenHeader +ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader"); +clientTokenHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//clientTokenHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: clientTokenQuery +ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery"); +clientTokenQuery.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//clientTokenQuery.setApiKeyPrefix("Token"); + +ClientApi apiInstance = new ClientApi(); +Client body = new Client(); // Client | the client to update +Long id = 789L; // Long | the client id +try { + Client result = apiInstance.updateClient(body, id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ClientApi#updateClient"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md)| the client to update | + **id** | **Long**| the client id | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/client/docs/Health.md b/client/docs/Health.md new file mode 100644 index 00000000..e6181a29 --- /dev/null +++ b/client/docs/Health.md @@ -0,0 +1,11 @@ + +# Health + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**database** | **String** | The health of the database connection. | +**health** | **String** | The health of the overall application. | + + + diff --git a/client/docs/HealthApi.md b/client/docs/HealthApi.md new file mode 100644 index 00000000..0fbd9e56 --- /dev/null +++ b/client/docs/HealthApi.md @@ -0,0 +1,48 @@ +# HealthApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getHealth**](HealthApi.md#getHealth) | **GET** health | Get health information. + + + +# **getHealth** +> Health getHealth() + +Get health information. + +### Example +```java +// Import classes: +//import com.github.gotify.client.ApiException; +//import com.github.gotify.client.api.HealthApi; + + +HealthApi apiInstance = new HealthApi(); +try { + Health result = apiInstance.getHealth(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling HealthApi#getHealth"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Health**](Health.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/client/docs/Message.md b/client/docs/Message.md index e5baed97..64caad4d 100644 --- a/client/docs/Message.md +++ b/client/docs/Message.md @@ -4,11 +4,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**appid** | **Integer** | The application id that send this message. | +**appid** | **Long** | The application id that send this message. | **date** | [**OffsetDateTime**](OffsetDateTime.md) | The date the message was created. | **extras** | **Map<String, Object>** | The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes. | [optional] -**id** | **Integer** | The message id. | -**message** | **String** | The actual message. | +**id** | **Long** | The message id. | +**message** | **String** | The message. Markdown (excluding html) is allowed. | **priority** | **Long** | The priority of the message. | [optional] **title** | **String** | The title of the message. | [optional] diff --git a/client/docs/MessageApi.md b/client/docs/MessageApi.md index 22e8c03c..5f19cb47 100644 --- a/client/docs/MessageApi.md +++ b/client/docs/MessageApi.md @@ -109,7 +109,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); MessageApi apiInstance = new MessageApi(); -Integer id = 56; // Integer | the application id +Long id = 789L; // Long | the application id try { Void result = apiInstance.deleteAppMessages(id); System.out.println(result); @@ -123,7 +123,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the application id | + **id** | **Long**| the application id | ### Return type @@ -173,7 +173,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); MessageApi apiInstance = new MessageApi(); -Integer id = 56; // Integer | the message id +Long id = 789L; // Long | the message id try { Void result = apiInstance.deleteMessage(id); System.out.println(result); @@ -187,7 +187,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the message id | + **id** | **Long**| the message id | ### Return type @@ -297,9 +297,9 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); MessageApi apiInstance = new MessageApi(); -Integer id = 56; // Integer | the application id +Long id = 789L; // Long | the application id Integer limit = 100; // Integer | the maximal amount of messages to return -Integer since = 56; // Integer | return all messages with an ID less than this value +Long since = 789L; // Long | return all messages with an ID less than this value try { PagedMessages result = apiInstance.getAppMessages(id, limit, since); System.out.println(result); @@ -313,9 +313,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the application id | + **id** | **Long**| the application id | **limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100] - **since** | **Integer**| return all messages with an ID less than this value | [optional] + **since** | **Long**| return all messages with an ID less than this value | [optional] ### Return type @@ -366,7 +366,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); MessageApi apiInstance = new MessageApi(); Integer limit = 100; // Integer | the maximal amount of messages to return -Integer since = 56; // Integer | return all messages with an ID less than this value +Long since = 789L; // Long | return all messages with an ID less than this value try { PagedMessages result = apiInstance.getMessages(limit, since); System.out.println(result); @@ -381,7 +381,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100] - **since** | **Integer**| return all messages with an ID less than this value | [optional] + **since** | **Long**| return all messages with an ID less than this value | [optional] ### Return type diff --git a/client/docs/Paging.md b/client/docs/Paging.md index 37ca0599..ef1a360a 100644 --- a/client/docs/Paging.md +++ b/client/docs/Paging.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **limit** | **Long** | The limit of the messages for the current request. | **next** | **String** | The request url for the next page. Empty/Null when no next page is available. | [optional] -**since** | **Integer** | The ID of the last message returned in the current request. Use this as alternative to the next link. | +**since** | **Long** | The ID of the last message returned in the current request. Use this as alternative to the next link. | **size** | **Long** | The amount of messages that got returned in the current request. | diff --git a/client/docs/PluginApi.md b/client/docs/PluginApi.md index 0aa35444..f52d2351 100644 --- a/client/docs/PluginApi.md +++ b/client/docs/PluginApi.md @@ -47,7 +47,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); PluginApi apiInstance = new PluginApi(); -Integer id = 56; // Integer | the plugin id +Long id = 789L; // Long | the plugin id try { Void result = apiInstance.disablePlugin(id); System.out.println(result); @@ -61,7 +61,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the plugin id | + **id** | **Long**| the plugin id | ### Return type @@ -111,7 +111,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); PluginApi apiInstance = new PluginApi(); -Integer id = 56; // Integer | the plugin id +Long id = 789L; // Long | the plugin id try { Void result = apiInstance.enablePlugin(id); System.out.println(result); @@ -125,7 +125,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the plugin id | + **id** | **Long**| the plugin id | ### Return type @@ -175,7 +175,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); PluginApi apiInstance = new PluginApi(); -Integer id = 56; // Integer | the plugin id +Long id = 789L; // Long | the plugin id try { Object result = apiInstance.getPluginConfig(id); System.out.println(result); @@ -189,7 +189,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the plugin id | + **id** | **Long**| the plugin id | ### Return type @@ -239,7 +239,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); PluginApi apiInstance = new PluginApi(); -Integer id = 56; // Integer | the plugin id +Long id = 789L; // Long | the plugin id try { String result = apiInstance.getPluginDisplay(id); System.out.println(result); @@ -253,7 +253,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the plugin id | + **id** | **Long**| the plugin id | ### Return type @@ -363,7 +363,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); PluginApi apiInstance = new PluginApi(); -Integer id = 56; // Integer | the plugin id +Long id = 789L; // Long | the plugin id try { Void result = apiInstance.updatePluginConfig(id); System.out.println(result); @@ -377,7 +377,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the plugin id | + **id** | **Long**| the plugin id | ### Return type diff --git a/client/docs/PluginConf.md b/client/docs/PluginConf.md index 0a78fb1e..daecd726 100644 --- a/client/docs/PluginConf.md +++ b/client/docs/PluginConf.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **author** | **String** | The author of the plugin. | [optional] **capabilities** | **List<String>** | Capabilities the plugin provides | **enabled** | **Boolean** | Whether the plugin instance is enabled. | -**id** | **Integer** | The plugin id. | +**id** | **Long** | The plugin id. | **license** | **String** | The license of the plugin. | [optional] **modulePath** | **String** | The module path of the plugin. | **name** | **String** | The plugin name. | diff --git a/client/docs/User.md b/client/docs/User.md index 431c4c79..34b372cc 100644 --- a/client/docs/User.md +++ b/client/docs/User.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **admin** | **Boolean** | If the user is an administrator. | [optional] -**id** | **Integer** | The user id. | +**id** | **Long** | The user id. | **name** | **String** | The user name. For login. | diff --git a/client/docs/UserApi.md b/client/docs/UserApi.md index 3d8fd332..2305bba1 100644 --- a/client/docs/UserApi.md +++ b/client/docs/UserApi.md @@ -172,7 +172,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); UserApi apiInstance = new UserApi(); -Integer id = 56; // Integer | the user id +Long id = 789L; // Long | the user id try { Void result = apiInstance.deleteUser(id); System.out.println(result); @@ -186,7 +186,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the user id | + **id** | **Long**| the user id | ### Return type @@ -236,7 +236,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); UserApi apiInstance = new UserApi(); -Integer id = 56; // Integer | the user id +Long id = 789L; // Long | the user id try { User result = apiInstance.getUser(id); System.out.println(result); @@ -250,7 +250,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the user id | + **id** | **Long**| the user id | ### Return type @@ -424,7 +424,7 @@ clientTokenQuery.setApiKey("YOUR API KEY"); //clientTokenQuery.setApiKeyPrefix("Token"); UserApi apiInstance = new UserApi(); -Integer id = 56; // Integer | the user id +Long id = 789L; // Long | the user id UserWithPass body = new UserWithPass(); // UserWithPass | the updated user try { User result = apiInstance.updateUser(id, body); @@ -439,7 +439,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| the user id | + **id** | **Long**| the user id | **body** | [**UserWithPass**](UserWithPass.md)| the updated user | ### Return type diff --git a/client/docs/UserWithPass.md b/client/docs/UserWithPass.md index ad34a031..2a249128 100644 --- a/client/docs/UserWithPass.md +++ b/client/docs/UserWithPass.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **admin** | **Boolean** | If the user is an administrator. | [optional] -**id** | **Integer** | The user id. | +**id** | **Long** | The user id. | **name** | **String** | The user name. For login. | **pass** | **String** | The user password. For login. | diff --git a/client/src/main/java/com/github/gotify/client/JSON.java b/client/src/main/java/com/github/gotify/client/JSON.java index 918b3200..fdd1edbf 100644 --- a/client/src/main/java/com/github/gotify/client/JSON.java +++ b/client/src/main/java/com/github/gotify/client/JSON.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/client/src/main/java/com/github/gotify/client/StringUtil.java b/client/src/main/java/com/github/gotify/client/StringUtil.java index c042ca5f..b4f7158c 100644 --- a/client/src/main/java/com/github/gotify/client/StringUtil.java +++ b/client/src/main/java/com/github/gotify/client/StringUtil.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -13,7 +13,7 @@ package com.github.gotify.client; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java b/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java index 375e6ff4..2a7de1c6 100644 --- a/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java +++ b/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java @@ -43,7 +43,7 @@ Call createApp( }) @DELETE("application/{id}") Call deleteApp( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -70,7 +70,7 @@ Call deleteApp( }) @PUT("application/{id}") Call updateApplication( - @retrofit2.http.Body Application body, @retrofit2.http.Path("id") Integer id + @retrofit2.http.Body Application body, @retrofit2.http.Path("id") Long id ); /** @@ -83,7 +83,7 @@ Call updateApplication( @retrofit2.http.Multipart @POST("application/{id}/image") Call uploadAppImage( - @retrofit2.http.Part("file\"; filename=\"file") RequestBody file, @retrofit2.http.Path("id") Integer id + @retrofit2.http.Part("file\"; filename=\"file") RequestBody file, @retrofit2.http.Path("id") Long id ); } diff --git a/client/src/main/java/com/github/gotify/client/api/ClientApi.java b/client/src/main/java/com/github/gotify/client/api/ClientApi.java index 71cb1b69..3da8dda5 100644 --- a/client/src/main/java/com/github/gotify/client/api/ClientApi.java +++ b/client/src/main/java/com/github/gotify/client/api/ClientApi.java @@ -42,7 +42,7 @@ Call createClient( }) @DELETE("client/{id}") Call deleteClient( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -57,4 +57,19 @@ Call deleteClient( Call> getClients(); + /** + * Update a client. + * + * @param body the client to update (required) + * @param id the client id (required) + * @return Call<Client> + */ + @Headers({ + "Content-Type:application/json" + }) + @PUT("client/{id}") + Call updateClient( + @retrofit2.http.Body Client body, @retrofit2.http.Path("id") Long id + ); + } diff --git a/client/src/main/java/com/github/gotify/client/api/HealthApi.java b/client/src/main/java/com/github/gotify/client/api/HealthApi.java new file mode 100644 index 00000000..38a37a98 --- /dev/null +++ b/client/src/main/java/com/github/gotify/client/api/HealthApi.java @@ -0,0 +1,31 @@ +package com.github.gotify.client.api; + +import com.github.gotify.client.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import okhttp3.RequestBody; +import okhttp3.ResponseBody; + +import com.github.gotify.client.model.Health; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public interface HealthApi { + /** + * Get health information. + * + * @return Call<Health> + */ + @Headers({ + "Content-Type:application/json" + }) + @GET("health") + Call getHealth(); + + +} diff --git a/client/src/main/java/com/github/gotify/client/api/MessageApi.java b/client/src/main/java/com/github/gotify/client/api/MessageApi.java index 60df793a..8e54861e 100644 --- a/client/src/main/java/com/github/gotify/client/api/MessageApi.java +++ b/client/src/main/java/com/github/gotify/client/api/MessageApi.java @@ -43,7 +43,7 @@ Call createMessage( }) @DELETE("application/{id}/message") Call deleteAppMessages( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -57,7 +57,7 @@ Call deleteAppMessages( }) @DELETE("message/{id}") Call deleteMessage( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -85,7 +85,7 @@ Call deleteMessage( }) @GET("application/{id}/message") Call getAppMessages( - @retrofit2.http.Path("id") Integer id, @retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Integer since + @retrofit2.http.Path("id") Long id, @retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Long since ); /** @@ -100,7 +100,7 @@ Call getAppMessages( }) @GET("message") Call getMessages( - @retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Integer since + @retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Long since ); /** diff --git a/client/src/main/java/com/github/gotify/client/api/PluginApi.java b/client/src/main/java/com/github/gotify/client/api/PluginApi.java index b144706a..ed549089 100644 --- a/client/src/main/java/com/github/gotify/client/api/PluginApi.java +++ b/client/src/main/java/com/github/gotify/client/api/PluginApi.java @@ -28,7 +28,7 @@ public interface PluginApi { }) @POST("plugin/{id}/disable") Call disablePlugin( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -42,7 +42,7 @@ Call disablePlugin( }) @POST("plugin/{id}/enable") Call enablePlugin( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -56,7 +56,7 @@ Call enablePlugin( }) @GET("plugin/{id}/config") Call getPluginConfig( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -70,7 +70,7 @@ Call getPluginConfig( }) @GET("plugin/{id}/display") Call getPluginDisplay( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -96,7 +96,7 @@ Call getPluginDisplay( }) @POST("plugin/{id}/config") Call updatePluginConfig( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); } diff --git a/client/src/main/java/com/github/gotify/client/api/UserApi.java b/client/src/main/java/com/github/gotify/client/api/UserApi.java index cd598f4e..33aae214 100644 --- a/client/src/main/java/com/github/gotify/client/api/UserApi.java +++ b/client/src/main/java/com/github/gotify/client/api/UserApi.java @@ -56,7 +56,7 @@ Call createUser( }) @DELETE("user/{id}") Call deleteUser( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -70,7 +70,7 @@ Call deleteUser( }) @GET("user/{id}") Call getUser( - @retrofit2.http.Path("id") Integer id + @retrofit2.http.Path("id") Long id ); /** @@ -111,7 +111,7 @@ Call updateCurrentUser( }) @POST("user/{id}") Call updateUser( - @retrofit2.http.Path("id") Integer id, @retrofit2.http.Body UserWithPass body + @retrofit2.http.Path("id") Long id, @retrofit2.http.Body UserWithPass body ); } diff --git a/client/src/main/java/com/github/gotify/client/auth/OAuthFlow.java b/client/src/main/java/com/github/gotify/client/auth/OAuthFlow.java index 1db007ec..922a9971 100644 --- a/client/src/main/java/com/github/gotify/client/auth/OAuthFlow.java +++ b/client/src/main/java/com/github/gotify/client/auth/OAuthFlow.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/client/src/main/java/com/github/gotify/client/model/Application.java b/client/src/main/java/com/github/gotify/client/model/Application.java index fad91003..4087283d 100644 --- a/client/src/main/java/com/github/gotify/client/model/Application.java +++ b/client/src/main/java/com/github/gotify/client/model/Application.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,13 +27,13 @@ * The Application holds information about an app which can send notifications. */ @ApiModel(description = "The Application holds information about an app which can send notifications.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class Application { @SerializedName("description") private String description = null; @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("image") private String image = null; @@ -70,7 +70,7 @@ public void setDescription(String description) { * @return id **/ @ApiModelProperty(example = "5", required = true, value = "The application id.") - public Integer getId() { + public Long getId() { return id; } diff --git a/client/src/main/java/com/github/gotify/client/model/Client.java b/client/src/main/java/com/github/gotify/client/model/Client.java index 21f99881..a01090ac 100644 --- a/client/src/main/java/com/github/gotify/client/model/Client.java +++ b/client/src/main/java/com/github/gotify/client/model/Client.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,10 +27,10 @@ * The Client holds information about a device which can receive notifications (and other stuff). */ @ApiModel(description = "The Client holds information about a device which can receive notifications (and other stuff).") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class Client { @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("name") private String name = null; @@ -43,7 +43,7 @@ public class Client { * @return id **/ @ApiModelProperty(example = "5", required = true, value = "The client id.") - public Integer getId() { + public Long getId() { return id; } diff --git a/client/src/main/java/com/github/gotify/client/model/Error.java b/client/src/main/java/com/github/gotify/client/model/Error.java index c77a7c88..a4ab45ac 100644 --- a/client/src/main/java/com/github/gotify/client/model/Error.java +++ b/client/src/main/java/com/github/gotify/client/model/Error.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,7 @@ * The Error contains error relevant information. */ @ApiModel(description = "The Error contains error relevant information.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class Error { @SerializedName("error") private String error = null; diff --git a/client/src/main/java/com/github/gotify/client/model/Health.java b/client/src/main/java/com/github/gotify/client/model/Health.java new file mode 100644 index 00000000..9e9834b8 --- /dev/null +++ b/client/src/main/java/com/github/gotify/client/model/Health.java @@ -0,0 +1,117 @@ +/* + * Gotify REST-API. + * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) + * + * OpenAPI spec version: 2.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.github.gotify.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Health represents how healthy the application is. + */ +@ApiModel(description = "Health represents how healthy the application is.") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") +public class Health { + @SerializedName("database") + private String database = null; + + @SerializedName("health") + private String health = null; + + public Health database(String database) { + this.database = database; + return this; + } + + /** + * The health of the database connection. + * @return database + **/ + @ApiModelProperty(example = "green", required = true, value = "The health of the database connection.") + public String getDatabase() { + return database; + } + + public void setDatabase(String database) { + this.database = database; + } + + public Health health(String health) { + this.health = health; + return this; + } + + /** + * The health of the overall application. + * @return health + **/ + @ApiModelProperty(example = "green", required = true, value = "The health of the overall application.") + public String getHealth() { + return health; + } + + public void setHealth(String health) { + this.health = health; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Health health = (Health) o; + return Objects.equals(this.database, health.database) && + Objects.equals(this.health, health.health); + } + + @Override + public int hashCode() { + return Objects.hash(database, health); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Health {\n"); + + sb.append(" database: ").append(toIndentedString(database)).append("\n"); + sb.append(" health: ").append(toIndentedString(health)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/client/src/main/java/com/github/gotify/client/model/Message.java b/client/src/main/java/com/github/gotify/client/model/Message.java index eab6a975..a7b4e085 100644 --- a/client/src/main/java/com/github/gotify/client/model/Message.java +++ b/client/src/main/java/com/github/gotify/client/model/Message.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -31,10 +31,10 @@ * The MessageExternal holds information about a message which was sent by an Application. */ @ApiModel(description = "The MessageExternal holds information about a message which was sent by an Application.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class Message { @SerializedName("appid") - private Integer appid = null; + private Long appid = null; @SerializedName("date") private OffsetDateTime date = null; @@ -43,7 +43,7 @@ public class Message { private Map extras = null; @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("message") private String message = null; @@ -59,7 +59,7 @@ public class Message { * @return appid **/ @ApiModelProperty(example = "5", required = true, value = "The application id that send this message.") - public Integer getAppid() { + public Long getAppid() { return appid; } @@ -103,7 +103,7 @@ public void setExtras(Map extras) { * @return id **/ @ApiModelProperty(example = "25", required = true, value = "The message id.") - public Integer getId() { + public Long getId() { return id; } @@ -113,10 +113,10 @@ public Message message(String message) { } /** - * The actual message. + * The message. Markdown (excluding html) is allowed. * @return message **/ - @ApiModelProperty(example = "Backup was successfully finished.", required = true, value = "The actual message.") + @ApiModelProperty(example = "**Backup** was successfully finished.", required = true, value = "The message. Markdown (excluding html) is allowed.") public String getMessage() { return message; } diff --git a/client/src/main/java/com/github/gotify/client/model/PagedMessages.java b/client/src/main/java/com/github/gotify/client/model/PagedMessages.java index cf8fe4b8..ff4a25b6 100644 --- a/client/src/main/java/com/github/gotify/client/model/PagedMessages.java +++ b/client/src/main/java/com/github/gotify/client/model/PagedMessages.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -31,7 +31,7 @@ * Wrapper for the paging and the messages */ @ApiModel(description = "Wrapper for the paging and the messages") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class PagedMessages { @SerializedName("messages") private List messages = new ArrayList(); diff --git a/client/src/main/java/com/github/gotify/client/model/Paging.java b/client/src/main/java/com/github/gotify/client/model/Paging.java index 7a475b69..60b9051e 100644 --- a/client/src/main/java/com/github/gotify/client/model/Paging.java +++ b/client/src/main/java/com/github/gotify/client/model/Paging.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -24,10 +24,10 @@ import java.io.IOException; /** - * The Paging holds holds information about the limit and making requests to the next page. + * The Paging holds information about the limit and making requests to the next page. */ -@ApiModel(description = "The Paging holds holds information about the limit and making requests to the next page.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@ApiModel(description = "The Paging holds information about the limit and making requests to the next page.") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class Paging { @SerializedName("limit") private Long limit = null; @@ -36,7 +36,7 @@ public class Paging { private String next = null; @SerializedName("since") - private Integer since = null; + private Long since = null; @SerializedName("size") private Long size = null; @@ -67,7 +67,7 @@ public String getNext() { * @return since **/ @ApiModelProperty(example = "5", required = true, value = "The ID of the last message returned in the current request. Use this as alternative to the next link.") - public Integer getSince() { + public Long getSince() { return since; } diff --git a/client/src/main/java/com/github/gotify/client/model/PluginConf.java b/client/src/main/java/com/github/gotify/client/model/PluginConf.java index e486fcaf..fc51445e 100644 --- a/client/src/main/java/com/github/gotify/client/model/PluginConf.java +++ b/client/src/main/java/com/github/gotify/client/model/PluginConf.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -29,7 +29,7 @@ * Holds information about a plugin instance for one user. */ @ApiModel(description = "Holds information about a plugin instance for one user.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class PluginConf { @SerializedName("author") private String author = null; @@ -41,7 +41,7 @@ public class PluginConf { private Boolean enabled = null; @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("license") private String license = null; @@ -113,7 +113,7 @@ public void setEnabled(Boolean enabled) { * @return id **/ @ApiModelProperty(example = "25", required = true, value = "The plugin id.") - public Integer getId() { + public Long getId() { return id; } diff --git a/client/src/main/java/com/github/gotify/client/model/User.java b/client/src/main/java/com/github/gotify/client/model/User.java index 240db9e4..b6361277 100644 --- a/client/src/main/java/com/github/gotify/client/model/User.java +++ b/client/src/main/java/com/github/gotify/client/model/User.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,13 +27,13 @@ * The User holds information about permission and other stuff. */ @ApiModel(description = "The User holds information about permission and other stuff.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class User { @SerializedName("admin") private Boolean admin = null; @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("name") private String name = null; @@ -61,7 +61,7 @@ public void setAdmin(Boolean admin) { * @return id **/ @ApiModelProperty(example = "25", required = true, value = "The user id.") - public Integer getId() { + public Long getId() { return id; } diff --git a/client/src/main/java/com/github/gotify/client/model/UserPass.java b/client/src/main/java/com/github/gotify/client/model/UserPass.java index 1bfb3876..fb5b020a 100644 --- a/client/src/main/java/com/github/gotify/client/model/UserPass.java +++ b/client/src/main/java/com/github/gotify/client/model/UserPass.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,7 @@ * The Password for updating the user. */ @ApiModel(description = "The Password for updating the user.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class UserPass { @SerializedName("pass") private String pass = null; diff --git a/client/src/main/java/com/github/gotify/client/model/UserWithPass.java b/client/src/main/java/com/github/gotify/client/model/UserWithPass.java index c6f97e5c..25583a1c 100644 --- a/client/src/main/java/com/github/gotify/client/model/UserWithPass.java +++ b/client/src/main/java/com/github/gotify/client/model/UserWithPass.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,13 +27,13 @@ * The UserWithPass holds information about the credentials and other stuff. */ @ApiModel(description = "The UserWithPass holds information about the credentials and other stuff.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class UserWithPass { @SerializedName("admin") private Boolean admin = null; @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("name") private String name = null; @@ -64,7 +64,7 @@ public void setAdmin(Boolean admin) { * @return id **/ @ApiModelProperty(example = "25", required = true, value = "The user id.") - public Integer getId() { + public Long getId() { return id; } diff --git a/client/src/main/java/com/github/gotify/client/model/VersionInfo.java b/client/src/main/java/com/github/gotify/client/model/VersionInfo.java index 7d787074..58b36ff4 100644 --- a/client/src/main/java/com/github/gotify/client/model/VersionInfo.java +++ b/client/src/main/java/com/github/gotify/client/model/VersionInfo.java @@ -2,7 +2,7 @@ * Gotify REST-API. * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues) * - * OpenAPI spec version: 1.0.6 + * OpenAPI spec version: 2.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,7 @@ * VersionInfo Model */ @ApiModel(description = "VersionInfo Model") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-06-24T18:39:01.386+02:00") public class VersionInfo { @SerializedName("buildDate") private String buildDate = null; diff --git a/client/src/test/java/com/github/gotify/client/api/ApplicationApiTest.java b/client/src/test/java/com/github/gotify/client/api/ApplicationApiTest.java index 78659fd2..9e494b99 100644 --- a/client/src/test/java/com/github/gotify/client/api/ApplicationApiTest.java +++ b/client/src/test/java/com/github/gotify/client/api/ApplicationApiTest.java @@ -43,7 +43,7 @@ public void createAppTest() { */ @Test public void deleteAppTest() { - Integer id = null; + Long id = null; // Void response = api.deleteApp(id); // TODO: test validations @@ -67,7 +67,7 @@ public void getAppsTest() { @Test public void updateApplicationTest() { Application body = null; - Integer id = null; + Long id = null; // Application response = api.updateApplication(body, id); // TODO: test validations @@ -80,7 +80,7 @@ public void updateApplicationTest() { @Test public void uploadAppImageTest() { File file = null; - Integer id = null; + Long id = null; // Application response = api.uploadAppImage(file, id); // TODO: test validations diff --git a/client/src/test/java/com/github/gotify/client/api/ClientApiTest.java b/client/src/test/java/com/github/gotify/client/api/ClientApiTest.java index e4e07910..ed880835 100644 --- a/client/src/test/java/com/github/gotify/client/api/ClientApiTest.java +++ b/client/src/test/java/com/github/gotify/client/api/ClientApiTest.java @@ -42,7 +42,7 @@ public void createClientTest() { */ @Test public void deleteClientTest() { - Integer id = null; + Long id = null; // Void response = api.deleteClient(id); // TODO: test validations @@ -56,6 +56,19 @@ public void deleteClientTest() { public void getClientsTest() { // List response = api.getClients(); + // TODO: test validations + } + /** + * Update a client. + * + * + */ + @Test + public void updateClientTest() { + Client body = null; + Long id = null; + // Client response = api.updateClient(body, id); + // TODO: test validations } } diff --git a/client/src/test/java/com/github/gotify/client/api/HealthApiTest.java b/client/src/test/java/com/github/gotify/client/api/HealthApiTest.java new file mode 100644 index 00000000..83bea549 --- /dev/null +++ b/client/src/test/java/com/github/gotify/client/api/HealthApiTest.java @@ -0,0 +1,36 @@ +package com.github.gotify.client.api; + +import com.github.gotify.client.ApiClient; +import com.github.gotify.client.model.Health; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for HealthApi + */ +public class HealthApiTest { + + private HealthApi api; + + @Before + public void setup() { + api = new ApiClient().createService(HealthApi.class); + } + + /** + * Get health information. + * + * + */ + @Test + public void getHealthTest() { + // Health response = api.getHealth(); + + // TODO: test validations + } +} diff --git a/client/src/test/java/com/github/gotify/client/api/MessageApiTest.java b/client/src/test/java/com/github/gotify/client/api/MessageApiTest.java index 3d051228..e80c1f48 100644 --- a/client/src/test/java/com/github/gotify/client/api/MessageApiTest.java +++ b/client/src/test/java/com/github/gotify/client/api/MessageApiTest.java @@ -43,7 +43,7 @@ public void createMessageTest() { */ @Test public void deleteAppMessagesTest() { - Integer id = null; + Long id = null; // Void response = api.deleteAppMessages(id); // TODO: test validations @@ -55,7 +55,7 @@ public void deleteAppMessagesTest() { */ @Test public void deleteMessageTest() { - Integer id = null; + Long id = null; // Void response = api.deleteMessage(id); // TODO: test validations @@ -78,9 +78,9 @@ public void deleteMessagesTest() { */ @Test public void getAppMessagesTest() { - Integer id = null; + Long id = null; Integer limit = null; - Integer since = null; + Long since = null; // PagedMessages response = api.getAppMessages(id, limit, since); // TODO: test validations @@ -93,7 +93,7 @@ public void getAppMessagesTest() { @Test public void getMessagesTest() { Integer limit = null; - Integer since = null; + Long since = null; // PagedMessages response = api.getMessages(limit, since); // TODO: test validations diff --git a/client/src/test/java/com/github/gotify/client/api/PluginApiTest.java b/client/src/test/java/com/github/gotify/client/api/PluginApiTest.java index 24887c6c..0e7a5529 100644 --- a/client/src/test/java/com/github/gotify/client/api/PluginApiTest.java +++ b/client/src/test/java/com/github/gotify/client/api/PluginApiTest.java @@ -30,7 +30,7 @@ public void setup() { */ @Test public void disablePluginTest() { - Integer id = null; + Long id = null; // Void response = api.disablePlugin(id); // TODO: test validations @@ -42,7 +42,7 @@ public void disablePluginTest() { */ @Test public void enablePluginTest() { - Integer id = null; + Long id = null; // Void response = api.enablePlugin(id); // TODO: test validations @@ -54,7 +54,7 @@ public void enablePluginTest() { */ @Test public void getPluginConfigTest() { - Integer id = null; + Long id = null; // Object response = api.getPluginConfig(id); // TODO: test validations @@ -66,7 +66,7 @@ public void getPluginConfigTest() { */ @Test public void getPluginDisplayTest() { - Integer id = null; + Long id = null; // String response = api.getPluginDisplay(id); // TODO: test validations @@ -89,7 +89,7 @@ public void getPluginsTest() { */ @Test public void updatePluginConfigTest() { - Integer id = null; + Long id = null; // Void response = api.updatePluginConfig(id); // TODO: test validations diff --git a/client/src/test/java/com/github/gotify/client/api/UserApiTest.java b/client/src/test/java/com/github/gotify/client/api/UserApiTest.java index c507f968..94d0a12d 100644 --- a/client/src/test/java/com/github/gotify/client/api/UserApiTest.java +++ b/client/src/test/java/com/github/gotify/client/api/UserApiTest.java @@ -55,7 +55,7 @@ public void currentUserTest() { */ @Test public void deleteUserTest() { - Integer id = null; + Long id = null; // Void response = api.deleteUser(id); // TODO: test validations @@ -67,7 +67,7 @@ public void deleteUserTest() { */ @Test public void getUserTest() { - Integer id = null; + Long id = null; // User response = api.getUser(id); // TODO: test validations @@ -102,7 +102,7 @@ public void updateCurrentUserTest() { */ @Test public void updateUserTest() { - Integer id = null; + Long id = null; UserWithPass body = null; // User response = api.updateUser(id, body);