8000 Approaches and options to pulling District Dashboard stats · Issue #2 · hippysurfer/OSM-Connect · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Approaches and options to pulling District Dashboard stats #2
Open
@gcor71

Description

@gcor71

Hey, I'm looking at how to adapt your project to pull Section Size information into a sheet. It's not part of OSM many folks will see/use.

Would you take a look at the output below and suggest which of your existing .gs components would be closest to what I'd need to do to pull the "sections" elements per group? I am happy to work on it myself and share back, but I struggle to interpret the function calls necessary to navigate across the array. It's probably pretty simple - but I can't get my head round it.

Thanks in advance.

The POST is: /ext/discounts/?action=getSizes&code=221&sectionid=68972
The returned BODY (sample) is:

{
    "Portsmouth": {
        "idealsize": 1451,
        "numscouts": 1084,
        "waiting": 272,
        "byGroup": {
            "104th Portsmouth": {
                "sections": [
                    {
                        "numscouts": 15,
                        "sectionid": "30931",
                        "type": "beavers",
                        "idealsize": 50,
                        "idealleaders": "5",
                        "numleaders": "5",
                        "name": "Beavers",
                        "waiting": 3
                    },
                    { ... etc ... }
                ],
                "idealsize": 88,
                "numscouts": 45,
                "waiting": 7
            },
            "1st Portsmouth Sea Scouts": {
                "sections": [
                    {
                        "numscouts": 15,
                        "sectionid": "50569",
                        "type": "beavers",
                        "idealsize": 18,
                        "idealleaders": "4",
                        "numleaders": "2",
                        "name": "Beavers",
                        "waiting": 0
                    },
                    { ... etc ... }
                ],
                "idealsize": 63,
                "numscouts": 70,
                "waiting": 0
            },
            ... etc ...
            }
        }
    },
    "categories": [
        "Portsmouth"
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0