コード例 #1
0
 public static IEnumerable <Locale> RetrieveLocale(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Locale>(@"locales"));
 }
コード例 #2
0
 public static IEnumerable <Airport> RetrieveAirportByIata(this OpenFlightsClient ofc, string iata)
 {
     return(ofc.Retrieve <Airport>(@"airports", $@"iata~~{iata}"));
 }
コード例 #3
0
 public static IEnumerable <Airport> RetrieveAirport(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Airport>(@"airports"));
 }
コード例 #4
0
 public static IEnumerable <Plane> RetrievePlane(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Plane>(@"Plane"));
 }
コード例 #5
0
 public static IEnumerable <Airport> RetrieveAirportByIcao(this OpenFlightsClient ofc, string icao)
 {
     return(ofc.Retrieve <Airport>(@"airports", $@"icao~~{icao}"));
 }
コード例 #6
0
 public static IEnumerable <Flight> RetrieveFlight(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Flight>(@"flights"));
 }
コード例 #7
0
 public static IEnumerable <Airline> RetrieveAirline(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Airline>(@"airlines"));
 }
コード例 #8
0
 public static IEnumerable <Trip> RetrieveTrip(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Trip>(@"trips"));
 }
コード例 #9
0
 public static IEnumerable <Route> RetrieveRoute(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Route>(@"routes"));
 }
コード例 #10
0
 public static IEnumerable <Country> RetrieveCountry(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Country>(@"countries"));
 }
コード例 #11
0
 public static IEnumerable <User> RetrieveUser(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <User>(@"users"));
 }
コード例 #12
0
        public static object CreateUser(this OpenFlightsClient ofc, IUser user)
        {
            Mapper.Initialize(cfg => cfg.CreateMap <IUser, User>().ForMember(u => u.Password, o => o.ResolveUsing <UserPasswordResolver>()));

            return(ofc.Create <User>(@"users", Mapper.Map <User>(user)));
        }