Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Question about V3 response inconsistency

    Scheduled Pinned Locked Moved Webcams API
    3 Posts 2 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • fkrauthanF Offline
      fkrauthan | Premium
      last edited by

      Is there a reason why the /map/clusters endpoint returns as payload response an array of webcam objects while the /webcams endpoint returns an object that contains as key webcams which in return hold the array of webcam objects. It would be great if the API would use a consistent response body shape.

      1 Reply Last reply Reply Quote 0
      • caldrjirC Offline
        caldrjir Administrator
        last edited by

        Hi @fkrauthan, this is because the /webcams endpoint supports pagination, so we need to include an extra total field. However, the /map/cluster endpoint doesn't.

        Windy.com webcams developer

        fkrauthanF 1 Reply Last reply Reply Quote 1
        • fkrauthanF Offline
          fkrauthan @caldrjir | Premium
          last edited by

          @caldrjir that makes sense. Personally still would have loved to have a consistent response body as that helps keep my integration code clean :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Windy Community  |  Powered by excellent NodeBB
          Terms of Use     Privacy Policy     Windy.com