scenario-data.json

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OzPunter
    Junior Member
    • Apr 2009
    • 161

    #1

    scenario-data.json

    Can someone clue me up on what is the scenario-data.json file, please.

    I downloaded the example delphi project and it stops on this line

    // Load the json with the scenario data.
    loadScenarioData('scenario-data.json');

    Can't find what the scenario-data.json file is and what it should contain.

    Thanks
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    Must be something specific to the Delphi example, as there is no such file required as part of the standard JSON access in other languages.

    Comment

    • smilerdude
      Junior Member
      • Jun 2010
      • 11

      #3
      I've just been to the Delphi Sample code that is hosted on GitHub and clicked on that very file to view it's contents.

      The url is https://github.com/jamiei/Betfair-API-NG-Sample

      On that projects main page it display's the contents of a file called "readme.md". Read it especially the part called "Configuration".

      "

      Betfair API-NG Sample Tool for Delphi
      This project is a demo tool, intended to provide example usage of requests to Betfair's API-NG. Addtionally, this project provides sample code for connecting to Betfair API-NG from Delphi using Indy 10. This project was built for Delphi XE2, but should be backwards compatible with post Delphi 2009 versions. This sample tool logs all requests and responses to a response log in the same folder as the application executable for educational purposes.

      Please note: You will need to provide your own Application Key in order to use this sample tool. You will also need to download the SSL binaries from Indy and place them in the directory with the Appplication binaries.



      Configuration
      There are two files:
      •BetfairAPINGSampleTool.ini - Named with the same name as the executable. This file contains a comma seperated list of json-rpc methods and a comma seperated list of endpoints as name=value pairs.
      •scenario-data.json - A Json file which contains the scenarios to pre-populate the tool with at application start-up time. You can edit this to provide your own scenarios, the required fields per json object in the array are caption, methodName and params.
      "

      Now for my input about what that files does.

      Very simply it contains basic JSON objects, with some filters that will be sent to Betfair API-NG by the programme.

      The "caption" of that object really does spell out what each call is going to do and what kind of data you should expect to receive back.

      {
      "caption": "Get the 2 best prices, rolled up to £10 for the London Mayor Election 2016",
      "methodName": "SportsAPING/v1.0/listMarketBook",
      "params": {
      "marketIds": [
      "1.107728324"
      ],
      "priceProjection": {
      "priceData": [
      "EX_BEST_OFFERS"
      ],
      "exBestOffersOverrides": {
      "bestPricesDepth": "2",
      "rollupModel": "STAKE",
      "rollupLimit": "10"
      }
      }
      }
      },
      Last edited by smilerdude; 18-05-2014, 07:59 PM.

      Comment

      • just_browsing
        Junior Member
        • Mar 2013
        • 2

        #4
        Those files appear to be specific to the Delphi sample code and as the README.md implies, are merely a convenient way of storing and recalling the method calls that the tool puts into the drop down list of Scenarios for you.

        Comment

        • OzPunter
          Junior Member
          • Apr 2009
          • 161

          #5
          Json

          Ok guys,

          It seems I'm barking up nthe wrong tree.

          Is there any example Dephi JSON code available other than

          https://github.com/jamiei/Betfair-API-NG-Sample

          It looks a bit complicated for a time poor punter

          Comment

          Working...
          X