openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 5.62 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"x-twitter":"WilliamHill"},"description":"The William Hill Numbers API uses a single method that allows you to generate random numbers for your application. Numbers can either be unique or can be produced with the chance that some might be the same. For example, you can have a highest value of 6 and a lowest value of 1 with a count of 2 with a unique value of false - this will give you two numbers between 1 and 6 which are independent, just like two dice being rolled.<br /><br />The Numbers API is a Private API and therefore not automatically available to developers. To use this API, contact your business manager who will guide you through the separate Terms and Conditions of use before you can have the API assigned to your application.","license":{"name":"William Hill Online","url":"https://www.williamhill.com/"},"title":"Numbers API","version":"2.0","x-apisguru-categories":["entertainment"],"x-logo":{"url":"https://twitter.com/WillHillHelp/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://developer.williamhill.com/wh-docs/docs-sdks/numbers/swagger/docs","version":"2.0"}],"x-providerName":"whapi.com","x-serviceName":"numbers"},"paths":{"/generate/integers":{"get":{"description":"This method is used to generate random numbers for your app. Within the request, you can specify the lowest number, the highest number and the amount of numbers returned. There is also an option to generate a unique set of numbers with no repetition of the same numbers allowed in the return.","operationId":"getRandomNumbers","parameters":[{"description":"A unique identifier of your application that is generated by the API portal and presented in the header.","in":"header","name":"apiKey","required":true,"x-eg":"l7xx999dd7276c4e4ff7b6aa810cb106xxxx","schema":{"type":"string"}},{"description":"Another unique identifier for your application. The secret must never be sent over HTTP.","in":"header","name":"apiSecret","required":true,"x-eg":"04d2db4f6baa456489774afc121exxxx","schema":{"type":"string"}},{"description":"The authentication ticket associated with the user session. The getRandomNumbers method operates in two different ways – ‘Demo’ mode and ‘Live’ mode. In Demo mode, where no money is involved, the ticket is not required and can be used without it. In Live mode, when there is a financial outcome, the developer must supply a valid authentication and the ticket must be supplied. Important: The service should not be used in Live mode without a ticket.","in":"header","name":"apiTicket","required":false,"x-eg":"TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx","schema":{"type":"string"}},{"description":"Identifier that indicates the game for which the RNG (Random Number Generator) has been used.","in":"query","name":"gameCode","required":true,"x-eg":"POKER","schema":{"type":"string","pattern":"^[a-zA-Z0-9#/_.-]{1,30}$"}},{"description":"Highest possible value to be returned.","in":"query","name":"highest","required":true,"x-eg":100,"schema":{"type":"integer","minimum":1,"maximum":9999999999}},{"description":"Lowest possible value to be returned.","in":"query","name":"lowest","required":true,"x-eg":0,"schema":{"type":"integer","minimum":1,"maximum":9999999999}},{"description":"Number of values to be returned.","in":"query","name":"count","required":true,"x-eg":7,"schema":{"type":"integer","minimum":1,"maximum":99}},{"description":"Should the numbers returned be unique","in":"query","name":"unique","required":true,"x-eg":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/success"},"examples":{"response":{"value":"{ \n \"sessionID\": \"10.1.29.232/6859\", \n \"randomNumbers\": [ \"17\",\"91\",\"22\"] \n} \n"}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/numbersErrors"},"examples":{"response":{"value":"{\n \"errors\" : [\n {\n \"code\":\"10070\",\n \"message\":\"Missing Parameter\",\n \"field\":\"apiKey\"\n }\n ]\n}\n"}}}}}},"tags":["Numbers"],"x-returnserrors":[20201,20202]}}},"x-customerrors":[{"code":20201,"message":"Lowest parameter greater than or equal to highest parameter","status":400},{"code":20202,"message":"Count parameter too large","status":400}],"x-docchapters":["fieldSelection","apiSummary","headAndOptions","docsAndSdks","errorHandling","statusCodes"],"servers":[{"url":"https://sandbox.whapi.com/v2/numbers"}],"components":{"schemas":{"error":{"properties":{"code":{"description":"A unique William Hill identifier for the error","type":"string"},"field":{"description":"To help pinpoint the exact parameter where a request has failed","type":"string"},"message":{"description":"A unique William Hill text string to enable you to identify the error (in English only)","type":"string"}},"type":"object"},"numbersErrors":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}},"type":"object"},"success":{"properties":{"randomNumbers":{"description":"An array of random numbers","items":{"type":"integer"},"type":"array"},"sessionId":{"description":"This is either the IP address of the customer if not authenticated, or if used in ‘Live’ mode, when there is a financial outcome, it is the IP address and customerId for the account the ticket was generated for. This is used for audit purposes in case of financial query about a game outcome.","type":"string"}},"type":"object"}}}}