This repository has been archived by the owner on Mar 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIRouting.cs
60 lines (49 loc) · 2.84 KB
/
IRouting.cs
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
52
53
54
55
56
57
58
59
60
using Proxy.Models;
using Routing.Models;
using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Web;
namespace Routing
{
[ServiceContract]
public interface IRouting
{
/* JCDecaux */
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "stations")]
List<Station> GetAllStations();
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "station?city={city}&number={stationNumber}")]
Station GetStationInformations(string city, string stationNumber);
/* OpenStreetMap Search */
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "position?address={address}")]
Position GetPosition(string address);
/* OpenRouteService Directions */
[OperationContract]
[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "path")]
GeoJson GetPath(Position[] positions);
[OperationContract]
[WebInvoke(Method = "OPTIONS", UriTemplate = "path")]
void PathOptions();
[OperationContract]
[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "goToStation")]
GeoJson GoToStation(Position[] positions);
[OperationContract]
[WebInvoke(Method = "OPTIONS", UriTemplate = "goToStation")]
void GoToStationOptions();
/* Calculation */
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "nearestStartStation?lat={latitude}&lng={longitude}")]
Station FindNearestStationFromStart(double latitude, double longitude);
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "nearestEndStation?lat={latitude}&lng={longitude}")]
Station FindNearestStationFromEnd(double latitude, double longitude);
/* Logs */
[OperationContract]
Dictionary<(DateTime, int), (string, int)> GetLogs();
[OperationContract]
Dictionary<(DateTime, int), (string, int)> GetLogsByDays(int days);
}
}