GW2Raidar / gw2raidar

A log parsing website for Guild Wars 2 combat logs
http://www.gw2raidar.com
GNU General Public License v3.0
20 stars 14 forks source link

API : Encounter List #253

Closed merforga closed 6 years ago

merforga commented 6 years ago

New API endpoint : /api/encounters.json

Returns json of encounters in the format:

{
    "response": {
        "encounter": [
            {
                "time": "Datetimestamp",
                "name": "Name of Boss",
                "URL": "URL of encounter"
            },
            {
                "time": "Datetimestamp",
                "name": "Name of Boss",
                "URL": "URL of encounter"
            }
        ]
    }
}

If null return message "No encounters found"

Parameters

Authentication via token, see #254

count: (optional) Number of encounters to return if requesttype = 1. Default value 1 date: (optional) Format = Epoch, Date range from which to pull encounters from (date range = date to current date). Default value = previous day success : (optional) Boolean, 1 = Success flag only, 0 = Unsuccessful, no value = ALL areaid : (optional) Array to specify only specific encounters to pull back

Responses

200 - Success, include response XML 401 - Invalid username password 500 - Invalid parameters (e.g. incorrect date format, count etc)

merforga commented 6 years ago

reverse order of returned encounters. Currently returns oldest to newest. Should be newest to oldest

merforga commented 6 years ago

Also need to add areaid : (optional) Array to specify only specific encounters to pull back to API endpoint

amadanmath commented 6 years ago
merforga commented 6 years ago

One more additional thing, can we add categories and tags as in the returned json? Ie:

            {
                "time": "Datetimestamp",
                "name": "Name of Boss",
                "URL": "URL of encounter"
                "category": "Category of encounter"
                "tags": "Tags of encounter, comma delimited"
            },
merforga commented 6 years ago

Version 1.0.14 released on 2018-03-12 11:42:13