Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to retrieve systems grouped by operator #483

Open
hbruch opened this issue Jun 12, 2024 · 1 comment
Open

Possibility to retrieve systems grouped by operator #483

hbruch opened this issue Jun 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@hbruch
Copy link
Collaborator

hbruch commented Jun 12, 2024

Is your feature request related to a problem? Please describe.
Currently, neither gbfs/ endpoint (for GBFSv2) nor the manifest.json endpoint for GBFSv3 provide information, which systems are operated by which operator.

Goal / high level use-case
Mobility Apps usually group different systems by provider, e.g. to limit the number of options in preferences (see this discussion in the MobilityData GBFS slack).

Describe the solution you'd like
I suggest a new endpoint gbfs/operators.json which lists the operators (their id and name) and their published systems.

Describe alternatives you've considered
Alternatively,

  • manifest.json could be extended to provide operator(s) information.
  • the GraphQL API could be extended to provide links to the systems

Additional context
Example of a possible endpoint response:

{
    "operators": [
        {
            "id": "DER:Operator:deer",
            "name": {
                "translation": [
                    {
                        "language": "de",
                        "value": "Deer"
                    }
                ]
            },
            "systems": [
                {
                    "id": "deer",
                    "url": "http://localhost:8080/gbfs/deer/gbfs"
                }
            ]
        },
        {
            "id": "DKY:Operator:donkey",
            "name": {
                "translation": [
                    {
                        "language": "de",
                        "value": "Donkey Republic"
                    }
                ]
            },
            "systems": [
                {
                    "id": "donkey_ge",
                    "url": "http://localhost:8080/gbfs/donkey_ge/gbfs"
                }
            ]
        },
        {
            "id": "NBK:Operator:nextbike",
            "name": {
                "translation": [
                    {
                        "language": "de",
                        "value": "Nextbike"
                    }
                ]
            },
            "systems": [
                {
                    "id": "nextbike_df",
                    "url": "http://localhost:8080/gbfs/nextbike_df/gbfs"
                },
                {
                    "id": "nextbike_fg",
                    "url": "http://localhost:8080/gbfs/nextbike_fg/gbfs"
                },
                {
                    "id": "nextbike_ds",
                    "url": "http://localhost:8080/gbfs/nextbike_ds/gbfs"
                },
                {
                    "id": "nextbike_vn",
                    "url": "http://localhost:8080/gbfs/nextbike_vn/gbfs"
                }
            ]
        },
        {
            "id": "MEC:Operator:my-e-car",
            "name": {
                "translation": [
                    {
                        "language": "de",
                        "value": "My-E-Car"
                    }
                ]
            },
            "systems": [
                {
                    "id": "my-e-car",
                    "url": "http://localhost:8080/gbfs/my-e-car/gbfs"
                }
            ]
        }
    ]
}
@testower
Copy link
Collaborator

Complementary to #355

@testower testower added this to the 1.1 (next release) milestone Jun 17, 2024
@testower testower added the enhancement New feature or request label Jun 17, 2024
@testower testower modified the milestones: 1.1, 1.2 (next version) Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants