DonorDrive / PublicAPI

Documentation and Examples for the DonorDrive Public API
MIT License
37 stars 12 forks source link

Retrieve the donations sum, and target, shown on event page #35

Closed morleym closed 4 years ago

morleym commented 4 years ago

I am looking at an event: https://lanfest.donordrive.com/index.cfm?fuseaction=donorDrive.event&eventID=510

The event page displays a target and a current value:

image

The public API for the event only returns the following:

{
    "endDateUTC": "2020-04-14T02:00:00.0+0000",
    "eventID": 510,
    "timezone": "America/New_York",
    "type": "P",
    "startDateUTC": "2020-04-10T22:00:00.0+0000",
    "name": "Corona Clash"
}

I did not see a means in API documentation to retrieve either the target ($5000 in the image) or the current ($90 in the image) so I am filing this issue to request that functionality. This event does not have any teams.

morleym commented 4 years ago

More context: the use case is to display this target and sum in custom layouts either for a website or a broadcast.

timmixell commented 4 years ago

@morleym , confirming you're looking to get fundraising info in the /api/events and/or /api/events/EVENT-ID endpoints. if so, we're working on it!

morleym commented 4 years ago

@timmixell that is correct. In this example, I'd like to GET https://lanfest.donordrive.com/api/events/510 and have it return the values for the goal (5000) and current total raised (90) in some form

timmixell commented 4 years ago

@morleym please see the updates in https://github.com/DonorDrive/PublicAPI/pull/40. The actual API changes are live, the PR reflects the updated behavior. Note that goal and total raised are only returned if they've been made visible by an administrator.