Svrf API Docs

Responses

SvrfAuthenticationResponse

Responses from the Authentication endpoint.

Declaration

struct SvrfAuthenticationResponse {
let success: Bool?
let message: String?
let token: String?
let expiresIn: Int?
}

Parameters

ParameterDescription
successIf the request was successful.
messageIf unsuccessful, an error message.
tokenAn authentication token. This should be used for media API requests.
expiresInHow 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

ParameterDescription
successIf the request was successful.
mediaSee SvrfMedia.
pageNumThe current page number.
nextPageNumThe next page to query to see more results, whether or not the next page actually exists.
tookMsThe number of milliseconds the request took.
totalNumThe 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

ParameterDescription
successIf the request was successful.
mediaSee SvrfMedia.
pageNumThe current page number.
nextPageNumThe 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

ParameterDescription
successIf the request was successful.
mediaSee SvrfMedia.