PlazaSharp/libplaza/libplaza.xml

217 lines
13 KiB
XML

<?xml version="1.0"?>
<doc>
<assembly>
<name>libplaza</name>
</assembly>
<members>
<member name="T:libplaza.PlazaInMaintenanceException">
<summary>
An <see cref="T:System.Exception"/> object indicating that the <c>Nightwave</c> API is under maintenance
</summary>
</member>
<member name="T:libplaza.PlazaUnavailableException">
<summary>
An <see cref="T:System.Exception"/> object indicating that an error or exception occurred when communicating with the <c>Nightwave</c> API.
</summary>
</member>
<member name="T:libplaza.Status">
<summary>
A <c>Status</c> object represents the current broadcast information returned by a <c>Nightwave</c> API object.
</summary>
</member>
<member name="F:libplaza.Status.InMaintenance">
<summary><c>InMaintenance</c> indicates whether the <c>Nightwave</c> API is in maintenance mode</summary>
</member>
<member name="F:libplaza.Status.FaultOccurred">
<summary><c>FaultOccurred</c> indicates whether an exception occurred while querying the <c>Nightwave</c> API</summary>
</member>
<member name="F:libplaza.Status.Title">
<summary><c>Title</c> contains the currently-playing track's title</summary>
</member>
<member name="F:libplaza.Status.Artist">
<summary><c>Artist</c> contains the currently-playing track's creating artist</summary>
</member>
<member name="F:libplaza.Status.Album">
<summary><c>Album</c> contains the currently-playing track's album, if any</summary>
</member>
<member name="F:libplaza.Status.ArtworkUri">
<summary><c>ArtworkUri</c> contains a relative URI to the artwork for the currently-playing track</summary>
</member>
<member name="F:libplaza.Status.Elapsed">
<summary><c>Elapsed</c> contains an integer value of the elapsed seconds for the current track</summary>
</member>
<member name="F:libplaza.Status.Duration">
<summary><c>Duration</c> contains an integer value of the duration in seconds of the current track</summary>
</member>
<member name="F:libplaza.Status.Since">
<summary><c>Since</c> contains a 64-bit integer value of the epoch timestamp when the broadcast information was updated</summary>
</member>
<member name="F:libplaza.Status.ServerTimeOffset">
<summary><c>ServerTimeOffset</c> contains an integer value of the time difference between the local computer and the <c>Nightwave</c> API server</summary>
</member>
<member name="P:libplaza.Status.CalculatedElapsed">
<summary><c>CalculatedElapsed</c> returns a dynamically-generated integer value of the elapsed seconds, taking time offsets and time since <see cref="F:libplaza.Status.Since"/></summary>
</member>
<member name="F:libplaza.Status.Likes">
<summary><c>Likes</c> contains an integer value of the number of likes the currently-playing track has received</summary>
</member>
<member name="F:libplaza.Status.Dislikes">
<summary><c>Dislikes</c> contains an integer value of the number of dislikes the currently-playing track has received</summary>
</member>
<member name="F:libplaza.Status.Listeners">
<summary><c>Listeners</c> contains an integer value of the number of people currently listening to the broadcast</summary>
</member>
<member name="T:libplaza.Vote">
<summary>
<c>Vote</c> represents the user's disposition towards the currently-playing track.
</summary>
</member>
<member name="F:libplaza.Vote.Dislike">
<summary>To <c>Dislike</c> is to indicate the user's disposition towards this track is one of displeasure; that the user does not appreciate hearing this track, perhaps even that the user wishes not to hear this track.</summary>
</member>
<member name="F:libplaza.Vote.Neutral">
<summary>To be of <c>Neutral</c> disposition is to indicate the user has no feelings towards this track, or that the user does have feelings, but not strong enough to be worth expressing</summary>
</member>
<member name="F:libplaza.Vote.Like">
<summary>To <c>Like</c> is to indicate the user's disposition towards this track is one of enjoyment or pleasure; that the user appreciated this track and/or wishes to indicate such.</summary>
</member>
<member name="F:libplaza.Vote.Favourite">
<summary>To <c>Favourite</c> is functionally equivalent to <see cref="F:libplaza.Vote.Like"/>, with the additional effect of adding the track to the user's favourites list.</summary>
</member>
<member name="T:libplaza.Nightwave">
<summary>
<c>Nightwave</c> is the primary class by which the Nightwave Plaza API can be used.
</summary>
</member>
<member name="F:libplaza.Nightwave.MinRefreshTime">
<summary><c>MinRefreshTime</c> represents the minimum number of seconds that must pass before the cached <c>Status</c> may be invalidated</summary>
</member>
<member name="M:libplaza.Nightwave.#ctor(System.String)">
<summary>
Creates a new <c>Nightwave</c> instance.
</summary>
<param name="baseuri">Specify an alternate URI for the API - useful if testing a dev server.</param>
<example>
To create a <c>Nightwave</c> API object targeting the production Nightwave Plaza API:
<code>
Nightwave nw = new Nightwave();
</code>
To create a <c>Nightwave</c> API object targeting a local server (eg., during development):
<code>Nightwave nwd = new Nightwave("http://localhost:8000");</code>
</example>
</member>
<member name="M:libplaza.Nightwave.Finalize">
<summary>
De-initialises the <c>Nightwave</c> API object.
<para>Currently, this is equivalent to synchronously logging out the current session.</para>
</summary>
</member>
<member name="M:libplaza.Nightwave.Status(System.Boolean)">
<summary>
Retrieves the current Nightwave Plaza radio broadcast information, if possible
</summary>
<example>
If Nightwave Plaza is broadcasting normally:
<code>
Nightwave n = new Nightwave();
Status s = await n.Status();
Console.WriteLine(s.Title);
</code>
The Console output would show "リサフランク420 / 現代のコンピュー", if that track were playing.
In the event that an HTTP request fails or Nightwave Plaza is in maintenance mode, the appropriate flag will be set
<code>
Nightwave n = new Nightwave();
Status s = await n.Status();
if (s.InMaintenance) {
Console.WriteLine("In maintenance!");
return;
} else if (s.FaultOccurred) {
Console.WriteLine("A fault occurred!");
return;
}
Console.WriteLine(s.Title);
</code>
The Console output would show "In maintenance!" or "A fault occurred!", depending on the conditions.
</example>
<remarks>
This method has inherent caching, and thus will not necessarily result in the <c>Status</c> object returned being fully fresh.
The <c>Status</c> object being returned may be a cached object UNLESS the <paramref name="Force"/> parameter is true
OR the <c>Status</c> object is older than the number of seconds stored by <see cref="F:libplaza.Nightwave.MinRefreshTime"/>
OR <c>Status.CalculatedElapsed</c> is equal to or greater than <c>Status.Duration</c>.
</remarks>
<param name="Force">If true, the API will always be queried, and no caching will be performed.</param>
<returns>A populated <c>Status</c> object describing the current broadcast details.</returns>
</member>
<member name="M:libplaza.Nightwave.Update">
<summary>
A basic wrapper around <see cref="M:libplaza.Nightwave.GetNightwaveAsync"/> which provides basic error handling.
</summary>
<returns>If called with <c>await</c>, returns nothing. If called without, returns a <c>Task</c> object for the method call</returns>
</member>
<member name="M:libplaza.Nightwave.GetNightwaveAsync">
<summary>
Communicates with the <c>Nightwave</c> API to retrieve the current broadcast information.
</summary>
<returns>Returns a <c>Status</c> object representing the current broadcast information.</returns>
<exception cref="T:libplaza.PlazaUnavailableException">May be thrown in event of a non-success (HTTP/1.1 2XX) return code</exception>
<exception cref="T:libplaza.PlazaInMaintenanceException">May be thrown in event that the API indicates it is in maintenance</exception>
</member>
<member name="M:libplaza.Nightwave.Vote">
<summary>
Fetches the user's <see cref="M:libplaza.Nightwave.Vote"/> for the currently-playing track.
</summary>
<returns>A <see cref="M:libplaza.Nightwave.Vote"/> object indicating the user's disposition towards the track. If the vote could not be returned, this will be <c>null</c></returns>
</member>
<member name="M:libplaza.Nightwave.Vote(libplaza.Vote)">
<summary>
Casts the given <see cref="M:libplaza.Nightwave.Vote"/> specified in <paramref name="v"/> as the user's vote on the current track.
</summary>
<param name="v">A <see cref="M:libplaza.Nightwave.Vote"/> object indicating the user's disposition towards the current track</param>
<returns>A <c>bool</c>ean value indicating the success of the vote operation</returns>
</member>
<member name="M:libplaza.Nightwave.CheckSession(System.String)">
<summary>
An overload method to <see cref="M:libplaza.Nightwave.CheckSession(System.String)"/> to first set the <c>X-Access-Token</c> header to <paramref name="str"/>
</summary>
<param name="str">A valid session token for the <c>Nightwave</c> API</param>
<returns>A <c>bool</c>ean value indicating whether the token given in <paramref name="str"/> was able to perform an authenticated API request</returns>
</member>
<member name="M:libplaza.Nightwave.CheckSession">
<summary>
Performs a basic read-only API request to determine whether the session token, if present, is valid.
</summary>
<returns>A <c>bool</c>ean value indicating whether the request succeeded</returns>
</member>
<member name="M:libplaza.Nightwave.GetUser">
<summary>
Performs a basic read-only API request to fetch the currently-authenticated user's profile details.
</summary>
<returns>If successful, returns a <c>string</c> containing the authenticated user's username. If unsuccessful, will return null.</returns>
</member>
<member name="M:libplaza.Nightwave.Login(System.String,System.String)">
<summary>
Performs a login request to the <c>Nightwave</c> API with the given <paramref name="u">username</paramref> and <paramref name="p">password</paramref>.
</summary>
<param name="u">A <c>string</c> containing the user's username</param>
<param name="p">A <c>string</c> containing the user's password</param>
<returns>A <c>bool</c>ean value indicating whether the login attempt succeeded</returns>
<remarks>
Functionally, this method is a wrapper for <see cref="M:libplaza.Nightwave.Login(System.String)"/>, performing the function of generating a Basic authentication string
</remarks>
</member>
<member name="M:libplaza.Nightwave.Login(System.String)">
<summary>
Performs a login request to the <c>Nightwave</c> API with the given HTTP Basic authentication <paramref name="str">string</paramref>.
</summary>
<param name="str">A valid HTTP Basic authentication string (<c>md5(username:password)</c>)</param>
<returns>A <c>bool</c>ean value indicating whether the login attempt succeeded</returns>
</member>
<member name="M:libplaza.Nightwave.Logout">
<summary>
Performs a logout request to the <c>Nightwave</c> API.
</summary>
<returns>If called with <c>await</c>, returns nothing. Otherwise, returns a <c>Task</c> object representing the method call</returns>
</member>
</members>
</doc>