scardine / SabreAPI

Python bindings to the Sabre REST API (https://developer.sabre.com/docs/read/REST_APIs)
MIT License
8 stars 5 forks source link

Transmit JSON-payloads #1

Open pc-coholic opened 8 years ago

pc-coholic commented 8 years ago

Hi!

Just to make sure, that I am not missing something here... But does your wrapper provide a way to transmit JSON-payloads to the APIs endpoints?

One example is for example the v2.shop.cars, which expects a requestbody like this:

{
    "OTA_VehAvailRateRQ": {
      "VehAvailRQCore": {
        "QueryType": "Shop",
        "VehRentalCore": {
          "PickUpDateTime": "07-08T09:00",
          "ReturnDateTime": "07-09T11:00",
          "PickUpLocation": {
            "LocationCode": "DFW"
          }
        }
      }
    }
}
scardine commented 8 years ago

Some time has passed since I touched it, but looks like the code is not handling this. Should be trivial to add this feature, I'm not sure how. Probably I should create a new method in the API dictionary, currently it has POST and GET, I'm thinking about a JSON method that would receive a dictionary and post it as JSON in the body of the request.

Gunjan7991 commented 4 years ago

Hi!

Just to make sure, that I am not missing something here... But does your wrapper provide a way to transmit JSON-payloads to the APIs endpoints?

One example is for example the v2.shop.cars, which expects a requestbody like this:

{
    "OTA_VehAvailRateRQ": {
      "VehAvailRQCore": {
        "QueryType": "Shop",
        "VehRentalCore": {
          "PickUpDateTime": "07-08T09:00",
          "ReturnDateTime": "07-09T11:00",
          "PickUpLocation": {
            "LocationCode": "DFW"
          }
        }
      }
    }
}

Hi, I am currently working on a similar project. Did you find any solution to the above question?

Any help will be appreciated. Thank you in advance