https://github.com/zeuxisoo/elixir-exubx
A fetch tool for listing the remote ubx performance list.
https://github.com/zeuxisoo/elixir-exubx
console-application elixir tools
Last synced: 4 months ago
JSON representation
A fetch tool for listing the remote ubx performance list.
- Host: GitHub
- URL: https://github.com/zeuxisoo/elixir-exubx
- Owner: zeuxisoo
- Created: 2016-10-28T09:05:00.000Z (over 9 years ago)
- Default Branch: 0.2.x
- Last Pushed: 2019-02-18T07:04:20.000Z (over 7 years ago)
- Last Synced: 2025-11-21T19:31:21.478Z (7 months ago)
- Topics: console-application, elixir, tools
- Language: Elixir
- Homepage:
- Size: 161 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ExUbx
A fetch tool for listing the remote ubx performance list.
## Installation
Add as a dependency in your mix.exs file:
```elixir
defp deps do
[
{ :exubx, "~> 0.2" }
]
end
```
And run:
$ mix deps.get
## Basic Usage
To run `ExUbx` in the current project:
$ mix ubx list --event=[EVENT_ID]
## Other Usage
You can play `ExUbx` in the Elixir REPL, Please ensure this command excute in the root of your project:
$ iex -S mix
Example (fetch auth token):
iex> auth = ExUbx.fetch_auth()
%ExUbx.Api.Struct.Auth{cookie: "Auth_Token=201610311227-12345678a12aa496bde94ec7de16f3f01adc6c5a; HttpOnly; Domain=example.com; Expires=Mon, 31-Oct-2016 05:27:12 GMT; Path=/", location: "https://ticket.example.com/"}
Example (fetch performance list):
iex> performance = ExUbx.fetch_performance(auth.cookie, 30816)
%ExUbx.Api.Struct.Performance{performances: [%{"bookmarkCreateTime" => -1,
"bookmarkStatus" => 0, "counterSalesEndDate" => nil,
"counterSalesStartDate" => nil, "displayDate" => true,
"displayTime" => true, "eventId" => 30816, "externalReferenceKey" => "",
"isFirstDayPerformance" => false, "isInCounterSalesPeriod" => true,
"isNotAllowedToPurchaseBeforeShowTime" => false, "isPurchasable" => true,
"note" => nil, "performanceAcsId" => 293477,
"performanceCategoryClass" => "-", "performanceDateTime" => 1480074300000,
"performanceDisplayFormat" => "DISPLAY_NAME_DATE_AND_TIME",
"performanceDisplayFormatValue" => 1, "performanceId" => 101254,
"performanceName" => "This is a example performance name",
"transactionMaxQuota" => 40},
......
......
......
],
status: ["AVAILABLE", "AVAILABLE", "AVAILABLE", "AVAILABLE", "AVAILABLE"]}
Example (convert performances for mix the performances and status)
iex> ExUbx.convert_performances(performance)
[%{"bookmarkCreateTime" => -1, "bookmarkStatus" => 0,
"counterSalesEndDate" => nil, "counterSalesStartDate" => nil,
"displayDate" => true, "displayTime" => true, "eventId" => 30816,
"externalReferenceKey" => "", "isFirstDayPerformance" => false,
"isInCounterSalesPeriod" => true,
"isNotAllowedToPurchaseBeforeShowTime" => false, "isPurchasable" => true,
"note" => nil, "performanceAcsId" => 293477,
"performanceCategoryClass" => "-", "performanceDateTime" => 1480074300000,
"performanceDisplayFormat" => "DISPLAY_NAME_DATE_AND_TIME",
"performanceDisplayFormatValue" => 1, "performanceId" => 101254,
"performanceName" => "This is a example performance name",
"status" => "AVAILABLE", "transactionMaxQuota" => 40},
......
......
......]
## Documentation
You can find in [Here](https://hexdocs.pm/exubx)