Created
July 4, 2026 18:09
-
-
Save Beyarz/1bc72010ce1228813135a73935ee72a0 to your computer and use it in GitHub Desktop.
Validate tickets for Filmstaden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'JSON' | |
| requier 'net/http' | |
| biljetter = %w(123 456 789) | |
| biljetter.each do |biljett| | |
| uri = URI("https://services.cinema-api.com/Discount/Sys99-SE/#{biljett}") | |
| response = Net::HTTP.get_response(uri) | |
| data = JSON.parse(response.body) | |
| puts data if data["activeForSaleTransaction"] | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment