public static IEnumerable <Locale> RetrieveLocale(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Locale>(@"locales"));
 }
Example #2
0
 public static IEnumerable <Airport> RetrieveAirportByIata(this OpenFlightsClient ofc, string iata)
 {
     return(ofc.Retrieve <Airport>(@"airports", $@"iata~~{iata}"));
 }
Example #3
0
 public static IEnumerable <Airport> RetrieveAirport(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Airport>(@"airports"));
 }
Example #4
0
 public static IEnumerable <Plane> RetrievePlane(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Plane>(@"Plane"));
 }
Example #5
0
 public static IEnumerable <Airport> RetrieveAirportByIcao(this OpenFlightsClient ofc, string icao)
 {
     return(ofc.Retrieve <Airport>(@"airports", $@"icao~~{icao}"));
 }
Example #6
0
 public static IEnumerable <Flight> RetrieveFlight(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Flight>(@"flights"));
 }
Example #7
0
 public static IEnumerable <Airline> RetrieveAirline(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Airline>(@"airlines"));
 }
 public static IEnumerable <Trip> RetrieveTrip(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Trip>(@"trips"));
 }
Example #9
0
 public static IEnumerable <Route> RetrieveRoute(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Route>(@"routes"));
 }
Example #10
0
 public static IEnumerable <Country> RetrieveCountry(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <Country>(@"countries"));
 }
 public static IEnumerable <User> RetrieveUser(this OpenFlightsClient ofc)
 {
     return(ofc.Retrieve <User>(@"users"));
 }
        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)));
        }