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 StringgetValue(String param)PushoverResponsepush()Sends a glance to pushoverFuture<PushoverResponse>pushAsync()Sends a glance to pushover asynchronouslyGlancewithCount(int count)Shown on smaller screens; useful for simple countsGlancewithDevice(String device)Your user's device name to send the message directly to that device, rather than all of the user's devices (optional)GlancewithPercent(int percent)Shown on some screens as a progress bar/circleGlancewithSubtext(String subtext)A second line of dataGlancewithText(String text)The main line of data, used on most screensGlancewithTitle(String title)A description of the data being shown, such as "Widgets Sold"GlancewithToken(String token)Your application's API token (required)GlancewithUser(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:
pushin interfaceAPI- Returns:
- PushoverResponse instance
- Throws:
JPushoverException
-
pushAsync
public Future<PushoverResponse> pushAsync()
Sends a glance to pushover asynchronously- Returns:
- PushoverResponse instance
-
-