freesound-juce
A JUCE client for accessing the Freesound API
Public Member Functions | Protected Attributes | List of all members
FSList Class Reference

Class representing a page from a Freesound response. Contains methods for automatically paging through the different pages, knowing the number of total results and the results on the page. More...

#include <FreesoundAPI.h>

Inheritance diagram for FSList:
SoundList

Public Member Functions

 FSList ()
 Default constructor, creates an empty object. More...
 
 FSList (var response)
 Constructor from the var object which contains the response from FS API, automatically obtaining the next and previous page; the total of results and the results of the page. More...
 
String getNextPage ()
 Returns the URL for the next page. More...
 
String getPreviousPage ()
 Returns the URL for the previous page. More...
 
var getResults ()
 Returns the results from the current page. More...
 
int getCount ()
 Gets the number of entries in the complete list. More...
 

Protected Attributes

int count
 Total number of results returned from the FS response.
 
String nextPage
 URL for accessing the next page of results.
 
String previousPage
 URL for accessing the previous page of results.
 
var results
 var variable containing the results of the page
 

Detailed Description

Class representing a page from a Freesound response. Contains methods for automatically paging through the different pages, knowing the number of total results and the results on the page.

Author
Antonio
Date
09/07/2019

Constructor & Destructor Documentation

◆ FSList() [1/2]

FSList::FSList ( )

Default constructor, creates an empty object.

Author
Antonio
Date
09/07/2019

◆ FSList() [2/2]

FSList::FSList ( var  response)

Constructor from the var object which contains the response from FS API, automatically obtaining the next and previous page; the total of results and the results of the page.

Author
Antonio
Date
09/07/2019
Parameters
responseThe response from a FS API call which returns a list.

Member Function Documentation

◆ getCount()

int FSList::getCount ( )

Gets the number of entries in the complete list.

Author
Antonio
Date
09/07/2019
Returns
The count of entries in the list.

◆ getNextPage()

String FSList::getNextPage ( )

Returns the URL for the next page.

Author
Antonio
Date
09/07/2019
Returns
The next page URL.

◆ getPreviousPage()

String FSList::getPreviousPage ( )

Returns the URL for the previous page.

Author
Antonio
Date
09/07/2019
Returns
The previous page URL.

◆ getResults()

var FSList::getResults ( )

Returns the results from the current page.

Author
Antonio
Date
09/07/2019
Returns
The results of the current page.

The documentation for this class was generated from the following files: