Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F8525313
MapiVolleyRequest.java
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
MapiVolleyRequest.java
View Options
package
it.reyboz.bustorino.backend.mato
;
import
androidx.annotation.Nullable
;
import
com.android.volley.AuthFailureError
;
import
com.android.volley.Request
;
import
com.android.volley.Response
;
import
java.util.Map
;
public
abstract
class
MapiVolleyRequest
<
T
>
extends
Request
<
T
>
{
private
static
final
String
API_URL
=
"https://mapi.5t.torino.it/routing/v1/routers/mat/index/graphql"
;
protected
final
Response
.
Listener
<
T
>
listener
;
protected
final
MatoQueries
.
QueryType
type
;
public
MapiVolleyRequest
(
MatoQueries
.
QueryType
type
,
Response
.
Listener
<
T
>
listener
,
@Nullable
Response
.
ErrorListener
errorListener
)
{
super
(
Method
.
POST
,
API_URL
,
errorListener
);
this
.
type
=
type
;
this
.
listener
=
listener
;
}
@Override
protected
void
deliverResponse
(
T
response
)
{
listener
.
onResponse
(
response
);
}
@Override
public
Map
<
String
,
String
>
getHeaders
()
throws
AuthFailureError
{
return
MatoAPIFetcher
.
Companion
.
getREQ_PARAMETERS
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Feb 15, 02:12 (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1559588
Default Alt Text
MapiVolleyRequest.java (1 KB)
Attached To
Mode
R4 Libre BusTO
Attached
Detach File
Event Timeline
Log In to Comment