2023-10-24 17:39:15 -04:00
|
|
|
package apiresponse
|
2023-08-19 15:49:57 -04:00
|
|
|
|
2023-10-24 17:39:15 -04:00
|
|
|
import (
|
2024-08-21 13:39:03 -04:00
|
|
|
"codeberg.org/vlbeaudoin/voki/v3"
|
2023-11-20 15:13:42 -05:00
|
|
|
)
|
2023-08-19 15:49:57 -04:00
|
|
|
|
2024-08-21 13:39:03 -04:00
|
|
|
type APIResponse struct {
|
|
|
|
voki.MessageResponse
|
|
|
|
statusCode int
|
|
|
|
Error string
|
2023-08-22 15:24:57 -04:00
|
|
|
}
|
|
|
|
|
2024-08-21 13:39:03 -04:00
|
|
|
func (R APIResponse) StatusCode() int {
|
|
|
|
return R.statusCode
|
2023-08-23 15:43:10 -04:00
|
|
|
}
|
|
|
|
|
2024-08-21 13:39:03 -04:00
|
|
|
func (R *APIResponse) SetStatusCode(code int) {
|
|
|
|
R.statusCode = code
|
2023-10-24 17:39:15 -04:00
|
|
|
}
|