public static IEnumerable <Locale> RetrieveLocale(this OpenFlightsClient ofc) { return(ofc.Retrieve <Locale>(@"locales")); }
public static IEnumerable <Airport> RetrieveAirportByIata(this OpenFlightsClient ofc, string iata) { return(ofc.Retrieve <Airport>(@"airports", $@"iata~~{iata}")); }
public static IEnumerable <Airport> RetrieveAirport(this OpenFlightsClient ofc) { return(ofc.Retrieve <Airport>(@"airports")); }
public static IEnumerable <Plane> RetrievePlane(this OpenFlightsClient ofc) { return(ofc.Retrieve <Plane>(@"Plane")); }
public static IEnumerable <Airport> RetrieveAirportByIcao(this OpenFlightsClient ofc, string icao) { return(ofc.Retrieve <Airport>(@"airports", $@"icao~~{icao}")); }
public static IEnumerable <Flight> RetrieveFlight(this OpenFlightsClient ofc) { return(ofc.Retrieve <Flight>(@"flights")); }
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")); }
public static IEnumerable <Route> RetrieveRoute(this OpenFlightsClient ofc) { return(ofc.Retrieve <Route>(@"routes")); }
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))); }