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

API: Limit does not work properly with certain feeds #707

Open
jcpitre opened this issue Aug 21, 2024 · 0 comments
Open

API: Limit does not work properly with certain feeds #707

jcpitre opened this issue Aug 21, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jcpitre
Copy link
Contributor

jcpitre commented Aug 21, 2024

Describe the bug

I suspect this is probably related to #460
Here is the query:

curl -X 'GET' \
  'https://api.mobilitydatabase.org/v1/gtfs_feeds?limit=2&offset=8' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer myToken'

So with a limit of 2 and an offset of 8.
This query returns only 1 feed. There is no case where this query should return only 1 feed.
Note that mdb-1095 has multiple datsets.

[
  {
    "id": "mdb-1095",
    "data_type": "gtfs",
    "status": "active",
    "created_at": "2024-02-08T00:00:00Z",
    "external_ids": [
      {
        "external_id": "1095",
        "source": "mdb"
      }
    ],
    "provider": "ABuss OÜ, Aktsiaselts Hansa Bussiliinid, Aktsiaselts MK Autobuss, Alukvik OÜ, Arilix OÜ, AS Lux Express Estonia, Asunduse osaühing, ATG Bussiliinid OÜ, Atko Bussiliinid AS, ATKO Liinid OÜ, ATKO Transport OÜ, Ekspress-Auto L Osaühing, Ekspressbussiliinid osaühing, Elmar Purga FIE, ELRON, Estonian Lines OÜ, GoBus AS, HANSABUSS AS, Kalle Bussid OÜ, MEELIS HEEK, MK Reis-X OÜ, NAJA OÜ, Osaühing Bristol Takso, OSAÜHING FREMANTI, osaühing Tulisilm, OV Ida-Bus OÜ, OÜ Baltic Shuttle, PRESTO osaühing, Radix Transport OÜ, Rannu Rukkilill E.S.T. OÜ, Saaremaa vald, SEBE Aktsiaselts, Sirel Reisid OÜ, Taisto Express OÜ, Tallinna Linnatranspordi AS, TS Laevad OÜ, Tõnu Tours OÜ, Valgis osaühing",
    "feed_name": "Ühistranspordiregistri avaandmed",
    "note": "",
    "feed_contact_email": "",
    "source_info": {
      "producer_url": "http://www.peatus.ee/gtfs/gtfs.zip",
      "authentication_type": 0,
      "authentication_info_url": "",
      "api_key_parameter_name": "",
      "license_url": "https://www.mnt.ee/eng/public-transportation/public-transport-information-system"
    },
    "redirects": [],
    "locations": [
      {
        "country_code": "UA",
        "country": "Ukraine",
        "subdivision_name": null,
        "municipality": null
      },
      {
        "country_code": "GB",
        "country": "United Kingdom",
        "subdivision_name": null,
        "municipality": null
      },
      {
        "country_code": "FI",
        "country": "Finland",
        "subdivision_name": null,
        "municipality": null
      },
      {
        "country_code": "EE",
        "country": "Estonia",
        "subdivision_name": null,
        "municipality": null
      }
    ],
    "latest_dataset": {
      "id": "mdb-1095-202408190026",
      "hosted_url": "https://files.mobilitydatabase.org/mdb-1095/mdb-1095-202408190026/mdb-1095-202408190026.zip",
      "bounding_box": {
        "minimum_latitude": 0.22061077,
        "maximum_latitude": 69.89999971,
        "minimum_longitude": 0.14836759,
        "maximum_longitude": 60.55378507
      },
      "downloaded_at": "2024-08-19T00:47:35.058472Z",
      "hash": "3a855f9f813119a082a2e7dcd2a02873b41381268aedad302f033eb2e4ced932",
      "validation_report": {
        "total_error": 0,
        "total_warning": 2548,
        "total_info": 10,
        "unique_error_count": 0,
        "unique_warning_count": 12,
        "unique_info_count": 1
      }
    }
  }
]

Steps/Code to Reproduce

See above

Expected Results

2 feeds

Actual Results

1 feed

Screenshots

No response

Files used

No response

Additional notes

mobility_feed_api 1.4.0 on prod

@jcpitre jcpitre added the bug Something isn't working label Aug 21, 2024
@jcpitre jcpitre changed the title API: Limit does not work properly with certin feeds API: Limit does not work properly with certain feeds Aug 21, 2024
@cka-y cka-y self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants