Support » Plugin: SportsPress - Sports Club & League Manager » Updating event results via REST API

  • Resolved northernfrontier

    (@northernfrontier)


    I’m trying to migrate my current baseball league website to the Sportspress and Sportspress for Baseball plugins using the REST API. Most data was easily migrated but adding/updating event results doesn’t seem to be working.

    I’ve tried updating event results using data below. The format is based on the data retrieved by performing a GET on a different event which had its results manually entered. I can also confirm that the IDs used are valid.

    {“results”: {
    “0”: {
    “e”: “E”,
    “eight”: “8”,
    “five”: “5”,
    “four”: “4”,
    “h”: “H”,
    “nine”: “9”,
    “one”: “1”,
    “outcome”: “Outcome”,
    “r”: “R”,
    “seven”: “7”,
    “six”: “6”,
    “ten”: “10”,
    “three”: “3”,
    “two”: “2”
    },
    “2254”: {
    “outcome”: [
    “win”
    ],
    “e”: “3”,
    “eight”: “”,
    “five”: “3”,
    “four”: “0”,
    “h”: “13”,
    “nine”: “”,
    “one”: “1”,
    “r”: “11”,
    “seven”: “2”,
    “six”: “0”,
    “ten”: “”,
    “three”: “0”,
    “two”: “5”
    },
    “2286”: {
    “e”: “2”,
    “eight”: “”,
    “five”: “0”,
    “four”: “1”,
    “h”: “12”,
    “nine”: “”,
    “one”: “1”,
    “outcome”: [
    “loss”
    ],
    “r”: “6”,
    “seven”: “2”,
    “six”: “1”,
    “ten”: “”,
    “three”: “1”,
    “two”: “0”
    }}}

    I’ve tried including this data when creating a new event as well as updating an existing event using PUT and PATCH. In all 3 cases I get a response status of 200 indicating that the action was successful but the results data is not updated. In the case of creating a new event, the event is created while the results data is ignored.

    Is add/updating event results via the REST API available in the free version of the plugin or does this require the pro version? I’d planned on upgrading to the PRO version once the migration is successful so doing so earlier is not a problem if it’s a requirement.

    If this feature is available in the free version, is there a known issue related to updating event results via the REST API in the current release?

    Thanks

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter northernfrontier

    (@northernfrontier)

    Hi @savvasha ,

    I can confirm that the commit fixes the issue. Do you know when the next release will be available with this patch in it?

    Thanks

    Plugin Contributor Roch

    (@rochesterj)

    Hi there!

    We did include an API fix in our latest release. Did you update SportsPress in the meantime? It should be working now.

    If it doesn’t work for you let us know and I can tag our dev team here.

    Thanks!

    Thread Starter northernfrontier

    (@northernfrontier)

    @rochesterj ,

    I have already confirmed to @savvasha that the issue is not completely fixed (please see my previous responses for more details). The commit that he ask me to verify was made more than a week after the 2.7.8 release.

    Can you confirm when this patch will be available in a release?

    Plugin Contributor Roch

    (@rochesterj)

    Oh, I see. I don’t have any information on when it’ll be available, but it’s likely that it’ll be in the next minor release.

    Savvas or Brian can confirm if this for you.

    Thanks!

Viewing 4 replies - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.