Responses
SvrfAuthenticationResponse
Responses from the Authentication endpoint.
Declaration
struct SvrfAuthenticationResponse {let success: Bool?let message: String?let token: String?let expiresIn: Int?}
Parameters
Parameter | Description |
---|---|
success | If the request was successful. |
message | If unsuccessful, an error message. |
token | An authentication token. This should be used for media API requests. |
expiresIn | How many seconds this token will be valid for. |
SvrfSearchResponse
Responses from the search() endpoint.
Declaration
struct SvrfSearchResponse {let success: Bool?let media: [SvrfMedia]?let pageNum: Int?let nextPageNum: Int?let tookMs: Int?let totalNum: Int?}
Parameters
Parameter | Description |
---|---|
success | If the request was successful. |
media | See SvrfMedia. |
pageNum | The current page number. |
nextPageNum | The next page to query to see more results, whether or not the next page actually exists. |
tookMs | The number of milliseconds the request took. |
totalNum | The number of total results for query. |
SearchTrendingResponse
Responses from the getTrending() endpoint.
Declaration
struct SvrfTrendingResponse {let success: Bool?let media: [SvrfMedia]?let pageNum: Int?let nextPageNum: Int?}
Parameters
Parameter | Description |
---|---|
success | If the request was successful. |
media | See SvrfMedia. |
pageNum | The current page number. |
nextPageNum | The next page to query to see more results, whether or not the next page actually exists. |
SvrfMediaResponse
Responses from the getMedia() endpoint.
Declaration
struct SvrfMediaResponse {let success: Bool?let media: SvrfMedia?}
Parameters
Parameter | Description |
---|---|
success | If the request was successful. |
media | See SvrfMedia. |