{"id":19998036,"url":"https://github.com/afonsoft/afonsoft.amadeus","last_synced_at":"2025-05-04T14:30:42.233Z","repository":{"id":40910279,"uuid":"194902021","full_name":"afonsoft/Afonsoft.Amadeus","owner":"afonsoft","description":"C# library for the Amadeus Self-Service travel APIs","archived":false,"fork":false,"pushed_at":"2022-12-08T05:46:30.000Z","size":53,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-28T10:55:16.494Z","etag":null,"topics":["ai","amadeus","api","csharp-library","flights","hotels","library","sdk","self-service","travel","travel-content","travel-insight"],"latest_commit_sha":null,"homepage":"https://developers.amadeus.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afonsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-02T16:51:04.000Z","updated_at":"2024-10-08T09:37:25.000Z","dependencies_parsed_at":"2023-01-24T14:31:07.180Z","dependency_job_id":null,"html_url":"https://github.com/afonsoft/Afonsoft.Amadeus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afonsoft%2FAfonsoft.Amadeus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afonsoft%2FAfonsoft.Amadeus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afonsoft%2FAfonsoft.Amadeus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afonsoft%2FAfonsoft.Amadeus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afonsoft","download_url":"https://codeload.github.com/afonsoft/Afonsoft.Amadeus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252349151,"owners_count":21733780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","amadeus","api","csharp-library","flights","hotels","library","sdk","self-service","travel","travel-content","travel-insight"],"created_at":"2024-11-13T05:07:06.642Z","updated_at":"2025-05-04T14:30:41.937Z","avatar_url":"https://github.com/afonsoft.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amadeus CSharp SDK\n\n\nAmadeus provides a set of APIs for the travel industry. Flights, Hotels, Locations and more.\n\nFor more details see the on\n[Amadeus.com](https://developers.amadeus.com).\n\n## Getting Started\n\nTo send make your first API call you will need to [register for an Amadeus\nDeveloper Account](https://developers.amadeus.com/create-account) and set up\nyour first application.\n\n```c#\nusing Afonsoft.Amadeus.Amadeus;\nusing Afonsoft.Amadeus.Params;\n\nusing Afonsoft.Amadeus.exceptions.ResponseException;\nusing Afonsoft.Amadeus.referenceData.Locations;\nusing Afonsoft.Amadeus.resources.Location;\n\npublic class AmadeusExample {\n  public static void main(String[] args)  {\n    Amadeus amadeus = Amadeus\n            .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n            .build();\n\n    Location[] locations = amadeus.referenceData.locations.get(Params\n      .with(\"keyword\", \"LON\")\n      .and(\"subType\", Locations.ANY));\n  }\n}\n```\n\n## Initialization\n\nThe client can be initialized directly.\n\n```c#\n//Initialize using parameters\nAmadeus amadeus = Amadeus\n        .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n        .build();\n```\n\nAlternatively it can be initialized without any parameters if the environment\nvariables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present.\n\n\nYour credentials can be found on the [Amadeus\ndashboard](https://developers.amadeus.com/my-apps). [Sign\nup](https://developers.amadeus.com/create-account) for an account today.\n\nBy default the environment for the SDK is the `test` environment. To switch to\na production (paid-for) environment please switch the hostname\n\n## Documentation\n\nAmadeus has a large set of APIs, and our documentation is here to get you\nstarted today. Head over to our\n[Reference](https://amadeus4dev.github.io/amadeus-java/) documentation for\nin-depth information about every SDK method, its arguments and return types.\n\n\n* [Get Started](https://amadeus4dev.github.io/amadeus-java/) documentation\n  * [Initialize the SDK](https://amadeus4dev.github.io/amadeus-java/)\n  * [Find an Airport](https://amadeus4dev.github.io/amadeus-java/)\n  * [Find a Flight](https://amadeus4dev.github.io/amadeus-ruby/)\n  * [Get Flight Inspiration](https://amadeus4dev.github.io/amadeus-ruby/)\n\n## Making API calls\n\nThis library conveniently maps every API path to a similar path.\n\nFor example, `GET /v2/reference-data/urls/checkin-links?airlineCode=BA` would be:\n\n```c#\namadeus.referenceData.urls.checkinLinks.get(Params.with(\"airlineCode\", \"BA\"));\n```\n\nSimilarly, to select a resource by ID, you can pass in the ID to the **singular** path.\n\nFor example,  `GET /v2/shopping/hotel-offers/XXX` would be:\n\n```c#\namadeus.hotelOffer(\"XXX\").get(...);\n```\n\nYou can make any arbitrary API call as well directly with the `.get` method.\nKeep in mind, this returns a raw `Resource`\n\n```c#\nResource resource = amadeus.get('/v2/reference-data/urls/checkin-links',\n  Params.with(\"airlineCode\", \"BA\"));\n\nresource.getResult();\n```\n\n## Response\n\nEvery successful API call returns a `Resource` object. The underlying\n`Resource` with the raw available.\n\n```c#\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n\n // The raw response, as a string\nlocations[0].getResponse().getBody();\n```\n\n## Pagination\n\nIf an API endpoint supports pagination, the other pages are available under the\n`.next`, `.previous`, `.last` and `.first` methods.\n\n```c#\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n\n// Fetches the next page\nLocation[] locations = (Location[]) amadeus.next(locations[0]);\n```\n\nIf a page is not available, the method will return `null`.\n\n## Logging \u0026 Debugging\n\nThe SDK makes it easy to add your own logger.\n\nAdditionally, to enable more verbose logging, you can set the appropriate level\non your own logger, though the easiest way would be to enable debugging via a\nparameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment\nvariable.\n\n\n## List of supported endpoints\n```c#\n// Flight Inspiration Search\nFlightDestination[] flightDestinations = amadeus.shopping.flightDestinations.get(Params\n  .with(\"origin\", \"MAD\"));\n\n// Flight Cheapest Date Search\nFlightDate[] flightDates = amadeus.shopping.flightDates.get(Params\n  .with(\"origin\", \"MAD\")\n  .and(\"destination\", \"MUC\"));\n\n// Flight Low-fare Search\nFlightOffer[] flightOffers = amadeus.shopping.flightOffers.get(Params\n  .with(\"origin\", \"NYC\")\n  .and(\"destination\", \"MAD\")\n  .and(\"departureDate\", \"2019-08-01\"));\n\n// Flight Check-in Links\nCheckinLink[] checkinLinks = amadeus.referenceData.urls.checkinLinks.get(Params\n  .with(\"airlineCode\", \"G3\"));\n\n// Airline Code LookUp\nAirline[] airlines = amadeus.referenceData.airlines.get(Params\n  .with(\"airlineCodes\", \"G3\"));\n\n// Airport \u0026 City Search (autocomplete)\n// Find all the cities and airports starting by the keyword 'LON'\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n// Get a specific city or airport based on its id\nLocation location = amadeus.referenceData\n  .location(\"ALHR\").get();\n\n// Airport Nearest Relevant (for London)\nLocation[] locations = amadeus.referenceData.locations.airports.get(Params\n  .with(\"latitude\", 0.1278)\n  .and(\"longitude\", 51.5074));\n\n// Flight Most Searched Destinations\n// Which were the most searched flight destinations from Madrid in August 2017?\nSearchedDestination searchedDestination = amadeus.travel.analytics.airTraffic.searchedByDestination.get(Params\n        .with(\"originCityCode\", \"MAD\")\n        .and(\"destinationCityCode\", \"NYC\")\n        .and(\"searchPeriod\", \"2017-08\")\n        .and(\"marketCountryCode\", \"ES\"));\n// How many people in Spain searched for a trip from Madrid to New-York in September 2017?\nSearch[] search = amadeus.travel.analytics.airTraffic.searched.get(Params\n        .with(\"originCityCode\", \"MAD\")\n        .and(\"searchPeriod\", \"2017-08\")\n        .and(\"marketCountryCode\", \"ES\"));\n\n// Flight Most Booked Destinations\nAirTraffic[] airTraffics = amadeus.travel.analytics.airTraffic.booked.get(Params\n  .with(\"originCityCode\", \"MAD\")\n  .and(\"period\", \"2017-08\"));\n\n// Flight Most Traveled Destinations\nAirTraffic[] airTraffics = amadeus.travel.analytics.airTraffic.traveled.get(Params\n  .with(\"originCityCode\", \"MAD\")\n  .and(\"period\", \"2017-01\"));\n\n// Flight Busiest Traveling Period\nPeriod[] busiestPeriods = amadeus.travel.analytics.airTraffic.busiestPeriod.get(Params\n  .with(\"cityCode\", \"MAD\")\n  .and(\"period\", \"2017\")\n  .and(\"direction\", BusiestPeriod.ARRIVING));\n\n// Hotel Search API\n// Get list of hotels by city code\nHotelOffer[] offers = amadeus.shopping.hotelOffers.get(Params\n  .with(\"cityCode\", \"MAD\"));\n// Get list of offers for a specific hotel\nHotelOffer hotelOffer = amadeus.shopping.hotelOffersByHotel.get(Params.with(\"hotelId\", \"BGLONBGB\"));\n// Confirm the availability of a specific offer\nHotelOffer offer = amadeus.shopping.hotelOffer(\"4BA070CE929E135B3268A9F2D0C51E9D4A6CF318BA10485322FA2C7E78C7852E\").get();\n\n// Points of Interest\n// What are the popular places in Barcelona (based a geo location and a radius)\nPointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.get(Params\n   .with(\"latitude\", \"41.39715\")\n   .and(\"longitude\", \"2.160873\"));\n\n// What are the popular places in Barcelona? (based on a square)\nPointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.bySquare.get(Params\n    .with(\"north\", \"41.397158\")\n    .and(\"west\", \"2.160873\")\n    .and(\"south\", \"41.394582\")\n    .and(\"east\", \"2.177181\"));\n```\n\n## License\n\nThis library is released under the [MIT License](LICENSE).\n\n## Help\n\nOur [developer support team](https://developers.amadeus.com/support) is here\nto help you. You can find us on\n[StackOverflow](https://stackoverflow.com/questions/tagged/amadeus) and\n[email](mailto:developers@amadeus.com).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafonsoft%2Fafonsoft.amadeus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafonsoft%2Fafonsoft.amadeus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafonsoft%2Fafonsoft.amadeus/lists"}