Package de.svenkubiak.jpushover.apis
Class Glance
- java.lang.Object
-
- de.svenkubiak.jpushover.apis.Glance
-
-
Constructor Summary
Constructors Constructor Description Glance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getValue(String param)
PushoverResponse
push()
Sends a glance to pushoverFuture<PushoverResponse>
pushAsync()
Sends a glance to pushover asynchronouslyGlance
withCount(int count)
Shown on smaller screens; useful for simple countsGlance
withDevice(String device)
Your user's device name to send the message directly to that device, rather than all of the user's devices (optional)Glance
withPercent(int percent)
Shown on some screens as a progress bar/circleGlance
withSubtext(String subtext)
A second line of dataGlance
withText(String text)
The main line of data, used on most screensGlance
withTitle(String title)
A description of the data being shown, such as "Widgets Sold"Glance
withToken(String token)
Your application's API token (required)Glance
withUser(String user)
The user/group key (not e-mail address) of your user (or you), viewable when logged into the @see pushover dashboard (required)
-
-
-
Method Detail
-
withToken
public Glance withToken(String token)
Your application's API token (required)- Parameters:
token
- The pushover API token- Returns:
- Glance instance
-
withUser
public Glance withUser(String user)
The user/group key (not e-mail address) of your user (or you), viewable when logged into the @see pushover dashboard (required)- Parameters:
user
- The username- Returns:
- Glance instance
-
withDevice
public Glance withDevice(String device)
Your user's device name to send the message directly to that device, rather than all of the user's devices (optional)- Parameters:
device
- The device name- Returns:
- Glance instance
-
withTitle
public Glance withTitle(String title)
A description of the data being shown, such as "Widgets Sold"- Parameters:
title
- the title to use- Returns:
- Glance instance
-
withText
public Glance withText(String text)
The main line of data, used on most screens- Parameters:
text
- the text to use- Returns:
- Glance instance
-
withSubtext
public Glance withSubtext(String subtext)
A second line of data- Parameters:
subtext
- the subtext to use- Returns:
- Glance instance
-
withCount
public Glance withCount(int count)
Shown on smaller screens; useful for simple counts- Parameters:
count
- the count to use- Returns:
- Glance instance
-
withPercent
public Glance withPercent(int percent)
Shown on some screens as a progress bar/circle- Parameters:
percent
- the percent to use- Returns:
- GLance instance
-
push
public PushoverResponse push() throws JPushoverException
Sends a glance to pushover- Specified by:
push
in interfaceAPI
- Returns:
- PushoverResponse instance
- Throws:
JPushoverException
-
pushAsync
public Future<PushoverResponse> pushAsync()
Sends a glance to pushover asynchronously- Returns:
- PushoverResponse instance
-
-