ScrapedDuck icon indicating copy to clipboard operation
ScrapedDuck copied to clipboard

Add generic event data

Open hamster007Github opened this issue 1 year ago • 0 comments

This PR add the JSON key "generic" to event.json / event_min.json. The new extraData block will be added to any type of events. This new data can be used for tools, to inform people about changed pokemon / field research pool. I tried to add the additional data without changing existing stuff as much as possible.

Containing following data:

  • hasSpawns: boolean, true: if there are eventspecific pokemon which result in a change of pokemon pool at start and end of the event
  • hasFieldResearchTasks: boolean, true: if there are projectspecific pokemon which result in a change of field reasearch tasks at pokestops at start and end of the event

Example (eventType 'event'):

{
    "eventID": "adventure-week-2024",  
    "name": "Adventure Week 2024",  
    "eventType": "event",  
    "heading": "Event",  
    "link": "https://leekduck.com/events/adventure-week-2024/",  
    "image": "https://leekduck.com/assets/img/events/adventure-week-2024.jpg",  
    "start": "2024-08-02T10:00:00.000",  
    "end": "2024-08-12T23:59:59.000",  
    "extraData": {  
        "generic": {  
            "hasSpawns": true,  
            "hasFieldResearchTasks": true  
        }  
    }  
}

Example (eventType 'spotlight'):

{
    "eventID": "pokemonspotlighthour2024-08-06",
    "name": "Drilbur Spotlight Hour",
    "eventType": "pokemon-spotlight-hour",
    "heading": "Pokémon Spotlight Hour",
    "link": "https://leekduck.com/events/pokemonspotlighthour2024-08-06/",
    "image": "https://leekduck.com/assets/img/events/pokemonspotlighthour.jpg",
    "start": "2024-08-06T18:00:00.000",
    "end": "2024-08-06T19:00:00.000",
    "extraData": {
        "spotlight": {
            "name": "Drilbur",
            "canBeShiny": true,
            "image": "https://leekduck.com/assets/img/pokemon_icons/pokemon_icon_529_00.png",
            "bonus": "2× Catch XP",
            "list": [
                {
                    "name": "Drilbur",
                    "canBeShiny": true,
                    "image": "https://leekduck.com/assets/img/pokemon_icons/pokemon_icon_529_00.png"
                }
            ]
        },
        "generic": {
            "hasSpawns": true,
            "hasFieldResearchTasks": false
        }
    }
}

hamster007Github avatar Aug 06 '24 16:08 hamster007Github