https://github.com/spacetab-io/sirenaxml-golang-sdk
Sirena XML connector written on golang
https://github.com/spacetab-io/sirenaxml-golang-sdk
aviation gds go golang sdk sdk-go sirena sirena-api sirena-xml-connector sirenatravel sirenaxml sirenaxml-golang-sdk
Last synced: about 2 months ago
JSON representation
Sirena XML connector written on golang
- Host: GitHub
- URL: https://github.com/spacetab-io/sirenaxml-golang-sdk
- Owner: spacetab-io
- License: mit
- Created: 2017-10-20T11:00:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-17T18:47:45.000Z (over 5 years ago)
- Last Synced: 2025-03-20T21:18:59.638Z (2 months ago)
- Topics: aviation, gds, go, golang, sdk, sdk-go, sirena, sirena-api, sirena-xml-connector, sirenatravel, sirenaxml, sirenaxml-golang-sdk
- Language: Go
- Size: 539 KB
- Stars: 10
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sirena-xml-sdk
--------------[](https://circleci.com/gh/tmconsulting/sirenaxml-golang-sdk) [](https://codecov.io/gh/tmconsulting/sirenaxml-golang-sdk)
Sirena XML connector written on golang
## Usage
```go
package mainimport (
"log"
"os"
"strconv"
"github.com/tmconsulting/sirenaxml-golang-sdk/configuration"
"github.com/tmconsulting/sirenaxml-golang-sdk/logs"
"github.com/tmconsulting/sirenaxml-golang-sdk/sdk"
"github.com/tmconsulting/sirenaxml-golang-sdk/service"
"github.com/tmconsulting/sirenaxml-golang-sdk/structs"
)func main() {
clientID, err := strconv.ParseUint(os.Getenv("CLIENT_ID"), 10, 16)
if err != nil {
panic(err)
}
sc := &sirenaXML.Config{
ClientID: uint16(clientID),
Ip: os.Getenv("IP"),
Environment: os.Getenv("ENV"),
ClientPublicKey: os.Getenv("CLIENT_PUBLIC_KEY"),
ClientPrivateKey: os.Getenv("CLIENT_PRIVATE_KEY"),
ServerPublicKey: os.Getenv("SERVER_PUBLIC_KEY"),
ClientPrivateKeyPassword: os.Getenv("CLIENT_PRIVATE_KEY_PASSWORD"),
ZippedMessaging: true,
}
logger := logs.NewNullLog()
sdkClient, err := sdk.NewClient(sc, logger)
if err != nil {
log.Fatal(err)
}
srv := service.NewSKD(sdkClient)
availabiliteReq := &structs.AvailabilityRequest{
Query: structs.AvailabilityRequestQuery{
Availability: structs.Availability{
Departure: "MOW",
Arrival: "LED",
AnswerParams: structs.AvailabilityAnswerParams{
ShowFlighttime: true,
},
},
},
}
response, err := srv.Avalability(availabiliteReq)
if err != nil {
log.Fatal(err)
}
log.Print(response)
}
```## Tests
Pass config data in ENV and run tests:
make test
Feel free to help us to rise coverage!
## Contribution
Contribution, in any kind of way, is highly welcome!
It doesn't matter if you are not able to write code.
Creating issues or holding talks and help other people to use
[sirenaxml-golang-sdk](https://github.com/tmconsulting/sirenaxml-golang-sdk) is contribution, too!A few examples:
* Correct typos in the README / documentation
* Reporting bugs
* Implement a new feature or service
* Sharing the love if like to use [sirenaxml-golang-sdk](https://github.com/tmconsulting/sirenaxml-golang-sdk) and help people
to get use to itIf you are new to pull requests, checkout [Collaborating on projects using issues and pull requests / Creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
## License
SDK is released under the [MIT License](./LICENSE).