blob: 025251dd2a69e7140d09ff8a0353b6da5b9630a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
module api_handling
implicit none
contains
function api_request_gemini(req) result(resp)
use server_response
implicit none
type(request), intent(in)::req
type(response)::resp
integer::i
! Complete - "/api/player/{name}/job/{jobid}/complete"
! Failed - "/api/player/{name}/job/{jobid}/failed"
! Task - "/api/player/{name}/job/{jobid}/task/{task num}"
if(trim(req%component(2)) == "player" .and. trim(req%component(4)) == "job") then
if(trim(req%component(6)) == "complete") then
end if
end if
end function api_request_gemini
function api_request_titan(req) result(resp)
use server_response
implicit none
type(request), intent(in)::req
type(response)::resp
end function api_request_titan
function api_request(req) result(resp)
use server_response
implicit none
type(request), intent(in)::req
type(response)::resp
if(req%protocol == "gemini") then
resp = api_request_gemini(req)
else if(req%protocol == "titan") then
resp = api_request_titan(req)
end if
end function api_request
end module api_handling
|